@arcships/aimux 0.1.5 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +27 -11
- package/dist/types/ContentPart.d.ts +6 -0
- package/dist/types/GenerateContent.d.ts +6 -0
- package/dist/types/GenerateTextOptions.d.ts +5 -0
- package/dist/types/ProviderName.d.ts +258 -0
- package/dist/types/ProviderName.js +262 -0
- package/dist/types/StreamPart.d.ts +6 -0
- package/dist/types/TimeoutConfiguration.d.ts +13 -0
- package/dist/types/TimeoutConfiguration.js +2 -0
- package/dist/types/ToolCall.d.ts +7 -0
- package/dist/types.d.ts +1 -0
- package/index.d.ts +91 -15
- package/index.js +65 -54
- package/package.json +8 -8
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 arcships
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Model } from '../index.js';
|
|
2
2
|
import type { GenerateTextOptions, GenerateTextResult, StreamPart, ModelMessage, Tool, ToolChoice, ToolCall, ToolResult, Usage, FinishReason, Warning, Role, MessageContent, ContentPart, ResponseFormat, ReasoningEffort, AiMuxError, GenerateResult, FunctionTool } from './types';
|
|
3
|
-
export { Model, StreamTextGenerator, openai, anthropic, deepseek } from '../index.js';
|
|
3
|
+
export { Model, StreamTextGenerator, AbortBridge, initLogging, openai, anthropic, deepseek, google, cohere, mistral, xai, bedrock, vertex, anthropicAws, azure, provider, } from '../index.js';
|
|
4
|
+
export type { ProviderName } from './types/ProviderName';
|
|
4
5
|
export type { GenerateTextOptions, GenerateTextResult, StreamPart, ModelMessage, Tool, ToolChoice, ToolCall, ToolResult, Usage, FinishReason, Warning, Role, MessageContent, ContentPart, ResponseFormat, ReasoningEffort, AiMuxError, GenerateResult, FunctionTool, };
|
|
5
6
|
/**
|
|
6
7
|
* A raw napi `Model` instance returned by `openai()` / `anthropic()` / …
|
|
@@ -17,6 +18,7 @@ export type RawModel = Model;
|
|
|
17
18
|
* @param prompt - A plain string or an array of typed chat messages.
|
|
18
19
|
* @param options - Optional typed generation options (tools, tool_choice,
|
|
19
20
|
* temperature, response_format, …).
|
|
21
|
+
* @param signal - Optional `AbortSignal`; aborting it cancels the call.
|
|
20
22
|
*
|
|
21
23
|
* Internally calls the raw
|
|
22
24
|
* `model.generateText(JSON.stringify(prompt), options ? JSON.stringify(options) : undefined)`
|
|
@@ -30,13 +32,14 @@ export type RawModel = Model;
|
|
|
30
32
|
* console.log(result.text, result.usage)
|
|
31
33
|
* ```
|
|
32
34
|
*/
|
|
33
|
-
export declare function generateText(model: RawModel, prompt: string | ModelMessage[], options?: GenerateTextOptions): Promise<GenerateTextResult>;
|
|
35
|
+
export declare function generateText(model: RawModel, prompt: string | ModelMessage[], options?: GenerateTextOptions, signal?: AbortSignal): Promise<GenerateTextResult>;
|
|
34
36
|
/**
|
|
35
37
|
* Stream text from a model. Yields typed {@link StreamPart}s.
|
|
36
38
|
*
|
|
37
39
|
* @param model - A raw model instance from `openai()`, `anthropic()`, etc.
|
|
38
40
|
* @param prompt - A plain string or an array of typed chat messages.
|
|
39
41
|
* @param options - Optional typed generation options (tools, tool_choice, …).
|
|
42
|
+
* @param signal - Optional `AbortSignal`; aborting it cancels the stream.
|
|
40
43
|
*
|
|
41
44
|
* Internally drives the raw `model.streamText(JSON.stringify(prompt), …)`
|
|
42
45
|
* async generator and `JSON.parse`s each JSON-string chunk before yielding it
|
|
@@ -51,4 +54,4 @@ export declare function generateText(model: RawModel, prompt: string | ModelMess
|
|
|
51
54
|
* }
|
|
52
55
|
* ```
|
|
53
56
|
*/
|
|
54
|
-
export declare function streamText(model: RawModel, prompt: string | ModelMessage[], options?: GenerateTextOptions): AsyncGenerator<StreamPart>;
|
|
57
|
+
export declare function streamText(model: RawModel, prompt: string | ModelMessage[], options?: GenerateTextOptions, signal?: AbortSignal): AsyncGenerator<StreamPart>;
|
package/dist/index.js
CHANGED
|
@@ -13,17 +13,29 @@
|
|
|
13
13
|
// The raw napi API (`index.js` / `index.d.ts`, auto-generated) is untouched.
|
|
14
14
|
// This is purely an extra TypeScript layer on top.
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.deepseek = exports.anthropic = exports.openai = exports.StreamTextGenerator = exports.Model = void 0;
|
|
16
|
+
exports.provider = exports.azure = exports.anthropicAws = exports.vertex = exports.bedrock = exports.xai = exports.mistral = exports.cohere = exports.google = exports.deepseek = exports.anthropic = exports.openai = exports.initLogging = exports.AbortBridge = exports.StreamTextGenerator = exports.Model = void 0;
|
|
17
17
|
exports.generateText = generateText;
|
|
18
18
|
exports.streamText = streamText;
|
|
19
|
+
const index_js_1 = require("../index.js");
|
|
19
20
|
// Re-export the raw napi constructors/factories so consumers can do everything
|
|
20
21
|
// from a single import: `import { openai, generateText } from 'aimux'`.
|
|
21
|
-
var
|
|
22
|
-
Object.defineProperty(exports, "Model", { enumerable: true, get: function () { return
|
|
23
|
-
Object.defineProperty(exports, "StreamTextGenerator", { enumerable: true, get: function () { return
|
|
24
|
-
Object.defineProperty(exports, "
|
|
25
|
-
Object.defineProperty(exports, "
|
|
26
|
-
Object.defineProperty(exports, "
|
|
22
|
+
var index_js_2 = require("../index.js");
|
|
23
|
+
Object.defineProperty(exports, "Model", { enumerable: true, get: function () { return index_js_2.Model; } });
|
|
24
|
+
Object.defineProperty(exports, "StreamTextGenerator", { enumerable: true, get: function () { return index_js_2.StreamTextGenerator; } });
|
|
25
|
+
Object.defineProperty(exports, "AbortBridge", { enumerable: true, get: function () { return index_js_2.AbortBridge; } });
|
|
26
|
+
Object.defineProperty(exports, "initLogging", { enumerable: true, get: function () { return index_js_2.initLogging; } });
|
|
27
|
+
Object.defineProperty(exports, "openai", { enumerable: true, get: function () { return index_js_2.openai; } });
|
|
28
|
+
Object.defineProperty(exports, "anthropic", { enumerable: true, get: function () { return index_js_2.anthropic; } });
|
|
29
|
+
Object.defineProperty(exports, "deepseek", { enumerable: true, get: function () { return index_js_2.deepseek; } });
|
|
30
|
+
Object.defineProperty(exports, "google", { enumerable: true, get: function () { return index_js_2.google; } });
|
|
31
|
+
Object.defineProperty(exports, "cohere", { enumerable: true, get: function () { return index_js_2.cohere; } });
|
|
32
|
+
Object.defineProperty(exports, "mistral", { enumerable: true, get: function () { return index_js_2.mistral; } });
|
|
33
|
+
Object.defineProperty(exports, "xai", { enumerable: true, get: function () { return index_js_2.xai; } });
|
|
34
|
+
Object.defineProperty(exports, "bedrock", { enumerable: true, get: function () { return index_js_2.bedrock; } });
|
|
35
|
+
Object.defineProperty(exports, "vertex", { enumerable: true, get: function () { return index_js_2.vertex; } });
|
|
36
|
+
Object.defineProperty(exports, "anthropicAws", { enumerable: true, get: function () { return index_js_2.anthropicAws; } });
|
|
37
|
+
Object.defineProperty(exports, "azure", { enumerable: true, get: function () { return index_js_2.azure; } });
|
|
38
|
+
Object.defineProperty(exports, "provider", { enumerable: true, get: function () { return index_js_2.provider; } });
|
|
27
39
|
/**
|
|
28
40
|
* Generate text (non-streaming). Returns a typed {@link GenerateTextResult}.
|
|
29
41
|
*
|
|
@@ -31,6 +43,7 @@ Object.defineProperty(exports, "deepseek", { enumerable: true, get: function ()
|
|
|
31
43
|
* @param prompt - A plain string or an array of typed chat messages.
|
|
32
44
|
* @param options - Optional typed generation options (tools, tool_choice,
|
|
33
45
|
* temperature, response_format, …).
|
|
46
|
+
* @param signal - Optional `AbortSignal`; aborting it cancels the call.
|
|
34
47
|
*
|
|
35
48
|
* Internally calls the raw
|
|
36
49
|
* `model.generateText(JSON.stringify(prompt), options ? JSON.stringify(options) : undefined)`
|
|
@@ -44,9 +57,10 @@ Object.defineProperty(exports, "deepseek", { enumerable: true, get: function ()
|
|
|
44
57
|
* console.log(result.text, result.usage)
|
|
45
58
|
* ```
|
|
46
59
|
*/
|
|
47
|
-
async function generateText(model, prompt, options) {
|
|
60
|
+
async function generateText(model, prompt, options, signal) {
|
|
48
61
|
const optsJson = options ? JSON.stringify(options) : undefined;
|
|
49
|
-
const
|
|
62
|
+
const bridge = signal ? new index_js_1.AbortBridge(signal) : undefined;
|
|
63
|
+
const resultJson = await model.generateText(JSON.stringify(prompt), optsJson, bridge);
|
|
50
64
|
return JSON.parse(resultJson);
|
|
51
65
|
}
|
|
52
66
|
/**
|
|
@@ -55,6 +69,7 @@ async function generateText(model, prompt, options) {
|
|
|
55
69
|
* @param model - A raw model instance from `openai()`, `anthropic()`, etc.
|
|
56
70
|
* @param prompt - A plain string or an array of typed chat messages.
|
|
57
71
|
* @param options - Optional typed generation options (tools, tool_choice, …).
|
|
72
|
+
* @param signal - Optional `AbortSignal`; aborting it cancels the stream.
|
|
58
73
|
*
|
|
59
74
|
* Internally drives the raw `model.streamText(JSON.stringify(prompt), …)`
|
|
60
75
|
* async generator and `JSON.parse`s each JSON-string chunk before yielding it
|
|
@@ -69,9 +84,10 @@ async function generateText(model, prompt, options) {
|
|
|
69
84
|
* }
|
|
70
85
|
* ```
|
|
71
86
|
*/
|
|
72
|
-
async function* streamText(model, prompt, options) {
|
|
87
|
+
async function* streamText(model, prompt, options, signal) {
|
|
73
88
|
const optsJson = options ? JSON.stringify(options) : undefined;
|
|
74
|
-
const
|
|
89
|
+
const bridge = signal ? new index_js_1.AbortBridge(signal) : undefined;
|
|
90
|
+
const gen = await model.streamText(JSON.stringify(prompt), optsJson, bridge);
|
|
75
91
|
for await (const json of gen) {
|
|
76
92
|
yield JSON.parse(json);
|
|
77
93
|
}
|
|
@@ -57,6 +57,12 @@ export type ContentPart = {
|
|
|
57
57
|
* Arguments as a JSON value (usually an object).
|
|
58
58
|
*/
|
|
59
59
|
input: JsonValue;
|
|
60
|
+
/**
|
|
61
|
+
* Provider-assigned thought signature (e.g. Google Gemini
|
|
62
|
+
* `thoughtSignature`). Must be echoed back verbatim on the follow-up
|
|
63
|
+
* turn when the tool result is sent.
|
|
64
|
+
*/
|
|
65
|
+
thought_signature?: string | null;
|
|
60
66
|
/**
|
|
61
67
|
* Provider-specific options for this part (e.g.
|
|
62
68
|
* `anthropic.cacheControl`).
|
|
@@ -22,6 +22,12 @@ export type GenerateContent = {
|
|
|
22
22
|
* Whether the tool is dynamic (defined at runtime, e.g. MCP tools).
|
|
23
23
|
*/
|
|
24
24
|
dynamic?: boolean | null;
|
|
25
|
+
/**
|
|
26
|
+
* Provider-assigned thought signature (e.g. Google Gemini
|
|
27
|
+
* `thoughtSignature`). Must be echoed back verbatim on the follow-up
|
|
28
|
+
* turn when the tool result is sent.
|
|
29
|
+
*/
|
|
30
|
+
thought_signature?: string | null;
|
|
25
31
|
/**
|
|
26
32
|
* Additional provider-specific metadata for the tool call.
|
|
27
33
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReasoningEffort } from "./ReasoningEffort";
|
|
2
2
|
import type { ResponseFormat } from "./ResponseFormat";
|
|
3
|
+
import type { TimeoutConfiguration } from "./TimeoutConfiguration";
|
|
3
4
|
import type { Tool } from "./Tool";
|
|
4
5
|
import type { ToolChoice } from "./ToolChoice";
|
|
5
6
|
import type { JsonValue } from "./serde_json/JsonValue";
|
|
@@ -43,4 +44,8 @@ export type GenerateTextOptions = {
|
|
|
43
44
|
* Per-call retry count override. `None` = provider default, `Some(0)` = disable.
|
|
44
45
|
*/
|
|
45
46
|
max_retries: number | null;
|
|
47
|
+
/**
|
|
48
|
+
* Per-call timeout configuration (total / first-chunk / chunk idle).
|
|
49
|
+
*/
|
|
50
|
+
timeout: TimeoutConfiguration | null;
|
|
46
51
|
};
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Names of all built-in OpenAI-compatible providers.
|
|
3
|
+
* Use `ProviderName.groq` etc. as the `name` argument of `provider()`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ProviderName: {
|
|
6
|
+
readonly abacus: "abacus";
|
|
7
|
+
readonly abliteration_ai: "abliteration_ai";
|
|
8
|
+
readonly ai21: "ai21";
|
|
9
|
+
readonly ai302: "ai302";
|
|
10
|
+
readonly ai_router: "ai_router";
|
|
11
|
+
readonly aiand: "aiand";
|
|
12
|
+
readonly aibadgr: "aibadgr";
|
|
13
|
+
readonly aigc2d: "aigc2d";
|
|
14
|
+
readonly aihubmix: "aihubmix";
|
|
15
|
+
readonly ails: "ails";
|
|
16
|
+
readonly aiml: "aiml";
|
|
17
|
+
readonly aki_io: "aki_io";
|
|
18
|
+
readonly albert: "albert";
|
|
19
|
+
readonly alibaba: "alibaba";
|
|
20
|
+
readonly alibaba_coding_plan: "alibaba_coding_plan";
|
|
21
|
+
readonly alibaba_coding_plan_cn: "alibaba_coding_plan_cn";
|
|
22
|
+
readonly alibaba_token_plan: "alibaba_token_plan";
|
|
23
|
+
readonly alibaba_token_plan_cn: "alibaba_token_plan_cn";
|
|
24
|
+
readonly ambient: "ambient";
|
|
25
|
+
readonly anyapi: "anyapi";
|
|
26
|
+
readonly anyscale: "anyscale";
|
|
27
|
+
readonly apertis: "apertis";
|
|
28
|
+
readonly api2d: "api2d";
|
|
29
|
+
readonly api2gpt: "api2gpt";
|
|
30
|
+
readonly apiserpent: "apiserpent";
|
|
31
|
+
readonly atlascloud: "atlascloud";
|
|
32
|
+
readonly atomic_chat: "atomic_chat";
|
|
33
|
+
readonly auriko: "auriko";
|
|
34
|
+
readonly azure_ai: "azure_ai";
|
|
35
|
+
readonly baichuan: "baichuan";
|
|
36
|
+
readonly baidu: "baidu";
|
|
37
|
+
readonly baidu_v2: "baidu_v2";
|
|
38
|
+
readonly bailing: "bailing";
|
|
39
|
+
readonly baseten: "baseten";
|
|
40
|
+
readonly berget: "berget";
|
|
41
|
+
readonly bigmodel: "bigmodel";
|
|
42
|
+
readonly blueclaw: "blueclaw";
|
|
43
|
+
readonly bytedance: "bytedance";
|
|
44
|
+
readonly byteplus: "byteplus";
|
|
45
|
+
readonly bytez: "bytez";
|
|
46
|
+
readonly canopywave: "canopywave";
|
|
47
|
+
readonly cerebras: "cerebras";
|
|
48
|
+
readonly chatgpt: "chatgpt";
|
|
49
|
+
readonly cherryin: "cherryin";
|
|
50
|
+
readonly chutes: "chutes";
|
|
51
|
+
readonly clarifai: "clarifai";
|
|
52
|
+
readonly claudinio: "claudinio";
|
|
53
|
+
readonly cline_pass: "cline_pass";
|
|
54
|
+
readonly closeai: "closeai";
|
|
55
|
+
readonly cloudferro_sherlock: "cloudferro_sherlock";
|
|
56
|
+
readonly cloudflare: "cloudflare";
|
|
57
|
+
readonly cloudflare_workers_ai: "cloudflare_workers_ai";
|
|
58
|
+
readonly codestral: "codestral";
|
|
59
|
+
readonly cometapi: "cometapi";
|
|
60
|
+
readonly commandcode: "commandcode";
|
|
61
|
+
readonly compactifai: "compactifai";
|
|
62
|
+
readonly copilot: "copilot";
|
|
63
|
+
readonly cortecs: "cortecs";
|
|
64
|
+
readonly coze: "coze";
|
|
65
|
+
readonly crof: "crof";
|
|
66
|
+
readonly crossmodel: "crossmodel";
|
|
67
|
+
readonly crusoe: "crusoe";
|
|
68
|
+
readonly daoxe: "daoxe";
|
|
69
|
+
readonly darkbloom: "darkbloom";
|
|
70
|
+
readonly databricks: "databricks";
|
|
71
|
+
readonly datarobot: "datarobot";
|
|
72
|
+
readonly deepbricks: "deepbricks";
|
|
73
|
+
readonly deepinfra: "deepinfra";
|
|
74
|
+
readonly deepseek: "deepseek";
|
|
75
|
+
readonly digitalocean: "digitalocean";
|
|
76
|
+
readonly dinference: "dinference";
|
|
77
|
+
readonly doubao: "doubao";
|
|
78
|
+
readonly doubleword: "doubleword";
|
|
79
|
+
readonly drun: "drun";
|
|
80
|
+
readonly ebcloud: "ebcloud";
|
|
81
|
+
readonly embercloud: "embercloud";
|
|
82
|
+
readonly empiriolabs: "empiriolabs";
|
|
83
|
+
readonly evroc: "evroc";
|
|
84
|
+
readonly fastcrw: "fastcrw";
|
|
85
|
+
readonly fastgpt: "fastgpt";
|
|
86
|
+
readonly fastrouter: "fastrouter";
|
|
87
|
+
readonly featherless_ai: "featherless_ai";
|
|
88
|
+
readonly firepass: "firepass";
|
|
89
|
+
readonly fireworks: "fireworks";
|
|
90
|
+
readonly freemodel: "freemodel";
|
|
91
|
+
readonly friendliai: "friendliai";
|
|
92
|
+
readonly frogbot: "frogbot";
|
|
93
|
+
readonly galadriel: "galadriel";
|
|
94
|
+
readonly gdc: "gdc";
|
|
95
|
+
readonly gigachat: "gigachat";
|
|
96
|
+
readonly github: "github";
|
|
97
|
+
readonly gmi: "gmi";
|
|
98
|
+
readonly gmicloud: "gmicloud";
|
|
99
|
+
readonly gonka24: "gonka24";
|
|
100
|
+
readonly gradient_ai: "gradient_ai";
|
|
101
|
+
readonly groq: "groq";
|
|
102
|
+
readonly helicone: "helicone";
|
|
103
|
+
readonly heroku: "heroku";
|
|
104
|
+
readonly hetzner: "hetzner";
|
|
105
|
+
readonly hosted_vllm: "hosted_vllm";
|
|
106
|
+
readonly hpc_ai: "hpc_ai";
|
|
107
|
+
readonly hyperbolic: "hyperbolic";
|
|
108
|
+
readonly iflowcn: "iflowcn";
|
|
109
|
+
readonly inception: "inception";
|
|
110
|
+
readonly inceptron: "inceptron";
|
|
111
|
+
readonly inference_net: "inference_net";
|
|
112
|
+
readonly inferencehub: "inferencehub";
|
|
113
|
+
readonly inferx: "inferx";
|
|
114
|
+
readonly infinity: "infinity";
|
|
115
|
+
readonly io_net: "io_net";
|
|
116
|
+
readonly jiekou: "jiekou";
|
|
117
|
+
readonly kenari: "kenari";
|
|
118
|
+
readonly kilo: "kilo";
|
|
119
|
+
readonly kimi: "kimi";
|
|
120
|
+
readonly kimi_for_coding: "kimi_for_coding";
|
|
121
|
+
readonly kiro: "kiro";
|
|
122
|
+
readonly kluster_ai: "kluster_ai";
|
|
123
|
+
readonly krutrim: "krutrim";
|
|
124
|
+
readonly kuae_cloud_coding_plan: "kuae_cloud_coding_plan";
|
|
125
|
+
readonly lambda_ai: "lambda_ai";
|
|
126
|
+
readonly lemonade: "lemonade";
|
|
127
|
+
readonly lemonfox_ai: "lemonfox_ai";
|
|
128
|
+
readonly libertai: "libertai";
|
|
129
|
+
readonly lilac: "lilac";
|
|
130
|
+
readonly lingyiwanwu: "lingyiwanwu";
|
|
131
|
+
readonly llama: "llama";
|
|
132
|
+
readonly llamagate: "llamagate";
|
|
133
|
+
readonly llmgateway: "llmgateway";
|
|
134
|
+
readonly llmtr: "llmtr";
|
|
135
|
+
readonly longcat: "longcat";
|
|
136
|
+
readonly lucidquery: "lucidquery";
|
|
137
|
+
readonly lynkr: "lynkr";
|
|
138
|
+
readonly matterai: "matterai";
|
|
139
|
+
readonly meganova: "meganova";
|
|
140
|
+
readonly merge_gateway: "merge_gateway";
|
|
141
|
+
readonly meta: "meta";
|
|
142
|
+
readonly meta_llama: "meta_llama";
|
|
143
|
+
readonly mimo: "mimo";
|
|
144
|
+
readonly minimax: "minimax";
|
|
145
|
+
readonly minimax_cn: "minimax_cn";
|
|
146
|
+
readonly minimax_cn_coding_plan: "minimax_cn_coding_plan";
|
|
147
|
+
readonly minimax_coding_plan: "minimax_coding_plan";
|
|
148
|
+
readonly mira: "mira";
|
|
149
|
+
readonly mixlayer: "mixlayer";
|
|
150
|
+
readonly moark: "moark";
|
|
151
|
+
readonly modal: "modal";
|
|
152
|
+
readonly model_oracle_ai: "model_oracle_ai";
|
|
153
|
+
readonly modelscope: "modelscope";
|
|
154
|
+
readonly moonshotai: "moonshotai";
|
|
155
|
+
readonly moonshotai_cn: "moonshotai_cn";
|
|
156
|
+
readonly morph: "morph";
|
|
157
|
+
readonly nanogpt: "nanogpt";
|
|
158
|
+
readonly ncompass: "ncompass";
|
|
159
|
+
readonly nearai: "nearai";
|
|
160
|
+
readonly nebius: "nebius";
|
|
161
|
+
readonly neon: "neon";
|
|
162
|
+
readonly neuralwatt: "neuralwatt";
|
|
163
|
+
readonly nextbit: "nextbit";
|
|
164
|
+
readonly nlp_cloud: "nlp_cloud";
|
|
165
|
+
readonly nous_research: "nous_research";
|
|
166
|
+
readonly novita: "novita";
|
|
167
|
+
readonly nscale: "nscale";
|
|
168
|
+
readonly nvidia_nim: "nvidia_nim";
|
|
169
|
+
readonly oci: "oci";
|
|
170
|
+
readonly ofox: "ofox";
|
|
171
|
+
readonly ohmygpt: "ohmygpt";
|
|
172
|
+
readonly ollama_cloud: "ollama_cloud";
|
|
173
|
+
readonly openaimax: "openaimax";
|
|
174
|
+
readonly openaisb: "openaisb";
|
|
175
|
+
readonly opencode: "opencode";
|
|
176
|
+
readonly opencode_go: "opencode_go";
|
|
177
|
+
readonly opencode_zen: "opencode_zen";
|
|
178
|
+
readonly orcarouter: "orcarouter";
|
|
179
|
+
readonly ovhcloud: "ovhcloud";
|
|
180
|
+
readonly parasail: "parasail";
|
|
181
|
+
readonly perfxcloud: "perfxcloud";
|
|
182
|
+
readonly perplexity: "perplexity";
|
|
183
|
+
readonly perplexity_agent: "perplexity_agent";
|
|
184
|
+
readonly petals: "petals";
|
|
185
|
+
readonly pinstripes: "pinstripes";
|
|
186
|
+
readonly pioneer: "pioneer";
|
|
187
|
+
readonly poe: "poe";
|
|
188
|
+
readonly poolside: "poolside";
|
|
189
|
+
readonly portkey: "portkey";
|
|
190
|
+
readonly ppinfra: "ppinfra";
|
|
191
|
+
readonly predibase: "predibase";
|
|
192
|
+
readonly privatemode_ai: "privatemode_ai";
|
|
193
|
+
readonly publicai: "publicai";
|
|
194
|
+
readonly qihang_ai: "qihang_ai";
|
|
195
|
+
readonly qihoo360: "qihoo360";
|
|
196
|
+
readonly qiniu_ai: "qiniu_ai";
|
|
197
|
+
readonly regolo_ai: "regolo_ai";
|
|
198
|
+
readonly reka_ai: "reka_ai";
|
|
199
|
+
readonly requesty: "requesty";
|
|
200
|
+
readonly reve: "reve";
|
|
201
|
+
readonly routing_run: "routing_run";
|
|
202
|
+
readonly sakana: "sakana";
|
|
203
|
+
readonly sambanova: "sambanova";
|
|
204
|
+
readonly sarvam: "sarvam";
|
|
205
|
+
readonly scaleway: "scaleway";
|
|
206
|
+
readonly scx_ai: "scx_ai";
|
|
207
|
+
readonly siliconflow: "siliconflow";
|
|
208
|
+
readonly snowflake: "snowflake";
|
|
209
|
+
readonly snowflake_cortex: "snowflake_cortex";
|
|
210
|
+
readonly stackit: "stackit";
|
|
211
|
+
readonly stepfun: "stepfun";
|
|
212
|
+
readonly stepfun_ai_step_plan: "stepfun_ai_step_plan";
|
|
213
|
+
readonly stepfun_step_plan: "stepfun_step_plan";
|
|
214
|
+
readonly subconscious: "subconscious";
|
|
215
|
+
readonly submodel: "submodel";
|
|
216
|
+
readonly synthetic: "synthetic";
|
|
217
|
+
readonly tencent: "tencent";
|
|
218
|
+
readonly tencent_coding_plan: "tencent_coding_plan";
|
|
219
|
+
readonly tencent_token_plan: "tencent_token_plan";
|
|
220
|
+
readonly tencent_token_plan_enterprise_auto: "tencent_token_plan_enterprise_auto";
|
|
221
|
+
readonly tencent_token_plan_enterprise_pro: "tencent_token_plan_enterprise_pro";
|
|
222
|
+
readonly tencent_token_plan_general_personal: "tencent_token_plan_general_personal";
|
|
223
|
+
readonly tencent_token_plan_hy_personal: "tencent_token_plan_hy_personal";
|
|
224
|
+
readonly tencent_tokenhub: "tencent_tokenhub";
|
|
225
|
+
readonly tensormesh: "tensormesh";
|
|
226
|
+
readonly the_grid_ai: "the_grid_ai";
|
|
227
|
+
readonly thinkingmachines: "thinkingmachines";
|
|
228
|
+
readonly tinfoil: "tinfoil";
|
|
229
|
+
readonly togetherai: "togetherai";
|
|
230
|
+
readonly tokenflux: "tokenflux";
|
|
231
|
+
readonly tokenpony: "tokenpony";
|
|
232
|
+
readonly trustedrouter: "trustedrouter";
|
|
233
|
+
readonly tundra: "tundra";
|
|
234
|
+
readonly umans_ai: "umans_ai";
|
|
235
|
+
readonly unorouter: "unorouter";
|
|
236
|
+
readonly upstage: "upstage";
|
|
237
|
+
readonly v0: "v0";
|
|
238
|
+
readonly venice: "venice";
|
|
239
|
+
readonly vercel: "vercel";
|
|
240
|
+
readonly vivgrid: "vivgrid";
|
|
241
|
+
readonly volc_engine: "volc_engine";
|
|
242
|
+
readonly vultr: "vultr";
|
|
243
|
+
readonly wafer: "wafer";
|
|
244
|
+
readonly wandb: "wandb";
|
|
245
|
+
readonly xiaomi_token_plan_ams: "xiaomi_token_plan_ams";
|
|
246
|
+
readonly xiaomi_token_plan_cn: "xiaomi_token_plan_cn";
|
|
247
|
+
readonly xiaomi_token_plan_sgp: "xiaomi_token_plan_sgp";
|
|
248
|
+
readonly xiaomimimo: "xiaomimimo";
|
|
249
|
+
readonly xpersona: "xpersona";
|
|
250
|
+
readonly xunfei: "xunfei";
|
|
251
|
+
readonly zai: "zai";
|
|
252
|
+
readonly zai_coding_plan: "zai_coding_plan";
|
|
253
|
+
readonly zeldoc: "zeldoc";
|
|
254
|
+
readonly zenmux: "zenmux";
|
|
255
|
+
readonly zhipu_v4: "zhipu_v4";
|
|
256
|
+
readonly zhipuai_coding_plan: "zhipuai_coding_plan";
|
|
257
|
+
};
|
|
258
|
+
export type ProviderName = typeof ProviderName[keyof typeof ProviderName];
|