llm-strings 1.1.2 → 1.3.0
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/README.md +115 -45
- package/dist/ai-sdk.cjs +1177 -0
- package/dist/ai-sdk.cjs.map +1 -0
- package/dist/ai-sdk.d.cts +28 -0
- package/dist/ai-sdk.d.ts +28 -0
- package/dist/ai-sdk.js +544 -0
- package/dist/ai-sdk.js.map +1 -0
- package/dist/{chunk-UYMVUTLV.js → chunk-7HE4RH6X.js} +5 -9
- package/dist/chunk-7HE4RH6X.js.map +1 -0
- package/dist/{chunk-MPIHGH6L.js → chunk-NZR5DUX5.js} +5 -4
- package/dist/chunk-NZR5DUX5.js.map +1 -0
- package/dist/chunk-OCJX4QFJ.js +1044 -0
- package/dist/chunk-OCJX4QFJ.js.map +1 -0
- package/dist/{chunk-FCEV23OT.js → chunk-TQJ2ABCT.js} +9 -3
- package/dist/chunk-TQJ2ABCT.js.map +1 -0
- package/dist/index.cjs +760 -87
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +9 -4
- package/dist/normalize.cjs +176 -5
- package/dist/normalize.cjs.map +1 -1
- package/dist/normalize.d.cts +1 -1
- package/dist/normalize.d.ts +2 -2
- package/dist/normalize.js +2 -2
- package/dist/parse.cjs +100 -2
- package/dist/parse.cjs.map +1 -1
- package/dist/parse.d.cts +5 -1
- package/dist/parse.d.ts +5 -1
- package/dist/parse.js +2 -1
- package/dist/{provider-core-DinpG40u.d.cts → provider-core-B934MuhJ.d.cts} +21 -2
- package/dist/{provider-core-DinpG40u.d.ts → provider-core-B934MuhJ.d.ts} +21 -2
- package/dist/providers.cjs +1396 -114
- package/dist/providers.cjs.map +1 -1
- package/dist/providers.d.cts +2 -2
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +672 -61
- package/dist/providers.js.map +1 -1
- package/dist/validate.cjs +750 -82
- package/dist/validate.cjs.map +1 -1
- package/dist/validate.js +4 -4
- package/package.json +13 -3
- package/dist/chunk-FCEV23OT.js.map +0 -1
- package/dist/chunk-MPIHGH6L.js.map +0 -1
- package/dist/chunk-UYMVUTLV.js.map +0 -1
- package/dist/chunk-XID353H7.js +0 -370
- package/dist/chunk-XID353H7.js.map +0 -1
package/dist/providers.cjs
CHANGED
|
@@ -25,6 +25,7 @@ __export(providers_exports, {
|
|
|
25
25
|
CACHE_VALUES: () => CACHE_VALUES,
|
|
26
26
|
CANONICAL_PARAM_SPECS: () => CANONICAL_PARAM_SPECS,
|
|
27
27
|
DURATION_RE: () => DURATION_RE,
|
|
28
|
+
HOST_ALIASES: () => HOST_ALIASES,
|
|
28
29
|
MODELS: () => MODELS,
|
|
29
30
|
PARAM_SPECS: () => PARAM_SPECS,
|
|
30
31
|
PROVIDER_META: () => PROVIDER_META,
|
|
@@ -36,15 +37,160 @@ __export(providers_exports, {
|
|
|
36
37
|
detectGatewaySubProvider: () => detectGatewaySubProvider,
|
|
37
38
|
detectProvider: () => detectProvider,
|
|
38
39
|
isGatewayProvider: () => isGatewayProvider,
|
|
39
|
-
isReasoningModel: () => isReasoningModel
|
|
40
|
+
isReasoningModel: () => isReasoningModel,
|
|
41
|
+
providerFromHostAlias: () => providerFromHostAlias,
|
|
42
|
+
resolveHostAlias: () => resolveHostAlias
|
|
40
43
|
});
|
|
41
44
|
module.exports = __toCommonJS(providers_exports);
|
|
42
45
|
|
|
43
46
|
// src/provider-core.ts
|
|
47
|
+
function hasOwn(object, key) {
|
|
48
|
+
return Object.prototype.hasOwnProperty.call(object, key);
|
|
49
|
+
}
|
|
50
|
+
var HOST_ALIASES = {
|
|
51
|
+
openai: "api.openai.com",
|
|
52
|
+
azure: "models.inference.ai.azure.com",
|
|
53
|
+
anthropic: "api.anthropic.com",
|
|
54
|
+
google: "generativelanguage.googleapis.com",
|
|
55
|
+
"google-vertex": "aiplatform.googleapis.com",
|
|
56
|
+
aistudio: "generativelanguage.googleapis.com",
|
|
57
|
+
mistral: "api.mistral.ai",
|
|
58
|
+
cohere: "api.cohere.com",
|
|
59
|
+
bedrock: "bedrock-runtime.us-east-1.amazonaws.com",
|
|
60
|
+
openrouter: "openrouter.ai",
|
|
61
|
+
vercel: "gateway.ai.vercel.app",
|
|
62
|
+
alibaba: "dashscope-intl.aliyuncs.com",
|
|
63
|
+
alibabacloud: "dashscope-intl.aliyuncs.com",
|
|
64
|
+
dashscope: "dashscope-intl.aliyuncs.com",
|
|
65
|
+
groq: "api.groq.com",
|
|
66
|
+
fal: "fal.run",
|
|
67
|
+
fireworks: "api.fireworks.ai",
|
|
68
|
+
fireworksai: "api.fireworks.ai",
|
|
69
|
+
"black-forest-labs": "api.bfl.ai",
|
|
70
|
+
bfl: "api.bfl.ai",
|
|
71
|
+
deepseek: "api.deepseek.com",
|
|
72
|
+
moonshotai: "api.moonshot.ai",
|
|
73
|
+
moonshot: "api.moonshot.ai",
|
|
74
|
+
perplexity: "api.perplexity.ai",
|
|
75
|
+
venice: "api.venice.ai",
|
|
76
|
+
parasail: "api.parasail.io",
|
|
77
|
+
deepinfra: "api.deepinfra.com",
|
|
78
|
+
atlascloud: "api.atlascloud.ai",
|
|
79
|
+
novita: "api.novita.ai",
|
|
80
|
+
novitaai: "api.novita.ai",
|
|
81
|
+
grok: "api.x.ai",
|
|
82
|
+
xai: "api.x.ai",
|
|
83
|
+
together: "api.together.xyz",
|
|
84
|
+
togetherai: "api.together.xyz",
|
|
85
|
+
cerebras: "api.cerebras.ai",
|
|
86
|
+
replicate: "api.replicate.com",
|
|
87
|
+
prodia: "api.prodia.com",
|
|
88
|
+
luma: "api.lumalabs.ai",
|
|
89
|
+
bytedance: "ark.cn-beijing.volces.com",
|
|
90
|
+
kling: "api.klingai.com",
|
|
91
|
+
elevenlabs: "api.elevenlabs.io",
|
|
92
|
+
assemblyai: "api.assemblyai.com",
|
|
93
|
+
deepgram: "api.deepgram.com",
|
|
94
|
+
gladia: "api.gladia.io",
|
|
95
|
+
lmnt: "api.lmnt.com",
|
|
96
|
+
hume: "api.hume.ai",
|
|
97
|
+
revai: "api.rev.ai",
|
|
98
|
+
baseten: "api.baseten.co",
|
|
99
|
+
huggingface: "api-inference.huggingface.co",
|
|
100
|
+
wandb: "api.inference.wandb.ai",
|
|
101
|
+
weightsandbiases: "api.inference.wandb.ai",
|
|
102
|
+
baidu: "qianfan.baidubce.com",
|
|
103
|
+
qianfan: "qianfan.baidubce.com",
|
|
104
|
+
vertex: "aiplatform.googleapis.com",
|
|
105
|
+
xiaomi: "api.xiaomimimo.com",
|
|
106
|
+
minimax: "api.minimax.io"
|
|
107
|
+
};
|
|
108
|
+
var HOST_ALIAS_PROVIDERS = {
|
|
109
|
+
aistudio: "google",
|
|
110
|
+
vertex: "google-vertex",
|
|
111
|
+
grok: "xai",
|
|
112
|
+
bfl: "black-forest-labs",
|
|
113
|
+
moonshot: "moonshotai",
|
|
114
|
+
alibaba: "alibaba",
|
|
115
|
+
alibabacloud: "alibaba",
|
|
116
|
+
dashscope: "alibaba",
|
|
117
|
+
togetherai: "together",
|
|
118
|
+
fireworksai: "fireworks"
|
|
119
|
+
};
|
|
120
|
+
function readProcessEnv() {
|
|
121
|
+
return typeof process !== "undefined" && process.env ? process.env : {};
|
|
122
|
+
}
|
|
123
|
+
function normalizeHostValue(value) {
|
|
124
|
+
const trimmed = value.trim();
|
|
125
|
+
if (!trimmed) return trimmed;
|
|
126
|
+
try {
|
|
127
|
+
if (trimmed.includes("://")) {
|
|
128
|
+
return new URL(trimmed).host;
|
|
129
|
+
}
|
|
130
|
+
} catch {
|
|
131
|
+
}
|
|
132
|
+
return trimmed.replace(/^\/\//, "").split("/")[0] ?? trimmed;
|
|
133
|
+
}
|
|
134
|
+
function envHostOverride(alias, env) {
|
|
135
|
+
const upper = alias.toUpperCase();
|
|
136
|
+
const override = env[`LLM_STRINGS_${upper}_HOST`] ?? env[`LLM_STRINGS_HOST_${upper}`];
|
|
137
|
+
return override?.trim() ? override : void 0;
|
|
138
|
+
}
|
|
139
|
+
function resolveHostAlias(host, env = readProcessEnv()) {
|
|
140
|
+
const normalizedHost = host.toLowerCase();
|
|
141
|
+
if (!hasOwn(HOST_ALIASES, normalizedHost)) {
|
|
142
|
+
return { host };
|
|
143
|
+
}
|
|
144
|
+
const alias = normalizedHost;
|
|
145
|
+
const override = envHostOverride(alias, env);
|
|
146
|
+
return {
|
|
147
|
+
host: normalizeHostValue(override ?? HOST_ALIASES[alias]),
|
|
148
|
+
alias
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function providerFromHostAlias(alias) {
|
|
152
|
+
const normalizedAlias = alias.toLowerCase();
|
|
153
|
+
if (hasOwn(PROVIDER_PARAMS, normalizedAlias)) {
|
|
154
|
+
return normalizedAlias;
|
|
155
|
+
}
|
|
156
|
+
if (hasOwn(HOST_ALIAS_PROVIDERS, normalizedAlias)) {
|
|
157
|
+
return HOST_ALIAS_PROVIDERS[normalizedAlias];
|
|
158
|
+
}
|
|
159
|
+
return void 0;
|
|
160
|
+
}
|
|
44
161
|
function detectProvider(host) {
|
|
162
|
+
host = host.toLowerCase();
|
|
45
163
|
if (host.includes("openrouter")) return "openrouter";
|
|
46
164
|
if (host.includes("gateway.ai.vercel")) return "vercel";
|
|
47
165
|
if (host.includes("amazonaws") || host.includes("bedrock")) return "bedrock";
|
|
166
|
+
if (host.includes("aiplatform.googleapis")) return "google-vertex";
|
|
167
|
+
if (host.includes("api.x.ai")) return "xai";
|
|
168
|
+
if (host.includes("groq")) return "groq";
|
|
169
|
+
if (host.includes("fal.run") || host.includes("fal.ai")) return "fal";
|
|
170
|
+
if (host.includes("deepinfra")) return "deepinfra";
|
|
171
|
+
if (host.includes("bfl.ai")) return "black-forest-labs";
|
|
172
|
+
if (host.includes("together")) return "together";
|
|
173
|
+
if (host.includes("fireworks")) return "fireworks";
|
|
174
|
+
if (host.includes("deepseek")) return "deepseek";
|
|
175
|
+
if (host.includes("moonshot")) return "moonshotai";
|
|
176
|
+
if (host.includes("perplexity")) return "perplexity";
|
|
177
|
+
if (host.includes("dashscope") || host.includes("aliyuncs")) return "alibaba";
|
|
178
|
+
if (host.includes("cerebras")) return "cerebras";
|
|
179
|
+
if (host.includes("replicate")) return "replicate";
|
|
180
|
+
if (host.includes("prodia")) return "prodia";
|
|
181
|
+
if (host.includes("lumalabs") || host.includes("luma")) return "luma";
|
|
182
|
+
if (host.includes("volces") || host.includes("bytedance")) return "bytedance";
|
|
183
|
+
if (host.includes("kling")) return "kling";
|
|
184
|
+
if (host.includes("elevenlabs")) return "elevenlabs";
|
|
185
|
+
if (host.includes("assemblyai")) return "assemblyai";
|
|
186
|
+
if (host.includes("deepgram")) return "deepgram";
|
|
187
|
+
if (host.includes("gladia")) return "gladia";
|
|
188
|
+
if (host.includes("lmnt")) return "lmnt";
|
|
189
|
+
if (host.includes("hume")) return "hume";
|
|
190
|
+
if (host.includes("rev.ai")) return "revai";
|
|
191
|
+
if (host.includes("baseten")) return "baseten";
|
|
192
|
+
if (host.includes("huggingface")) return "huggingface";
|
|
193
|
+
if (host.includes("azure")) return "azure";
|
|
48
194
|
if (host.includes("openai")) return "openai";
|
|
49
195
|
if (host.includes("anthropic") || host.includes("claude")) return "anthropic";
|
|
50
196
|
if (host.includes("googleapis") || host.includes("google")) return "google";
|
|
@@ -99,6 +245,33 @@ var ALIASES = {
|
|
|
99
245
|
cachePoint: "cache",
|
|
100
246
|
cache_point: "cache"
|
|
101
247
|
};
|
|
248
|
+
var OPENAI_COMPATIBLE_PARAMS = {
|
|
249
|
+
temperature: "temperature",
|
|
250
|
+
max_tokens: "max_tokens",
|
|
251
|
+
top_p: "top_p",
|
|
252
|
+
top_k: "top_k",
|
|
253
|
+
frequency_penalty: "frequency_penalty",
|
|
254
|
+
presence_penalty: "presence_penalty",
|
|
255
|
+
stop: "stop",
|
|
256
|
+
n: "n",
|
|
257
|
+
seed: "seed",
|
|
258
|
+
stream: "stream",
|
|
259
|
+
effort: "reasoning_effort"
|
|
260
|
+
};
|
|
261
|
+
var GOOGLE_COMPATIBLE_PARAMS = {
|
|
262
|
+
temperature: "temperature",
|
|
263
|
+
max_tokens: "maxOutputTokens",
|
|
264
|
+
top_p: "topP",
|
|
265
|
+
top_k: "topK",
|
|
266
|
+
frequency_penalty: "frequencyPenalty",
|
|
267
|
+
presence_penalty: "presencePenalty",
|
|
268
|
+
stop: "stopSequences",
|
|
269
|
+
n: "candidateCount",
|
|
270
|
+
stream: "stream",
|
|
271
|
+
seed: "seed",
|
|
272
|
+
responseMimeType: "responseMimeType",
|
|
273
|
+
responseSchema: "responseSchema"
|
|
274
|
+
};
|
|
102
275
|
var PROVIDER_PARAMS = {
|
|
103
276
|
openai: {
|
|
104
277
|
temperature: "temperature",
|
|
@@ -112,6 +285,7 @@ var PROVIDER_PARAMS = {
|
|
|
112
285
|
stream: "stream",
|
|
113
286
|
effort: "reasoning_effort"
|
|
114
287
|
},
|
|
288
|
+
azure: OPENAI_COMPATIBLE_PARAMS,
|
|
115
289
|
anthropic: {
|
|
116
290
|
temperature: "temperature",
|
|
117
291
|
max_tokens: "max_tokens",
|
|
@@ -137,6 +311,7 @@ var PROVIDER_PARAMS = {
|
|
|
137
311
|
responseMimeType: "responseMimeType",
|
|
138
312
|
responseSchema: "responseSchema"
|
|
139
313
|
},
|
|
314
|
+
"google-vertex": GOOGLE_COMPATIBLE_PARAMS,
|
|
140
315
|
mistral: {
|
|
141
316
|
temperature: "temperature",
|
|
142
317
|
max_tokens: "max_tokens",
|
|
@@ -200,15 +375,175 @@ var PROVIDER_PARAMS = {
|
|
|
200
375
|
seed: "seed",
|
|
201
376
|
stream: "stream",
|
|
202
377
|
effort: "reasoning_effort"
|
|
378
|
+
},
|
|
379
|
+
xai: OPENAI_COMPATIBLE_PARAMS,
|
|
380
|
+
groq: OPENAI_COMPATIBLE_PARAMS,
|
|
381
|
+
fal: {},
|
|
382
|
+
deepinfra: OPENAI_COMPATIBLE_PARAMS,
|
|
383
|
+
"black-forest-labs": {},
|
|
384
|
+
together: OPENAI_COMPATIBLE_PARAMS,
|
|
385
|
+
fireworks: OPENAI_COMPATIBLE_PARAMS,
|
|
386
|
+
deepseek: OPENAI_COMPATIBLE_PARAMS,
|
|
387
|
+
moonshotai: OPENAI_COMPATIBLE_PARAMS,
|
|
388
|
+
perplexity: OPENAI_COMPATIBLE_PARAMS,
|
|
389
|
+
alibaba: OPENAI_COMPATIBLE_PARAMS,
|
|
390
|
+
cerebras: OPENAI_COMPATIBLE_PARAMS,
|
|
391
|
+
replicate: {},
|
|
392
|
+
prodia: {},
|
|
393
|
+
luma: {},
|
|
394
|
+
bytedance: {},
|
|
395
|
+
kling: {},
|
|
396
|
+
elevenlabs: {},
|
|
397
|
+
assemblyai: {},
|
|
398
|
+
deepgram: {},
|
|
399
|
+
gladia: {},
|
|
400
|
+
lmnt: {},
|
|
401
|
+
hume: {},
|
|
402
|
+
revai: {},
|
|
403
|
+
baseten: OPENAI_COMPATIBLE_PARAMS,
|
|
404
|
+
huggingface: OPENAI_COMPATIBLE_PARAMS
|
|
405
|
+
};
|
|
406
|
+
var OPENAI_COMPATIBLE_PARAM_SPECS = {
|
|
407
|
+
temperature: {
|
|
408
|
+
type: "number",
|
|
409
|
+
min: 0,
|
|
410
|
+
max: 2,
|
|
411
|
+
default: 0.7,
|
|
412
|
+
description: "Controls randomness"
|
|
413
|
+
},
|
|
414
|
+
max_tokens: {
|
|
415
|
+
type: "number",
|
|
416
|
+
min: 1,
|
|
417
|
+
default: 4096,
|
|
418
|
+
description: "Maximum output tokens"
|
|
419
|
+
},
|
|
420
|
+
top_p: {
|
|
421
|
+
type: "number",
|
|
422
|
+
min: 0,
|
|
423
|
+
max: 1,
|
|
424
|
+
default: 1,
|
|
425
|
+
description: "Nucleus sampling"
|
|
426
|
+
},
|
|
427
|
+
top_k: {
|
|
428
|
+
type: "number",
|
|
429
|
+
min: 0,
|
|
430
|
+
default: 40,
|
|
431
|
+
description: "Top-K sampling"
|
|
432
|
+
},
|
|
433
|
+
frequency_penalty: {
|
|
434
|
+
type: "number",
|
|
435
|
+
min: -2,
|
|
436
|
+
max: 2,
|
|
437
|
+
default: 0,
|
|
438
|
+
description: "Penalize frequent tokens"
|
|
439
|
+
},
|
|
440
|
+
presence_penalty: {
|
|
441
|
+
type: "number",
|
|
442
|
+
min: -2,
|
|
443
|
+
max: 2,
|
|
444
|
+
default: 0,
|
|
445
|
+
description: "Penalize repeated topics"
|
|
446
|
+
},
|
|
447
|
+
stop: { type: "string", description: "Stop sequences" },
|
|
448
|
+
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
449
|
+
seed: { type: "number", description: "Random seed" },
|
|
450
|
+
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
451
|
+
reasoning_effort: {
|
|
452
|
+
type: "string",
|
|
453
|
+
values: ["none", "minimal", "low", "medium", "high", "xhigh"],
|
|
454
|
+
default: "medium",
|
|
455
|
+
description: "Reasoning effort"
|
|
203
456
|
}
|
|
204
457
|
};
|
|
458
|
+
var GOOGLE_COMPATIBLE_PARAM_SPECS = {
|
|
459
|
+
temperature: {
|
|
460
|
+
type: "number",
|
|
461
|
+
min: 0,
|
|
462
|
+
max: 2,
|
|
463
|
+
default: 0.7,
|
|
464
|
+
description: "Controls randomness"
|
|
465
|
+
},
|
|
466
|
+
maxOutputTokens: {
|
|
467
|
+
type: "number",
|
|
468
|
+
min: 1,
|
|
469
|
+
default: 4096,
|
|
470
|
+
description: "Maximum output tokens"
|
|
471
|
+
},
|
|
472
|
+
topP: {
|
|
473
|
+
type: "number",
|
|
474
|
+
min: 0,
|
|
475
|
+
max: 1,
|
|
476
|
+
default: 1,
|
|
477
|
+
description: "Nucleus sampling"
|
|
478
|
+
},
|
|
479
|
+
topK: {
|
|
480
|
+
type: "number",
|
|
481
|
+
min: 0,
|
|
482
|
+
default: 40,
|
|
483
|
+
description: "Top-K sampling"
|
|
484
|
+
},
|
|
485
|
+
frequencyPenalty: {
|
|
486
|
+
type: "number",
|
|
487
|
+
min: -2,
|
|
488
|
+
max: 2,
|
|
489
|
+
default: 0,
|
|
490
|
+
description: "Penalize frequent tokens"
|
|
491
|
+
},
|
|
492
|
+
presencePenalty: {
|
|
493
|
+
type: "number",
|
|
494
|
+
min: -2,
|
|
495
|
+
max: 2,
|
|
496
|
+
default: 0,
|
|
497
|
+
description: "Penalize repeated topics"
|
|
498
|
+
},
|
|
499
|
+
stopSequences: { type: "string", description: "Stop sequences" },
|
|
500
|
+
candidateCount: {
|
|
501
|
+
type: "number",
|
|
502
|
+
min: 1,
|
|
503
|
+
default: 1,
|
|
504
|
+
description: "Candidate count"
|
|
505
|
+
},
|
|
506
|
+
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
507
|
+
seed: { type: "number", description: "Random seed" },
|
|
508
|
+
responseMimeType: { type: "string", description: "Response MIME type" },
|
|
509
|
+
responseSchema: { type: "string", description: "Response schema" }
|
|
510
|
+
};
|
|
205
511
|
var PARAM_SPECS = {
|
|
206
512
|
openai: {
|
|
207
|
-
temperature: {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
513
|
+
temperature: {
|
|
514
|
+
type: "number",
|
|
515
|
+
min: 0,
|
|
516
|
+
max: 2,
|
|
517
|
+
default: 0.7,
|
|
518
|
+
description: "Controls randomness"
|
|
519
|
+
},
|
|
520
|
+
max_tokens: {
|
|
521
|
+
type: "number",
|
|
522
|
+
min: 1,
|
|
523
|
+
default: 4096,
|
|
524
|
+
description: "Maximum output tokens"
|
|
525
|
+
},
|
|
526
|
+
top_p: {
|
|
527
|
+
type: "number",
|
|
528
|
+
min: 0,
|
|
529
|
+
max: 1,
|
|
530
|
+
default: 1,
|
|
531
|
+
description: "Nucleus sampling"
|
|
532
|
+
},
|
|
533
|
+
frequency_penalty: {
|
|
534
|
+
type: "number",
|
|
535
|
+
min: -2,
|
|
536
|
+
max: 2,
|
|
537
|
+
default: 0,
|
|
538
|
+
description: "Penalize frequent tokens"
|
|
539
|
+
},
|
|
540
|
+
presence_penalty: {
|
|
541
|
+
type: "number",
|
|
542
|
+
min: -2,
|
|
543
|
+
max: 2,
|
|
544
|
+
default: 0,
|
|
545
|
+
description: "Penalize repeated topics"
|
|
546
|
+
},
|
|
212
547
|
stop: { type: "string", description: "Stop sequences" },
|
|
213
548
|
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
214
549
|
seed: { type: "number", description: "Random seed" },
|
|
@@ -220,74 +555,291 @@ var PARAM_SPECS = {
|
|
|
220
555
|
description: "Reasoning effort"
|
|
221
556
|
}
|
|
222
557
|
},
|
|
558
|
+
azure: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
223
559
|
anthropic: {
|
|
224
|
-
temperature: {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
560
|
+
temperature: {
|
|
561
|
+
type: "number",
|
|
562
|
+
min: 0,
|
|
563
|
+
max: 1,
|
|
564
|
+
default: 0.7,
|
|
565
|
+
description: "Controls randomness"
|
|
566
|
+
},
|
|
567
|
+
max_tokens: {
|
|
568
|
+
type: "number",
|
|
569
|
+
min: 1,
|
|
570
|
+
default: 4096,
|
|
571
|
+
description: "Maximum output tokens"
|
|
572
|
+
},
|
|
573
|
+
top_p: {
|
|
574
|
+
type: "number",
|
|
575
|
+
min: 0,
|
|
576
|
+
max: 1,
|
|
577
|
+
default: 1,
|
|
578
|
+
description: "Nucleus sampling"
|
|
579
|
+
},
|
|
580
|
+
top_k: {
|
|
581
|
+
type: "number",
|
|
582
|
+
min: 0,
|
|
583
|
+
default: 40,
|
|
584
|
+
description: "Top-K sampling"
|
|
585
|
+
},
|
|
228
586
|
stop_sequences: { type: "string", description: "Stop sequences" },
|
|
229
587
|
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
230
|
-
effort: {
|
|
231
|
-
|
|
232
|
-
|
|
588
|
+
effort: {
|
|
589
|
+
type: "string",
|
|
590
|
+
values: ["low", "medium", "high", "max"],
|
|
591
|
+
default: "medium",
|
|
592
|
+
description: "Thinking effort"
|
|
593
|
+
},
|
|
594
|
+
cache_control: {
|
|
595
|
+
type: "string",
|
|
596
|
+
values: ["ephemeral"],
|
|
597
|
+
default: "ephemeral",
|
|
598
|
+
description: "Cache control"
|
|
599
|
+
},
|
|
600
|
+
cache_ttl: {
|
|
601
|
+
type: "string",
|
|
602
|
+
values: ["5m", "1h"],
|
|
603
|
+
default: "5m",
|
|
604
|
+
description: "Cache TTL"
|
|
605
|
+
}
|
|
233
606
|
},
|
|
234
607
|
google: {
|
|
235
|
-
temperature: {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
608
|
+
temperature: {
|
|
609
|
+
type: "number",
|
|
610
|
+
min: 0,
|
|
611
|
+
max: 2,
|
|
612
|
+
default: 0.7,
|
|
613
|
+
description: "Controls randomness"
|
|
614
|
+
},
|
|
615
|
+
maxOutputTokens: {
|
|
616
|
+
type: "number",
|
|
617
|
+
min: 1,
|
|
618
|
+
default: 4096,
|
|
619
|
+
description: "Maximum output tokens"
|
|
620
|
+
},
|
|
621
|
+
topP: {
|
|
622
|
+
type: "number",
|
|
623
|
+
min: 0,
|
|
624
|
+
max: 1,
|
|
625
|
+
default: 1,
|
|
626
|
+
description: "Nucleus sampling"
|
|
627
|
+
},
|
|
628
|
+
topK: {
|
|
629
|
+
type: "number",
|
|
630
|
+
min: 0,
|
|
631
|
+
default: 40,
|
|
632
|
+
description: "Top-K sampling"
|
|
633
|
+
},
|
|
634
|
+
frequencyPenalty: {
|
|
635
|
+
type: "number",
|
|
636
|
+
min: -2,
|
|
637
|
+
max: 2,
|
|
638
|
+
default: 0,
|
|
639
|
+
description: "Penalize frequent tokens"
|
|
640
|
+
},
|
|
641
|
+
presencePenalty: {
|
|
642
|
+
type: "number",
|
|
643
|
+
min: -2,
|
|
644
|
+
max: 2,
|
|
645
|
+
default: 0,
|
|
646
|
+
description: "Penalize repeated topics"
|
|
647
|
+
},
|
|
241
648
|
stopSequences: { type: "string", description: "Stop sequences" },
|
|
242
|
-
candidateCount: {
|
|
649
|
+
candidateCount: {
|
|
650
|
+
type: "number",
|
|
651
|
+
min: 1,
|
|
652
|
+
default: 1,
|
|
653
|
+
description: "Candidate count"
|
|
654
|
+
},
|
|
243
655
|
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
244
656
|
seed: { type: "number", description: "Random seed" },
|
|
245
657
|
responseMimeType: { type: "string", description: "Response MIME type" },
|
|
246
658
|
responseSchema: { type: "string", description: "Response schema" }
|
|
247
659
|
},
|
|
660
|
+
"google-vertex": GOOGLE_COMPATIBLE_PARAM_SPECS,
|
|
248
661
|
mistral: {
|
|
249
|
-
temperature: {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
662
|
+
temperature: {
|
|
663
|
+
type: "number",
|
|
664
|
+
min: 0,
|
|
665
|
+
max: 1,
|
|
666
|
+
default: 0.7,
|
|
667
|
+
description: "Controls randomness"
|
|
668
|
+
},
|
|
669
|
+
max_tokens: {
|
|
670
|
+
type: "number",
|
|
671
|
+
min: 1,
|
|
672
|
+
default: 4096,
|
|
673
|
+
description: "Maximum output tokens"
|
|
674
|
+
},
|
|
675
|
+
top_p: {
|
|
676
|
+
type: "number",
|
|
677
|
+
min: 0,
|
|
678
|
+
max: 1,
|
|
679
|
+
default: 1,
|
|
680
|
+
description: "Nucleus sampling"
|
|
681
|
+
},
|
|
682
|
+
frequency_penalty: {
|
|
683
|
+
type: "number",
|
|
684
|
+
min: -2,
|
|
685
|
+
max: 2,
|
|
686
|
+
default: 0,
|
|
687
|
+
description: "Penalize frequent tokens"
|
|
688
|
+
},
|
|
689
|
+
presence_penalty: {
|
|
690
|
+
type: "number",
|
|
691
|
+
min: -2,
|
|
692
|
+
max: 2,
|
|
693
|
+
default: 0,
|
|
694
|
+
description: "Penalize repeated topics"
|
|
695
|
+
},
|
|
254
696
|
stop: { type: "string", description: "Stop sequences" },
|
|
255
697
|
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
256
698
|
random_seed: { type: "number", description: "Random seed" },
|
|
257
699
|
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
258
|
-
safe_prompt: {
|
|
259
|
-
|
|
700
|
+
safe_prompt: {
|
|
701
|
+
type: "boolean",
|
|
702
|
+
default: false,
|
|
703
|
+
description: "Enable safe prompt"
|
|
704
|
+
},
|
|
705
|
+
min_tokens: {
|
|
706
|
+
type: "number",
|
|
707
|
+
min: 0,
|
|
708
|
+
default: 0,
|
|
709
|
+
description: "Minimum tokens"
|
|
710
|
+
}
|
|
260
711
|
},
|
|
261
712
|
cohere: {
|
|
262
|
-
temperature: {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
713
|
+
temperature: {
|
|
714
|
+
type: "number",
|
|
715
|
+
min: 0,
|
|
716
|
+
max: 1,
|
|
717
|
+
default: 0.7,
|
|
718
|
+
description: "Controls randomness"
|
|
719
|
+
},
|
|
720
|
+
max_tokens: {
|
|
721
|
+
type: "number",
|
|
722
|
+
min: 1,
|
|
723
|
+
default: 4096,
|
|
724
|
+
description: "Maximum output tokens"
|
|
725
|
+
},
|
|
726
|
+
p: {
|
|
727
|
+
type: "number",
|
|
728
|
+
min: 0,
|
|
729
|
+
max: 1,
|
|
730
|
+
default: 1,
|
|
731
|
+
description: "Nucleus sampling (p)"
|
|
732
|
+
},
|
|
733
|
+
k: {
|
|
734
|
+
type: "number",
|
|
735
|
+
min: 0,
|
|
736
|
+
max: 500,
|
|
737
|
+
default: 40,
|
|
738
|
+
description: "Top-K sampling (k)"
|
|
739
|
+
},
|
|
740
|
+
frequency_penalty: {
|
|
741
|
+
type: "number",
|
|
742
|
+
min: 0,
|
|
743
|
+
max: 1,
|
|
744
|
+
default: 0,
|
|
745
|
+
description: "Penalize frequent tokens"
|
|
746
|
+
},
|
|
747
|
+
presence_penalty: {
|
|
748
|
+
type: "number",
|
|
749
|
+
min: 0,
|
|
750
|
+
max: 1,
|
|
751
|
+
default: 0,
|
|
752
|
+
description: "Penalize repeated topics"
|
|
753
|
+
},
|
|
268
754
|
stop_sequences: { type: "string", description: "Stop sequences" },
|
|
269
755
|
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
270
756
|
seed: { type: "number", description: "Random seed" }
|
|
271
757
|
},
|
|
272
758
|
bedrock: {
|
|
273
759
|
// Converse API inferenceConfig params
|
|
274
|
-
temperature: {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
760
|
+
temperature: {
|
|
761
|
+
type: "number",
|
|
762
|
+
min: 0,
|
|
763
|
+
max: 1,
|
|
764
|
+
default: 0.7,
|
|
765
|
+
description: "Controls randomness"
|
|
766
|
+
},
|
|
767
|
+
maxTokens: {
|
|
768
|
+
type: "number",
|
|
769
|
+
min: 1,
|
|
770
|
+
default: 4096,
|
|
771
|
+
description: "Maximum output tokens"
|
|
772
|
+
},
|
|
773
|
+
topP: {
|
|
774
|
+
type: "number",
|
|
775
|
+
min: 0,
|
|
776
|
+
max: 1,
|
|
777
|
+
default: 1,
|
|
778
|
+
description: "Nucleus sampling"
|
|
779
|
+
},
|
|
780
|
+
topK: {
|
|
781
|
+
type: "number",
|
|
782
|
+
min: 0,
|
|
783
|
+
default: 40,
|
|
784
|
+
description: "Top-K sampling"
|
|
785
|
+
},
|
|
278
786
|
stopSequences: { type: "string", description: "Stop sequences" },
|
|
279
787
|
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
280
|
-
cache_control: {
|
|
281
|
-
|
|
788
|
+
cache_control: {
|
|
789
|
+
type: "string",
|
|
790
|
+
values: ["ephemeral"],
|
|
791
|
+
default: "ephemeral",
|
|
792
|
+
description: "Cache control"
|
|
793
|
+
},
|
|
794
|
+
cache_ttl: {
|
|
795
|
+
type: "string",
|
|
796
|
+
values: ["5m", "1h"],
|
|
797
|
+
default: "5m",
|
|
798
|
+
description: "Cache TTL"
|
|
799
|
+
}
|
|
282
800
|
},
|
|
283
801
|
openrouter: {
|
|
284
802
|
// Loose validation — proxies to many providers with varying ranges
|
|
285
|
-
temperature: {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
803
|
+
temperature: {
|
|
804
|
+
type: "number",
|
|
805
|
+
min: 0,
|
|
806
|
+
max: 2,
|
|
807
|
+
default: 0.7,
|
|
808
|
+
description: "Controls randomness"
|
|
809
|
+
},
|
|
810
|
+
max_tokens: {
|
|
811
|
+
type: "number",
|
|
812
|
+
min: 1,
|
|
813
|
+
default: 4096,
|
|
814
|
+
description: "Maximum output tokens"
|
|
815
|
+
},
|
|
816
|
+
top_p: {
|
|
817
|
+
type: "number",
|
|
818
|
+
min: 0,
|
|
819
|
+
max: 1,
|
|
820
|
+
default: 1,
|
|
821
|
+
description: "Nucleus sampling"
|
|
822
|
+
},
|
|
823
|
+
top_k: {
|
|
824
|
+
type: "number",
|
|
825
|
+
min: 0,
|
|
826
|
+
default: 40,
|
|
827
|
+
description: "Top-K sampling"
|
|
828
|
+
},
|
|
829
|
+
frequency_penalty: {
|
|
830
|
+
type: "number",
|
|
831
|
+
min: -2,
|
|
832
|
+
max: 2,
|
|
833
|
+
default: 0,
|
|
834
|
+
description: "Penalize frequent tokens"
|
|
835
|
+
},
|
|
836
|
+
presence_penalty: {
|
|
837
|
+
type: "number",
|
|
838
|
+
min: -2,
|
|
839
|
+
max: 2,
|
|
840
|
+
default: 0,
|
|
841
|
+
description: "Penalize repeated topics"
|
|
842
|
+
},
|
|
291
843
|
stop: { type: "string", description: "Stop sequences" },
|
|
292
844
|
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
293
845
|
seed: { type: "number", description: "Random seed" },
|
|
@@ -301,12 +853,46 @@ var PARAM_SPECS = {
|
|
|
301
853
|
},
|
|
302
854
|
vercel: {
|
|
303
855
|
// Loose validation — proxies to many providers with varying ranges
|
|
304
|
-
temperature: {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
856
|
+
temperature: {
|
|
857
|
+
type: "number",
|
|
858
|
+
min: 0,
|
|
859
|
+
max: 2,
|
|
860
|
+
default: 0.7,
|
|
861
|
+
description: "Controls randomness"
|
|
862
|
+
},
|
|
863
|
+
max_tokens: {
|
|
864
|
+
type: "number",
|
|
865
|
+
min: 1,
|
|
866
|
+
default: 4096,
|
|
867
|
+
description: "Maximum output tokens"
|
|
868
|
+
},
|
|
869
|
+
top_p: {
|
|
870
|
+
type: "number",
|
|
871
|
+
min: 0,
|
|
872
|
+
max: 1,
|
|
873
|
+
default: 1,
|
|
874
|
+
description: "Nucleus sampling"
|
|
875
|
+
},
|
|
876
|
+
top_k: {
|
|
877
|
+
type: "number",
|
|
878
|
+
min: 0,
|
|
879
|
+
default: 40,
|
|
880
|
+
description: "Top-K sampling"
|
|
881
|
+
},
|
|
882
|
+
frequency_penalty: {
|
|
883
|
+
type: "number",
|
|
884
|
+
min: -2,
|
|
885
|
+
max: 2,
|
|
886
|
+
default: 0,
|
|
887
|
+
description: "Penalize frequent tokens"
|
|
888
|
+
},
|
|
889
|
+
presence_penalty: {
|
|
890
|
+
type: "number",
|
|
891
|
+
min: -2,
|
|
892
|
+
max: 2,
|
|
893
|
+
default: 0,
|
|
894
|
+
description: "Penalize repeated topics"
|
|
895
|
+
},
|
|
310
896
|
stop: { type: "string", description: "Stop sequences" },
|
|
311
897
|
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
312
898
|
seed: { type: "number", description: "Random seed" },
|
|
@@ -317,7 +903,33 @@ var PARAM_SPECS = {
|
|
|
317
903
|
default: "medium",
|
|
318
904
|
description: "Reasoning effort"
|
|
319
905
|
}
|
|
320
|
-
}
|
|
906
|
+
},
|
|
907
|
+
xai: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
908
|
+
groq: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
909
|
+
fal: {},
|
|
910
|
+
deepinfra: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
911
|
+
"black-forest-labs": {},
|
|
912
|
+
together: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
913
|
+
fireworks: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
914
|
+
deepseek: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
915
|
+
moonshotai: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
916
|
+
perplexity: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
917
|
+
alibaba: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
918
|
+
cerebras: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
919
|
+
replicate: {},
|
|
920
|
+
prodia: {},
|
|
921
|
+
luma: {},
|
|
922
|
+
bytedance: {},
|
|
923
|
+
kling: {},
|
|
924
|
+
elevenlabs: {},
|
|
925
|
+
assemblyai: {},
|
|
926
|
+
deepgram: {},
|
|
927
|
+
gladia: {},
|
|
928
|
+
lmnt: {},
|
|
929
|
+
hume: {},
|
|
930
|
+
revai: {},
|
|
931
|
+
baseten: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
932
|
+
huggingface: OPENAI_COMPATIBLE_PARAM_SPECS
|
|
321
933
|
};
|
|
322
934
|
function isReasoningModel(model) {
|
|
323
935
|
const name = model.includes("/") ? model.split("/").pop() : model;
|
|
@@ -333,7 +945,13 @@ function detectGatewaySubProvider(model) {
|
|
|
333
945
|
const slash = model.indexOf("/");
|
|
334
946
|
if (slash < 1) return void 0;
|
|
335
947
|
const prefix = model.slice(0, slash);
|
|
336
|
-
const direct = [
|
|
948
|
+
const direct = [
|
|
949
|
+
"openai",
|
|
950
|
+
"anthropic",
|
|
951
|
+
"google",
|
|
952
|
+
"mistral",
|
|
953
|
+
"cohere"
|
|
954
|
+
];
|
|
337
955
|
return direct.find((p) => p === prefix);
|
|
338
956
|
}
|
|
339
957
|
var REASONING_MODEL_UNSUPPORTED = /* @__PURE__ */ new Set([
|
|
@@ -368,41 +986,240 @@ function bedrockSupportsCaching(model) {
|
|
|
368
986
|
var CACHE_VALUES = {
|
|
369
987
|
openai: void 0,
|
|
370
988
|
// OpenAI auto-caches; no explicit param
|
|
989
|
+
azure: void 0,
|
|
371
990
|
anthropic: "ephemeral",
|
|
372
991
|
google: void 0,
|
|
373
992
|
// Google uses explicit caching API, not a param
|
|
993
|
+
"google-vertex": void 0,
|
|
374
994
|
mistral: void 0,
|
|
375
995
|
cohere: void 0,
|
|
376
996
|
bedrock: "ephemeral",
|
|
377
997
|
// Supported for Claude models on Bedrock
|
|
378
998
|
openrouter: void 0,
|
|
379
999
|
// Depends on underlying provider
|
|
380
|
-
vercel: void 0
|
|
1000
|
+
vercel: void 0,
|
|
381
1001
|
// Depends on underlying provider
|
|
1002
|
+
xai: void 0,
|
|
1003
|
+
groq: void 0,
|
|
1004
|
+
fal: void 0,
|
|
1005
|
+
deepinfra: void 0,
|
|
1006
|
+
"black-forest-labs": void 0,
|
|
1007
|
+
together: void 0,
|
|
1008
|
+
fireworks: void 0,
|
|
1009
|
+
deepseek: void 0,
|
|
1010
|
+
moonshotai: void 0,
|
|
1011
|
+
perplexity: void 0,
|
|
1012
|
+
alibaba: void 0,
|
|
1013
|
+
cerebras: void 0,
|
|
1014
|
+
replicate: void 0,
|
|
1015
|
+
prodia: void 0,
|
|
1016
|
+
luma: void 0,
|
|
1017
|
+
bytedance: void 0,
|
|
1018
|
+
kling: void 0,
|
|
1019
|
+
elevenlabs: void 0,
|
|
1020
|
+
assemblyai: void 0,
|
|
1021
|
+
deepgram: void 0,
|
|
1022
|
+
gladia: void 0,
|
|
1023
|
+
lmnt: void 0,
|
|
1024
|
+
hume: void 0,
|
|
1025
|
+
revai: void 0,
|
|
1026
|
+
baseten: void 0,
|
|
1027
|
+
huggingface: void 0
|
|
382
1028
|
};
|
|
383
1029
|
var CACHE_TTLS = {
|
|
384
1030
|
openai: void 0,
|
|
1031
|
+
azure: void 0,
|
|
385
1032
|
anthropic: ["5m", "1h"],
|
|
386
1033
|
google: void 0,
|
|
1034
|
+
"google-vertex": void 0,
|
|
387
1035
|
mistral: void 0,
|
|
388
1036
|
cohere: void 0,
|
|
389
1037
|
bedrock: ["5m", "1h"],
|
|
390
1038
|
// Claude on Bedrock uses same TTLs as direct Anthropic
|
|
391
1039
|
openrouter: void 0,
|
|
392
|
-
vercel: void 0
|
|
1040
|
+
vercel: void 0,
|
|
1041
|
+
xai: void 0,
|
|
1042
|
+
groq: void 0,
|
|
1043
|
+
fal: void 0,
|
|
1044
|
+
deepinfra: void 0,
|
|
1045
|
+
"black-forest-labs": void 0,
|
|
1046
|
+
together: void 0,
|
|
1047
|
+
fireworks: void 0,
|
|
1048
|
+
deepseek: void 0,
|
|
1049
|
+
moonshotai: void 0,
|
|
1050
|
+
perplexity: void 0,
|
|
1051
|
+
alibaba: void 0,
|
|
1052
|
+
cerebras: void 0,
|
|
1053
|
+
replicate: void 0,
|
|
1054
|
+
prodia: void 0,
|
|
1055
|
+
luma: void 0,
|
|
1056
|
+
bytedance: void 0,
|
|
1057
|
+
kling: void 0,
|
|
1058
|
+
elevenlabs: void 0,
|
|
1059
|
+
assemblyai: void 0,
|
|
1060
|
+
deepgram: void 0,
|
|
1061
|
+
gladia: void 0,
|
|
1062
|
+
lmnt: void 0,
|
|
1063
|
+
hume: void 0,
|
|
1064
|
+
revai: void 0,
|
|
1065
|
+
baseten: void 0,
|
|
1066
|
+
huggingface: void 0
|
|
393
1067
|
};
|
|
394
1068
|
var DURATION_RE = /^\d+[mh]$/;
|
|
395
1069
|
|
|
396
1070
|
// src/provider-meta.ts
|
|
397
1071
|
var PROVIDER_META = [
|
|
398
1072
|
{ id: "openai", name: "OpenAI", host: "api.openai.com", color: "#10a37f" },
|
|
399
|
-
{
|
|
400
|
-
|
|
1073
|
+
{
|
|
1074
|
+
id: "azure",
|
|
1075
|
+
name: "Azure OpenAI",
|
|
1076
|
+
host: "models.inference.ai.azure.com",
|
|
1077
|
+
color: "#0078d4"
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
id: "anthropic",
|
|
1081
|
+
name: "Anthropic",
|
|
1082
|
+
host: "api.anthropic.com",
|
|
1083
|
+
color: "#e8956a"
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
id: "google",
|
|
1087
|
+
name: "Google",
|
|
1088
|
+
host: "generativelanguage.googleapis.com",
|
|
1089
|
+
color: "#4285f4"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
id: "google-vertex",
|
|
1093
|
+
name: "Google Vertex AI",
|
|
1094
|
+
host: "aiplatform.googleapis.com",
|
|
1095
|
+
color: "#34a853"
|
|
1096
|
+
},
|
|
401
1097
|
{ id: "mistral", name: "Mistral", host: "api.mistral.ai", color: "#ff7000" },
|
|
402
1098
|
{ id: "cohere", name: "Cohere", host: "api.cohere.com", color: "#39594d" },
|
|
403
|
-
{
|
|
404
|
-
|
|
405
|
-
|
|
1099
|
+
{
|
|
1100
|
+
id: "bedrock",
|
|
1101
|
+
name: "Bedrock",
|
|
1102
|
+
host: "bedrock-runtime.us-east-1.amazonaws.com",
|
|
1103
|
+
color: "#ff9900"
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
id: "openrouter",
|
|
1107
|
+
name: "OpenRouter",
|
|
1108
|
+
host: "openrouter.ai",
|
|
1109
|
+
color: "#818cf8"
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
id: "vercel",
|
|
1113
|
+
name: "Vercel",
|
|
1114
|
+
host: "gateway.ai.vercel.app",
|
|
1115
|
+
color: "#ededed"
|
|
1116
|
+
},
|
|
1117
|
+
{ id: "xai", name: "xAI", host: "api.x.ai", color: "#111111" },
|
|
1118
|
+
{ id: "groq", name: "Groq", host: "api.groq.com", color: "#f55036" },
|
|
1119
|
+
{ id: "fal", name: "Fal", host: "fal.run", color: "#111111" },
|
|
1120
|
+
{
|
|
1121
|
+
id: "deepinfra",
|
|
1122
|
+
name: "DeepInfra",
|
|
1123
|
+
host: "api.deepinfra.com",
|
|
1124
|
+
color: "#2563eb"
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
id: "black-forest-labs",
|
|
1128
|
+
name: "Black Forest Labs",
|
|
1129
|
+
host: "api.bfl.ai",
|
|
1130
|
+
color: "#111111"
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
id: "together",
|
|
1134
|
+
name: "Together.ai",
|
|
1135
|
+
host: "api.together.xyz",
|
|
1136
|
+
color: "#ff4f00"
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
id: "fireworks",
|
|
1140
|
+
name: "Fireworks",
|
|
1141
|
+
host: "api.fireworks.ai",
|
|
1142
|
+
color: "#7c3aed"
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
id: "deepseek",
|
|
1146
|
+
name: "DeepSeek",
|
|
1147
|
+
host: "api.deepseek.com",
|
|
1148
|
+
color: "#4d6bfe"
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
id: "moonshotai",
|
|
1152
|
+
name: "Moonshot AI",
|
|
1153
|
+
host: "api.moonshot.ai",
|
|
1154
|
+
color: "#6b46ff"
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
id: "perplexity",
|
|
1158
|
+
name: "Perplexity",
|
|
1159
|
+
host: "api.perplexity.ai",
|
|
1160
|
+
color: "#20b8cd"
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
id: "alibaba",
|
|
1164
|
+
name: "Alibaba",
|
|
1165
|
+
host: "dashscope-intl.aliyuncs.com",
|
|
1166
|
+
color: "#ff6a00"
|
|
1167
|
+
},
|
|
1168
|
+
{
|
|
1169
|
+
id: "cerebras",
|
|
1170
|
+
name: "Cerebras",
|
|
1171
|
+
host: "api.cerebras.ai",
|
|
1172
|
+
color: "#d71920"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
id: "replicate",
|
|
1176
|
+
name: "Replicate",
|
|
1177
|
+
host: "api.replicate.com",
|
|
1178
|
+
color: "#111111"
|
|
1179
|
+
},
|
|
1180
|
+
{ id: "prodia", name: "Prodia", host: "api.prodia.com", color: "#6d28d9" },
|
|
1181
|
+
{ id: "luma", name: "Luma", host: "api.lumalabs.ai", color: "#111111" },
|
|
1182
|
+
{
|
|
1183
|
+
id: "bytedance",
|
|
1184
|
+
name: "ByteDance",
|
|
1185
|
+
host: "ark.cn-beijing.volces.com",
|
|
1186
|
+
color: "#2563eb"
|
|
1187
|
+
},
|
|
1188
|
+
{ id: "kling", name: "Kling AI", host: "api.klingai.com", color: "#111111" },
|
|
1189
|
+
{
|
|
1190
|
+
id: "elevenlabs",
|
|
1191
|
+
name: "ElevenLabs",
|
|
1192
|
+
host: "api.elevenlabs.io",
|
|
1193
|
+
color: "#111111"
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
id: "assemblyai",
|
|
1197
|
+
name: "AssemblyAI",
|
|
1198
|
+
host: "api.assemblyai.com",
|
|
1199
|
+
color: "#4f46e5"
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
id: "deepgram",
|
|
1203
|
+
name: "Deepgram",
|
|
1204
|
+
host: "api.deepgram.com",
|
|
1205
|
+
color: "#13ef93"
|
|
1206
|
+
},
|
|
1207
|
+
{ id: "gladia", name: "Gladia", host: "api.gladia.io", color: "#7c3aed" },
|
|
1208
|
+
{ id: "lmnt", name: "LMNT", host: "api.lmnt.com", color: "#14b8a6" },
|
|
1209
|
+
{ id: "hume", name: "Hume", host: "api.hume.ai", color: "#8b5cf6" },
|
|
1210
|
+
{ id: "revai", name: "Rev.ai", host: "api.rev.ai", color: "#ef4444" },
|
|
1211
|
+
{
|
|
1212
|
+
id: "baseten",
|
|
1213
|
+
name: "Baseten",
|
|
1214
|
+
host: "api.baseten.co",
|
|
1215
|
+
color: "#111111"
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
id: "huggingface",
|
|
1219
|
+
name: "Hugging Face",
|
|
1220
|
+
host: "api-inference.huggingface.co",
|
|
1221
|
+
color: "#ffcc4d"
|
|
1222
|
+
}
|
|
406
1223
|
];
|
|
407
1224
|
var MODELS = {
|
|
408
1225
|
openai: [
|
|
@@ -416,6 +1233,7 @@ var MODELS = {
|
|
|
416
1233
|
"o4-mini",
|
|
417
1234
|
"o1-pro"
|
|
418
1235
|
],
|
|
1236
|
+
azure: ["gpt-5.2", "gpt-4.1", "o3", "o4-mini"],
|
|
419
1237
|
anthropic: [
|
|
420
1238
|
"claude-opus-4-6",
|
|
421
1239
|
"claude-sonnet-4-6",
|
|
@@ -428,6 +1246,12 @@ var MODELS = {
|
|
|
428
1246
|
"gemini-2.5-pro",
|
|
429
1247
|
"gemini-2.5-flash"
|
|
430
1248
|
],
|
|
1249
|
+
"google-vertex": [
|
|
1250
|
+
"gemini-3-pro-preview",
|
|
1251
|
+
"gemini-3-flash-preview",
|
|
1252
|
+
"gemini-2.5-pro",
|
|
1253
|
+
"gemini-2.5-flash"
|
|
1254
|
+
],
|
|
431
1255
|
mistral: [
|
|
432
1256
|
"mistral-large-latest",
|
|
433
1257
|
"mistral-medium-latest",
|
|
@@ -463,104 +1287,559 @@ var MODELS = {
|
|
|
463
1287
|
"google/gemini-3-flash-preview",
|
|
464
1288
|
"mistral/mistral-large-latest",
|
|
465
1289
|
"qwen/qwen2.5-pro"
|
|
1290
|
+
],
|
|
1291
|
+
xai: ["grok-4", "grok-3", "grok-3-mini"],
|
|
1292
|
+
groq: ["openai/gpt-oss-120b", "llama-3.3-70b-versatile"],
|
|
1293
|
+
fal: ["fal-ai/flux-pro", "fal-ai/imagen4/preview"],
|
|
1294
|
+
deepinfra: [
|
|
1295
|
+
"meta-llama/Meta-Llama-3.1-70B-Instruct",
|
|
1296
|
+
"deepseek-ai/DeepSeek-V3"
|
|
1297
|
+
],
|
|
1298
|
+
"black-forest-labs": ["flux-pro-1.1", "flux-kontext-pro"],
|
|
1299
|
+
together: [
|
|
1300
|
+
"meta-llama/Llama-3.3-70B-Instruct-Turbo",
|
|
1301
|
+
"deepseek-ai/DeepSeek-V3"
|
|
1302
|
+
],
|
|
1303
|
+
fireworks: [
|
|
1304
|
+
"accounts/fireworks/models/llama-v3p1-70b-instruct",
|
|
1305
|
+
"accounts/fireworks/models/deepseek-v3"
|
|
1306
|
+
],
|
|
1307
|
+
deepseek: ["deepseek-chat", "deepseek-reasoner"],
|
|
1308
|
+
moonshotai: ["kimi-k2-0905-preview", "moonshot-v1-128k"],
|
|
1309
|
+
perplexity: ["sonar", "sonar-pro", "sonar-reasoning"],
|
|
1310
|
+
alibaba: ["qwen-plus", "qwen-max", "qwen3-coder-plus"],
|
|
1311
|
+
cerebras: ["llama3.1-8b", "llama-3.3-70b"],
|
|
1312
|
+
replicate: [
|
|
1313
|
+
"black-forest-labs/flux-schnell",
|
|
1314
|
+
"meta/meta-llama-3-70b-instruct"
|
|
1315
|
+
],
|
|
1316
|
+
prodia: ["sdxl", "flux-schnell"],
|
|
1317
|
+
luma: ["ray-2", "photon-1"],
|
|
1318
|
+
bytedance: ["seedream-4-0", "seedance-1-0-pro"],
|
|
1319
|
+
kling: ["kling-v2.1", "kling-v1.6"],
|
|
1320
|
+
elevenlabs: ["eleven_multilingual_v2", "eleven_turbo_v2_5"],
|
|
1321
|
+
assemblyai: ["universal"],
|
|
1322
|
+
deepgram: ["nova-3", "nova-2"],
|
|
1323
|
+
gladia: ["solaria-1"],
|
|
1324
|
+
lmnt: ["aurora"],
|
|
1325
|
+
hume: ["octave"],
|
|
1326
|
+
revai: ["machine"],
|
|
1327
|
+
baseten: ["meta-llama/Llama-3.1-8B-Instruct", "deepseek-ai/DeepSeek-R1"],
|
|
1328
|
+
huggingface: [
|
|
1329
|
+
"meta-llama/Llama-3.1-8B-Instruct",
|
|
1330
|
+
"mistralai/Mistral-7B-Instruct-v0.3"
|
|
466
1331
|
]
|
|
467
1332
|
};
|
|
1333
|
+
var OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS = {
|
|
1334
|
+
temperature: {
|
|
1335
|
+
type: "number",
|
|
1336
|
+
min: 0,
|
|
1337
|
+
max: 2,
|
|
1338
|
+
default: 0.7,
|
|
1339
|
+
description: "Controls randomness"
|
|
1340
|
+
},
|
|
1341
|
+
max_tokens: {
|
|
1342
|
+
type: "number",
|
|
1343
|
+
min: 1,
|
|
1344
|
+
default: 4096,
|
|
1345
|
+
description: "Maximum output tokens"
|
|
1346
|
+
},
|
|
1347
|
+
top_p: {
|
|
1348
|
+
type: "number",
|
|
1349
|
+
min: 0,
|
|
1350
|
+
max: 1,
|
|
1351
|
+
default: 1,
|
|
1352
|
+
description: "Nucleus sampling"
|
|
1353
|
+
},
|
|
1354
|
+
top_k: {
|
|
1355
|
+
type: "number",
|
|
1356
|
+
min: 0,
|
|
1357
|
+
default: 40,
|
|
1358
|
+
description: "Top-K sampling"
|
|
1359
|
+
},
|
|
1360
|
+
frequency_penalty: {
|
|
1361
|
+
type: "number",
|
|
1362
|
+
min: -2,
|
|
1363
|
+
max: 2,
|
|
1364
|
+
default: 0,
|
|
1365
|
+
description: "Penalize frequent tokens"
|
|
1366
|
+
},
|
|
1367
|
+
presence_penalty: {
|
|
1368
|
+
type: "number",
|
|
1369
|
+
min: -2,
|
|
1370
|
+
max: 2,
|
|
1371
|
+
default: 0,
|
|
1372
|
+
description: "Penalize repeated topics"
|
|
1373
|
+
},
|
|
1374
|
+
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
1375
|
+
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
1376
|
+
seed: { type: "number", default: "", description: "Random seed" },
|
|
1377
|
+
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
1378
|
+
effort: {
|
|
1379
|
+
type: "enum",
|
|
1380
|
+
values: ["none", "minimal", "low", "medium", "high", "xhigh"],
|
|
1381
|
+
default: "medium",
|
|
1382
|
+
description: "Reasoning effort"
|
|
1383
|
+
}
|
|
1384
|
+
};
|
|
1385
|
+
var GOOGLE_COMPATIBLE_CANONICAL_PARAM_SPECS = {
|
|
1386
|
+
temperature: {
|
|
1387
|
+
type: "number",
|
|
1388
|
+
min: 0,
|
|
1389
|
+
max: 2,
|
|
1390
|
+
default: 0.7,
|
|
1391
|
+
description: "Controls randomness"
|
|
1392
|
+
},
|
|
1393
|
+
max_tokens: {
|
|
1394
|
+
type: "number",
|
|
1395
|
+
min: 1,
|
|
1396
|
+
default: 4096,
|
|
1397
|
+
description: "Maximum output tokens"
|
|
1398
|
+
},
|
|
1399
|
+
top_p: {
|
|
1400
|
+
type: "number",
|
|
1401
|
+
min: 0,
|
|
1402
|
+
max: 1,
|
|
1403
|
+
default: 1,
|
|
1404
|
+
description: "Nucleus sampling"
|
|
1405
|
+
},
|
|
1406
|
+
top_k: {
|
|
1407
|
+
type: "number",
|
|
1408
|
+
min: 0,
|
|
1409
|
+
default: 40,
|
|
1410
|
+
description: "Top-K sampling"
|
|
1411
|
+
},
|
|
1412
|
+
frequency_penalty: {
|
|
1413
|
+
type: "number",
|
|
1414
|
+
min: -2,
|
|
1415
|
+
max: 2,
|
|
1416
|
+
default: 0,
|
|
1417
|
+
description: "Penalize frequent tokens"
|
|
1418
|
+
},
|
|
1419
|
+
presence_penalty: {
|
|
1420
|
+
type: "number",
|
|
1421
|
+
min: -2,
|
|
1422
|
+
max: 2,
|
|
1423
|
+
default: 0,
|
|
1424
|
+
description: "Penalize repeated topics"
|
|
1425
|
+
},
|
|
1426
|
+
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
1427
|
+
n: { type: "number", min: 1, default: 1, description: "Candidate count" },
|
|
1428
|
+
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
1429
|
+
seed: { type: "number", default: "", description: "Random seed" }
|
|
1430
|
+
};
|
|
468
1431
|
var CANONICAL_PARAM_SPECS = {
|
|
469
1432
|
openai: {
|
|
470
|
-
temperature: {
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
1433
|
+
temperature: {
|
|
1434
|
+
type: "number",
|
|
1435
|
+
min: 0,
|
|
1436
|
+
max: 2,
|
|
1437
|
+
default: 0.7,
|
|
1438
|
+
description: "Controls randomness"
|
|
1439
|
+
},
|
|
1440
|
+
max_tokens: {
|
|
1441
|
+
type: "number",
|
|
1442
|
+
min: 1,
|
|
1443
|
+
default: 4096,
|
|
1444
|
+
description: "Maximum output tokens"
|
|
1445
|
+
},
|
|
1446
|
+
top_p: {
|
|
1447
|
+
type: "number",
|
|
1448
|
+
min: 0,
|
|
1449
|
+
max: 1,
|
|
1450
|
+
default: 1,
|
|
1451
|
+
description: "Nucleus sampling"
|
|
1452
|
+
},
|
|
1453
|
+
frequency_penalty: {
|
|
1454
|
+
type: "number",
|
|
1455
|
+
min: -2,
|
|
1456
|
+
max: 2,
|
|
1457
|
+
default: 0,
|
|
1458
|
+
description: "Penalize frequent tokens"
|
|
1459
|
+
},
|
|
1460
|
+
presence_penalty: {
|
|
1461
|
+
type: "number",
|
|
1462
|
+
min: -2,
|
|
1463
|
+
max: 2,
|
|
1464
|
+
default: 0,
|
|
1465
|
+
description: "Penalize repeated topics"
|
|
1466
|
+
},
|
|
475
1467
|
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
476
1468
|
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
477
1469
|
seed: { type: "number", default: "", description: "Random seed" },
|
|
478
1470
|
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
479
|
-
effort: {
|
|
1471
|
+
effort: {
|
|
1472
|
+
type: "enum",
|
|
1473
|
+
values: ["none", "minimal", "low", "medium", "high", "xhigh"],
|
|
1474
|
+
default: "medium",
|
|
1475
|
+
description: "Reasoning effort"
|
|
1476
|
+
}
|
|
480
1477
|
},
|
|
1478
|
+
azure: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
|
|
481
1479
|
anthropic: {
|
|
482
|
-
temperature: {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
1480
|
+
temperature: {
|
|
1481
|
+
type: "number",
|
|
1482
|
+
min: 0,
|
|
1483
|
+
max: 1,
|
|
1484
|
+
default: 0.7,
|
|
1485
|
+
description: "Controls randomness"
|
|
1486
|
+
},
|
|
1487
|
+
max_tokens: {
|
|
1488
|
+
type: "number",
|
|
1489
|
+
min: 1,
|
|
1490
|
+
default: 4096,
|
|
1491
|
+
description: "Maximum output tokens"
|
|
1492
|
+
},
|
|
1493
|
+
top_p: {
|
|
1494
|
+
type: "number",
|
|
1495
|
+
min: 0,
|
|
1496
|
+
max: 1,
|
|
1497
|
+
default: 1,
|
|
1498
|
+
description: "Nucleus sampling"
|
|
1499
|
+
},
|
|
1500
|
+
top_k: {
|
|
1501
|
+
type: "number",
|
|
1502
|
+
min: 0,
|
|
1503
|
+
default: 40,
|
|
1504
|
+
description: "Top-K sampling"
|
|
1505
|
+
},
|
|
486
1506
|
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
487
1507
|
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
488
|
-
effort: {
|
|
489
|
-
|
|
490
|
-
|
|
1508
|
+
effort: {
|
|
1509
|
+
type: "enum",
|
|
1510
|
+
values: ["low", "medium", "high", "max"],
|
|
1511
|
+
default: "medium",
|
|
1512
|
+
description: "Thinking effort"
|
|
1513
|
+
},
|
|
1514
|
+
cache: {
|
|
1515
|
+
type: "enum",
|
|
1516
|
+
values: ["ephemeral"],
|
|
1517
|
+
default: "ephemeral",
|
|
1518
|
+
description: "Cache control"
|
|
1519
|
+
},
|
|
1520
|
+
cache_ttl: {
|
|
1521
|
+
type: "enum",
|
|
1522
|
+
values: ["5m", "1h"],
|
|
1523
|
+
default: "5m",
|
|
1524
|
+
description: "Cache TTL"
|
|
1525
|
+
}
|
|
491
1526
|
},
|
|
492
1527
|
google: {
|
|
493
|
-
temperature: {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
1528
|
+
temperature: {
|
|
1529
|
+
type: "number",
|
|
1530
|
+
min: 0,
|
|
1531
|
+
max: 2,
|
|
1532
|
+
default: 0.7,
|
|
1533
|
+
description: "Controls randomness"
|
|
1534
|
+
},
|
|
1535
|
+
max_tokens: {
|
|
1536
|
+
type: "number",
|
|
1537
|
+
min: 1,
|
|
1538
|
+
default: 4096,
|
|
1539
|
+
description: "Maximum output tokens"
|
|
1540
|
+
},
|
|
1541
|
+
top_p: {
|
|
1542
|
+
type: "number",
|
|
1543
|
+
min: 0,
|
|
1544
|
+
max: 1,
|
|
1545
|
+
default: 1,
|
|
1546
|
+
description: "Nucleus sampling"
|
|
1547
|
+
},
|
|
1548
|
+
top_k: {
|
|
1549
|
+
type: "number",
|
|
1550
|
+
min: 0,
|
|
1551
|
+
default: 40,
|
|
1552
|
+
description: "Top-K sampling"
|
|
1553
|
+
},
|
|
1554
|
+
frequency_penalty: {
|
|
1555
|
+
type: "number",
|
|
1556
|
+
min: -2,
|
|
1557
|
+
max: 2,
|
|
1558
|
+
default: 0,
|
|
1559
|
+
description: "Penalize frequent tokens"
|
|
1560
|
+
},
|
|
1561
|
+
presence_penalty: {
|
|
1562
|
+
type: "number",
|
|
1563
|
+
min: -2,
|
|
1564
|
+
max: 2,
|
|
1565
|
+
default: 0,
|
|
1566
|
+
description: "Penalize repeated topics"
|
|
1567
|
+
},
|
|
499
1568
|
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
500
1569
|
n: { type: "number", min: 1, default: 1, description: "Candidate count" },
|
|
501
1570
|
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
502
1571
|
seed: { type: "number", default: "", description: "Random seed" }
|
|
503
1572
|
},
|
|
1573
|
+
"google-vertex": GOOGLE_COMPATIBLE_CANONICAL_PARAM_SPECS,
|
|
504
1574
|
mistral: {
|
|
505
|
-
temperature: {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
1575
|
+
temperature: {
|
|
1576
|
+
type: "number",
|
|
1577
|
+
min: 0,
|
|
1578
|
+
max: 1,
|
|
1579
|
+
default: 0.7,
|
|
1580
|
+
description: "Controls randomness"
|
|
1581
|
+
},
|
|
1582
|
+
max_tokens: {
|
|
1583
|
+
type: "number",
|
|
1584
|
+
min: 1,
|
|
1585
|
+
default: 4096,
|
|
1586
|
+
description: "Maximum output tokens"
|
|
1587
|
+
},
|
|
1588
|
+
top_p: {
|
|
1589
|
+
type: "number",
|
|
1590
|
+
min: 0,
|
|
1591
|
+
max: 1,
|
|
1592
|
+
default: 1,
|
|
1593
|
+
description: "Nucleus sampling"
|
|
1594
|
+
},
|
|
1595
|
+
frequency_penalty: {
|
|
1596
|
+
type: "number",
|
|
1597
|
+
min: -2,
|
|
1598
|
+
max: 2,
|
|
1599
|
+
default: 0,
|
|
1600
|
+
description: "Penalize frequent tokens"
|
|
1601
|
+
},
|
|
1602
|
+
presence_penalty: {
|
|
1603
|
+
type: "number",
|
|
1604
|
+
min: -2,
|
|
1605
|
+
max: 2,
|
|
1606
|
+
default: 0,
|
|
1607
|
+
description: "Penalize repeated topics"
|
|
1608
|
+
},
|
|
510
1609
|
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
511
1610
|
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
512
1611
|
seed: { type: "number", default: "", description: "Random seed" },
|
|
513
1612
|
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
514
|
-
safe_prompt: {
|
|
515
|
-
|
|
1613
|
+
safe_prompt: {
|
|
1614
|
+
type: "boolean",
|
|
1615
|
+
default: false,
|
|
1616
|
+
description: "Enable safe prompt"
|
|
1617
|
+
},
|
|
1618
|
+
min_tokens: {
|
|
1619
|
+
type: "number",
|
|
1620
|
+
min: 0,
|
|
1621
|
+
default: 0,
|
|
1622
|
+
description: "Minimum tokens"
|
|
1623
|
+
}
|
|
516
1624
|
},
|
|
517
1625
|
cohere: {
|
|
518
|
-
temperature: {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
1626
|
+
temperature: {
|
|
1627
|
+
type: "number",
|
|
1628
|
+
min: 0,
|
|
1629
|
+
max: 1,
|
|
1630
|
+
default: 0.7,
|
|
1631
|
+
description: "Controls randomness"
|
|
1632
|
+
},
|
|
1633
|
+
max_tokens: {
|
|
1634
|
+
type: "number",
|
|
1635
|
+
min: 1,
|
|
1636
|
+
default: 4096,
|
|
1637
|
+
description: "Maximum output tokens"
|
|
1638
|
+
},
|
|
1639
|
+
top_p: {
|
|
1640
|
+
type: "number",
|
|
1641
|
+
min: 0,
|
|
1642
|
+
max: 1,
|
|
1643
|
+
default: 1,
|
|
1644
|
+
description: "Nucleus sampling (p)"
|
|
1645
|
+
},
|
|
1646
|
+
top_k: {
|
|
1647
|
+
type: "number",
|
|
1648
|
+
min: 0,
|
|
1649
|
+
max: 500,
|
|
1650
|
+
default: 40,
|
|
1651
|
+
description: "Top-K sampling (k)"
|
|
1652
|
+
},
|
|
1653
|
+
frequency_penalty: {
|
|
1654
|
+
type: "number",
|
|
1655
|
+
min: 0,
|
|
1656
|
+
max: 1,
|
|
1657
|
+
default: 0,
|
|
1658
|
+
description: "Penalize frequent tokens"
|
|
1659
|
+
},
|
|
1660
|
+
presence_penalty: {
|
|
1661
|
+
type: "number",
|
|
1662
|
+
min: 0,
|
|
1663
|
+
max: 1,
|
|
1664
|
+
default: 0,
|
|
1665
|
+
description: "Penalize repeated topics"
|
|
1666
|
+
},
|
|
524
1667
|
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
525
1668
|
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
526
1669
|
seed: { type: "number", default: "", description: "Random seed" }
|
|
527
1670
|
},
|
|
528
1671
|
bedrock: {
|
|
529
|
-
temperature: {
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
1672
|
+
temperature: {
|
|
1673
|
+
type: "number",
|
|
1674
|
+
min: 0,
|
|
1675
|
+
max: 1,
|
|
1676
|
+
default: 0.7,
|
|
1677
|
+
description: "Controls randomness"
|
|
1678
|
+
},
|
|
1679
|
+
max_tokens: {
|
|
1680
|
+
type: "number",
|
|
1681
|
+
min: 1,
|
|
1682
|
+
default: 4096,
|
|
1683
|
+
description: "Maximum output tokens"
|
|
1684
|
+
},
|
|
1685
|
+
top_p: {
|
|
1686
|
+
type: "number",
|
|
1687
|
+
min: 0,
|
|
1688
|
+
max: 1,
|
|
1689
|
+
default: 1,
|
|
1690
|
+
description: "Nucleus sampling"
|
|
1691
|
+
},
|
|
1692
|
+
top_k: {
|
|
1693
|
+
type: "number",
|
|
1694
|
+
min: 0,
|
|
1695
|
+
default: 40,
|
|
1696
|
+
description: "Top-K sampling"
|
|
1697
|
+
},
|
|
533
1698
|
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
534
1699
|
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
535
|
-
cache: {
|
|
536
|
-
|
|
1700
|
+
cache: {
|
|
1701
|
+
type: "enum",
|
|
1702
|
+
values: ["ephemeral"],
|
|
1703
|
+
default: "ephemeral",
|
|
1704
|
+
description: "Cache control"
|
|
1705
|
+
},
|
|
1706
|
+
cache_ttl: {
|
|
1707
|
+
type: "enum",
|
|
1708
|
+
values: ["5m", "1h"],
|
|
1709
|
+
default: "5m",
|
|
1710
|
+
description: "Cache TTL"
|
|
1711
|
+
}
|
|
537
1712
|
},
|
|
538
1713
|
openrouter: {
|
|
539
|
-
temperature: {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
1714
|
+
temperature: {
|
|
1715
|
+
type: "number",
|
|
1716
|
+
min: 0,
|
|
1717
|
+
max: 2,
|
|
1718
|
+
default: 0.7,
|
|
1719
|
+
description: "Controls randomness"
|
|
1720
|
+
},
|
|
1721
|
+
max_tokens: {
|
|
1722
|
+
type: "number",
|
|
1723
|
+
min: 1,
|
|
1724
|
+
default: 4096,
|
|
1725
|
+
description: "Maximum output tokens"
|
|
1726
|
+
},
|
|
1727
|
+
top_p: {
|
|
1728
|
+
type: "number",
|
|
1729
|
+
min: 0,
|
|
1730
|
+
max: 1,
|
|
1731
|
+
default: 1,
|
|
1732
|
+
description: "Nucleus sampling"
|
|
1733
|
+
},
|
|
1734
|
+
top_k: {
|
|
1735
|
+
type: "number",
|
|
1736
|
+
min: 0,
|
|
1737
|
+
default: 40,
|
|
1738
|
+
description: "Top-K sampling"
|
|
1739
|
+
},
|
|
1740
|
+
frequency_penalty: {
|
|
1741
|
+
type: "number",
|
|
1742
|
+
min: -2,
|
|
1743
|
+
max: 2,
|
|
1744
|
+
default: 0,
|
|
1745
|
+
description: "Penalize frequent tokens"
|
|
1746
|
+
},
|
|
1747
|
+
presence_penalty: {
|
|
1748
|
+
type: "number",
|
|
1749
|
+
min: -2,
|
|
1750
|
+
max: 2,
|
|
1751
|
+
default: 0,
|
|
1752
|
+
description: "Penalize repeated topics"
|
|
1753
|
+
},
|
|
545
1754
|
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
546
1755
|
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
547
1756
|
seed: { type: "number", default: "", description: "Random seed" },
|
|
548
1757
|
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
549
|
-
effort: {
|
|
1758
|
+
effort: {
|
|
1759
|
+
type: "enum",
|
|
1760
|
+
values: ["none", "minimal", "low", "medium", "high", "xhigh"],
|
|
1761
|
+
default: "medium",
|
|
1762
|
+
description: "Reasoning effort"
|
|
1763
|
+
}
|
|
550
1764
|
},
|
|
551
1765
|
vercel: {
|
|
552
|
-
temperature: {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
1766
|
+
temperature: {
|
|
1767
|
+
type: "number",
|
|
1768
|
+
min: 0,
|
|
1769
|
+
max: 2,
|
|
1770
|
+
default: 0.7,
|
|
1771
|
+
description: "Controls randomness"
|
|
1772
|
+
},
|
|
1773
|
+
max_tokens: {
|
|
1774
|
+
type: "number",
|
|
1775
|
+
min: 1,
|
|
1776
|
+
default: 4096,
|
|
1777
|
+
description: "Maximum output tokens"
|
|
1778
|
+
},
|
|
1779
|
+
top_p: {
|
|
1780
|
+
type: "number",
|
|
1781
|
+
min: 0,
|
|
1782
|
+
max: 1,
|
|
1783
|
+
default: 1,
|
|
1784
|
+
description: "Nucleus sampling"
|
|
1785
|
+
},
|
|
1786
|
+
top_k: {
|
|
1787
|
+
type: "number",
|
|
1788
|
+
min: 0,
|
|
1789
|
+
default: 40,
|
|
1790
|
+
description: "Top-K sampling"
|
|
1791
|
+
},
|
|
1792
|
+
frequency_penalty: {
|
|
1793
|
+
type: "number",
|
|
1794
|
+
min: -2,
|
|
1795
|
+
max: 2,
|
|
1796
|
+
default: 0,
|
|
1797
|
+
description: "Penalize frequent tokens"
|
|
1798
|
+
},
|
|
1799
|
+
presence_penalty: {
|
|
1800
|
+
type: "number",
|
|
1801
|
+
min: -2,
|
|
1802
|
+
max: 2,
|
|
1803
|
+
default: 0,
|
|
1804
|
+
description: "Penalize repeated topics"
|
|
1805
|
+
},
|
|
558
1806
|
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
559
1807
|
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
560
1808
|
seed: { type: "number", default: "", description: "Random seed" },
|
|
561
1809
|
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
562
|
-
effort: {
|
|
563
|
-
|
|
1810
|
+
effort: {
|
|
1811
|
+
type: "enum",
|
|
1812
|
+
values: ["none", "minimal", "low", "medium", "high", "xhigh"],
|
|
1813
|
+
default: "medium",
|
|
1814
|
+
description: "Reasoning effort"
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
xai: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
|
|
1818
|
+
groq: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
|
|
1819
|
+
fal: {},
|
|
1820
|
+
deepinfra: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
|
|
1821
|
+
"black-forest-labs": {},
|
|
1822
|
+
together: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
|
|
1823
|
+
fireworks: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
|
|
1824
|
+
deepseek: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
|
|
1825
|
+
moonshotai: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
|
|
1826
|
+
perplexity: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
|
|
1827
|
+
alibaba: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
|
|
1828
|
+
cerebras: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
|
|
1829
|
+
replicate: {},
|
|
1830
|
+
prodia: {},
|
|
1831
|
+
luma: {},
|
|
1832
|
+
bytedance: {},
|
|
1833
|
+
kling: {},
|
|
1834
|
+
elevenlabs: {},
|
|
1835
|
+
assemblyai: {},
|
|
1836
|
+
deepgram: {},
|
|
1837
|
+
gladia: {},
|
|
1838
|
+
lmnt: {},
|
|
1839
|
+
hume: {},
|
|
1840
|
+
revai: {},
|
|
1841
|
+
baseten: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
|
|
1842
|
+
huggingface: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS
|
|
564
1843
|
};
|
|
565
1844
|
// Annotate the CommonJS export names for ESM import in node:
|
|
566
1845
|
0 && (module.exports = {
|
|
@@ -569,6 +1848,7 @@ var CANONICAL_PARAM_SPECS = {
|
|
|
569
1848
|
CACHE_VALUES,
|
|
570
1849
|
CANONICAL_PARAM_SPECS,
|
|
571
1850
|
DURATION_RE,
|
|
1851
|
+
HOST_ALIASES,
|
|
572
1852
|
MODELS,
|
|
573
1853
|
PARAM_SPECS,
|
|
574
1854
|
PROVIDER_META,
|
|
@@ -580,6 +1860,8 @@ var CANONICAL_PARAM_SPECS = {
|
|
|
580
1860
|
detectGatewaySubProvider,
|
|
581
1861
|
detectProvider,
|
|
582
1862
|
isGatewayProvider,
|
|
583
|
-
isReasoningModel
|
|
1863
|
+
isReasoningModel,
|
|
1864
|
+
providerFromHostAlias,
|
|
1865
|
+
resolveHostAlias
|
|
584
1866
|
});
|
|
585
1867
|
//# sourceMappingURL=providers.cjs.map
|