llm-strings 1.2.0 → 1.4.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 +3 -14
- package/dist/ai-sdk.cjs +355 -10
- package/dist/ai-sdk.d.cts +5 -4
- package/dist/ai-sdk.d.ts +5 -4
- package/dist/ai-sdk.js +87 -9
- package/dist/{chunk-BCOUH7LH.js → chunk-5YTG2NRX.js} +1 -2
- package/dist/{chunk-W4NIQY7M.js → chunk-76EFNZCF.js} +317 -4
- package/dist/{chunk-2ARD4TFU.js → chunk-DPVT3FFP.js} +1 -2
- package/dist/{chunk-RPXK2A7O.js → chunk-OBLFZFNR.js} +3 -4
- package/dist/index.cjs +317 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -5
- package/dist/normalize.cjs +157 -4
- package/dist/normalize.d.cts +1 -1
- package/dist/normalize.d.ts +1 -1
- package/dist/normalize.js +2 -3
- package/dist/parse.cjs +27 -1
- package/dist/parse.d.cts +1 -1
- package/dist/parse.d.ts +1 -1
- package/dist/parse.js +2 -3
- package/dist/{provider-core-BiAl8MCV.d.cts → provider-core-B934MuhJ.d.cts} +2 -2
- package/dist/{provider-core-BiAl8MCV.d.ts → provider-core-B934MuhJ.d.ts} +2 -2
- package/dist/providers.cjs +451 -445
- package/dist/providers.d.cts +3 -8
- package/dist/providers.d.ts +3 -8
- package/dist/providers.js +135 -442
- package/dist/validate.cjs +317 -4
- package/dist/validate.js +4 -5
- package/package.json +1 -1
- package/dist/ai-sdk.cjs.map +0 -1
- package/dist/ai-sdk.js.map +0 -1
- package/dist/chunk-2ARD4TFU.js.map +0 -1
- package/dist/chunk-BCOUH7LH.js.map +0 -1
- package/dist/chunk-RPXK2A7O.js.map +0 -1
- package/dist/chunk-W4NIQY7M.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/normalize.cjs.map +0 -1
- package/dist/normalize.js.map +0 -1
- package/dist/parse.cjs.map +0 -1
- package/dist/parse.js.map +0 -1
- package/dist/providers.cjs.map +0 -1
- package/dist/providers.js.map +0 -1
- package/dist/validate.cjs.map +0 -1
- package/dist/validate.js.map +0 -1
package/dist/providers.cjs
CHANGED
|
@@ -26,7 +26,6 @@ __export(providers_exports, {
|
|
|
26
26
|
CANONICAL_PARAM_SPECS: () => CANONICAL_PARAM_SPECS,
|
|
27
27
|
DURATION_RE: () => DURATION_RE,
|
|
28
28
|
HOST_ALIASES: () => HOST_ALIASES,
|
|
29
|
-
MODELS: () => MODELS,
|
|
30
29
|
PARAM_SPECS: () => PARAM_SPECS,
|
|
31
30
|
PROVIDER_META: () => PROVIDER_META,
|
|
32
31
|
PROVIDER_PARAMS: () => PROVIDER_PARAMS,
|
|
@@ -49,8 +48,10 @@ function hasOwn(object, key) {
|
|
|
49
48
|
}
|
|
50
49
|
var HOST_ALIASES = {
|
|
51
50
|
openai: "api.openai.com",
|
|
51
|
+
azure: "models.inference.ai.azure.com",
|
|
52
52
|
anthropic: "api.anthropic.com",
|
|
53
53
|
google: "generativelanguage.googleapis.com",
|
|
54
|
+
"google-vertex": "aiplatform.googleapis.com",
|
|
54
55
|
aistudio: "generativelanguage.googleapis.com",
|
|
55
56
|
mistral: "api.mistral.ai",
|
|
56
57
|
cohere: "api.cohere.com",
|
|
@@ -60,8 +61,16 @@ var HOST_ALIASES = {
|
|
|
60
61
|
alibaba: "dashscope-intl.aliyuncs.com",
|
|
61
62
|
alibabacloud: "dashscope-intl.aliyuncs.com",
|
|
62
63
|
dashscope: "dashscope-intl.aliyuncs.com",
|
|
64
|
+
groq: "api.groq.com",
|
|
65
|
+
fal: "fal.run",
|
|
63
66
|
fireworks: "api.fireworks.ai",
|
|
64
67
|
fireworksai: "api.fireworks.ai",
|
|
68
|
+
"black-forest-labs": "api.bfl.ai",
|
|
69
|
+
bfl: "api.bfl.ai",
|
|
70
|
+
deepseek: "api.deepseek.com",
|
|
71
|
+
moonshotai: "api.moonshot.ai",
|
|
72
|
+
moonshot: "api.moonshot.ai",
|
|
73
|
+
perplexity: "api.perplexity.ai",
|
|
65
74
|
venice: "api.venice.ai",
|
|
66
75
|
parasail: "api.parasail.io",
|
|
67
76
|
deepinfra: "api.deepinfra.com",
|
|
@@ -70,6 +79,23 @@ var HOST_ALIASES = {
|
|
|
70
79
|
novitaai: "api.novita.ai",
|
|
71
80
|
grok: "api.x.ai",
|
|
72
81
|
xai: "api.x.ai",
|
|
82
|
+
together: "api.together.xyz",
|
|
83
|
+
togetherai: "api.together.xyz",
|
|
84
|
+
cerebras: "api.cerebras.ai",
|
|
85
|
+
replicate: "api.replicate.com",
|
|
86
|
+
prodia: "api.prodia.com",
|
|
87
|
+
luma: "api.lumalabs.ai",
|
|
88
|
+
bytedance: "ark.cn-beijing.volces.com",
|
|
89
|
+
kling: "api.klingai.com",
|
|
90
|
+
elevenlabs: "api.elevenlabs.io",
|
|
91
|
+
assemblyai: "api.assemblyai.com",
|
|
92
|
+
deepgram: "api.deepgram.com",
|
|
93
|
+
gladia: "api.gladia.io",
|
|
94
|
+
lmnt: "api.lmnt.com",
|
|
95
|
+
hume: "api.hume.ai",
|
|
96
|
+
revai: "api.rev.ai",
|
|
97
|
+
baseten: "api.baseten.co",
|
|
98
|
+
huggingface: "api-inference.huggingface.co",
|
|
73
99
|
wandb: "api.inference.wandb.ai",
|
|
74
100
|
weightsandbiases: "api.inference.wandb.ai",
|
|
75
101
|
baidu: "qianfan.baidubce.com",
|
|
@@ -78,6 +104,18 @@ var HOST_ALIASES = {
|
|
|
78
104
|
xiaomi: "api.xiaomimimo.com",
|
|
79
105
|
minimax: "api.minimax.io"
|
|
80
106
|
};
|
|
107
|
+
var HOST_ALIAS_PROVIDERS = {
|
|
108
|
+
aistudio: "google",
|
|
109
|
+
vertex: "google-vertex",
|
|
110
|
+
grok: "xai",
|
|
111
|
+
bfl: "black-forest-labs",
|
|
112
|
+
moonshot: "moonshotai",
|
|
113
|
+
alibaba: "alibaba",
|
|
114
|
+
alibabacloud: "alibaba",
|
|
115
|
+
dashscope: "alibaba",
|
|
116
|
+
togetherai: "together",
|
|
117
|
+
fireworksai: "fireworks"
|
|
118
|
+
};
|
|
81
119
|
function readProcessEnv() {
|
|
82
120
|
return typeof process !== "undefined" && process.env ? process.env : {};
|
|
83
121
|
}
|
|
@@ -114,6 +152,9 @@ function providerFromHostAlias(alias) {
|
|
|
114
152
|
if (hasOwn(PROVIDER_PARAMS, normalizedAlias)) {
|
|
115
153
|
return normalizedAlias;
|
|
116
154
|
}
|
|
155
|
+
if (hasOwn(HOST_ALIAS_PROVIDERS, normalizedAlias)) {
|
|
156
|
+
return HOST_ALIAS_PROVIDERS[normalizedAlias];
|
|
157
|
+
}
|
|
117
158
|
return void 0;
|
|
118
159
|
}
|
|
119
160
|
function detectProvider(host) {
|
|
@@ -121,6 +162,34 @@ function detectProvider(host) {
|
|
|
121
162
|
if (host.includes("openrouter")) return "openrouter";
|
|
122
163
|
if (host.includes("gateway.ai.vercel")) return "vercel";
|
|
123
164
|
if (host.includes("amazonaws") || host.includes("bedrock")) return "bedrock";
|
|
165
|
+
if (host.includes("aiplatform.googleapis")) return "google-vertex";
|
|
166
|
+
if (host.includes("api.x.ai")) return "xai";
|
|
167
|
+
if (host.includes("groq")) return "groq";
|
|
168
|
+
if (host.includes("fal.run") || host.includes("fal.ai")) return "fal";
|
|
169
|
+
if (host.includes("deepinfra")) return "deepinfra";
|
|
170
|
+
if (host.includes("bfl.ai")) return "black-forest-labs";
|
|
171
|
+
if (host.includes("together")) return "together";
|
|
172
|
+
if (host.includes("fireworks")) return "fireworks";
|
|
173
|
+
if (host.includes("deepseek")) return "deepseek";
|
|
174
|
+
if (host.includes("moonshot")) return "moonshotai";
|
|
175
|
+
if (host.includes("perplexity")) return "perplexity";
|
|
176
|
+
if (host.includes("dashscope") || host.includes("aliyuncs")) return "alibaba";
|
|
177
|
+
if (host.includes("cerebras")) return "cerebras";
|
|
178
|
+
if (host.includes("replicate")) return "replicate";
|
|
179
|
+
if (host.includes("prodia")) return "prodia";
|
|
180
|
+
if (host.includes("lumalabs") || host.includes("luma")) return "luma";
|
|
181
|
+
if (host.includes("volces") || host.includes("bytedance")) return "bytedance";
|
|
182
|
+
if (host.includes("kling")) return "kling";
|
|
183
|
+
if (host.includes("elevenlabs")) return "elevenlabs";
|
|
184
|
+
if (host.includes("assemblyai")) return "assemblyai";
|
|
185
|
+
if (host.includes("deepgram")) return "deepgram";
|
|
186
|
+
if (host.includes("gladia")) return "gladia";
|
|
187
|
+
if (host.includes("lmnt")) return "lmnt";
|
|
188
|
+
if (host.includes("hume")) return "hume";
|
|
189
|
+
if (host.includes("rev.ai")) return "revai";
|
|
190
|
+
if (host.includes("baseten")) return "baseten";
|
|
191
|
+
if (host.includes("huggingface")) return "huggingface";
|
|
192
|
+
if (host.includes("azure")) return "azure";
|
|
124
193
|
if (host.includes("openai")) return "openai";
|
|
125
194
|
if (host.includes("anthropic") || host.includes("claude")) return "anthropic";
|
|
126
195
|
if (host.includes("googleapis") || host.includes("google")) return "google";
|
|
@@ -175,6 +244,33 @@ var ALIASES = {
|
|
|
175
244
|
cachePoint: "cache",
|
|
176
245
|
cache_point: "cache"
|
|
177
246
|
};
|
|
247
|
+
var OPENAI_COMPATIBLE_PARAMS = {
|
|
248
|
+
temperature: "temperature",
|
|
249
|
+
max_tokens: "max_tokens",
|
|
250
|
+
top_p: "top_p",
|
|
251
|
+
top_k: "top_k",
|
|
252
|
+
frequency_penalty: "frequency_penalty",
|
|
253
|
+
presence_penalty: "presence_penalty",
|
|
254
|
+
stop: "stop",
|
|
255
|
+
n: "n",
|
|
256
|
+
seed: "seed",
|
|
257
|
+
stream: "stream",
|
|
258
|
+
effort: "reasoning_effort"
|
|
259
|
+
};
|
|
260
|
+
var GOOGLE_COMPATIBLE_PARAMS = {
|
|
261
|
+
temperature: "temperature",
|
|
262
|
+
max_tokens: "maxOutputTokens",
|
|
263
|
+
top_p: "topP",
|
|
264
|
+
top_k: "topK",
|
|
265
|
+
frequency_penalty: "frequencyPenalty",
|
|
266
|
+
presence_penalty: "presencePenalty",
|
|
267
|
+
stop: "stopSequences",
|
|
268
|
+
n: "candidateCount",
|
|
269
|
+
stream: "stream",
|
|
270
|
+
seed: "seed",
|
|
271
|
+
responseMimeType: "responseMimeType",
|
|
272
|
+
responseSchema: "responseSchema"
|
|
273
|
+
};
|
|
178
274
|
var PROVIDER_PARAMS = {
|
|
179
275
|
openai: {
|
|
180
276
|
temperature: "temperature",
|
|
@@ -188,6 +284,7 @@ var PROVIDER_PARAMS = {
|
|
|
188
284
|
stream: "stream",
|
|
189
285
|
effort: "reasoning_effort"
|
|
190
286
|
},
|
|
287
|
+
azure: OPENAI_COMPATIBLE_PARAMS,
|
|
191
288
|
anthropic: {
|
|
192
289
|
temperature: "temperature",
|
|
193
290
|
max_tokens: "max_tokens",
|
|
@@ -213,6 +310,7 @@ var PROVIDER_PARAMS = {
|
|
|
213
310
|
responseMimeType: "responseMimeType",
|
|
214
311
|
responseSchema: "responseSchema"
|
|
215
312
|
},
|
|
313
|
+
"google-vertex": GOOGLE_COMPATIBLE_PARAMS,
|
|
216
314
|
mistral: {
|
|
217
315
|
temperature: "temperature",
|
|
218
316
|
max_tokens: "max_tokens",
|
|
@@ -276,8 +374,139 @@ var PROVIDER_PARAMS = {
|
|
|
276
374
|
seed: "seed",
|
|
277
375
|
stream: "stream",
|
|
278
376
|
effort: "reasoning_effort"
|
|
377
|
+
},
|
|
378
|
+
xai: OPENAI_COMPATIBLE_PARAMS,
|
|
379
|
+
groq: OPENAI_COMPATIBLE_PARAMS,
|
|
380
|
+
fal: {},
|
|
381
|
+
deepinfra: OPENAI_COMPATIBLE_PARAMS,
|
|
382
|
+
"black-forest-labs": {},
|
|
383
|
+
together: OPENAI_COMPATIBLE_PARAMS,
|
|
384
|
+
fireworks: OPENAI_COMPATIBLE_PARAMS,
|
|
385
|
+
deepseek: OPENAI_COMPATIBLE_PARAMS,
|
|
386
|
+
moonshotai: OPENAI_COMPATIBLE_PARAMS,
|
|
387
|
+
perplexity: OPENAI_COMPATIBLE_PARAMS,
|
|
388
|
+
alibaba: OPENAI_COMPATIBLE_PARAMS,
|
|
389
|
+
cerebras: OPENAI_COMPATIBLE_PARAMS,
|
|
390
|
+
replicate: {},
|
|
391
|
+
prodia: {},
|
|
392
|
+
luma: {},
|
|
393
|
+
bytedance: {},
|
|
394
|
+
kling: {},
|
|
395
|
+
elevenlabs: {},
|
|
396
|
+
assemblyai: {},
|
|
397
|
+
deepgram: {},
|
|
398
|
+
gladia: {},
|
|
399
|
+
lmnt: {},
|
|
400
|
+
hume: {},
|
|
401
|
+
revai: {},
|
|
402
|
+
baseten: OPENAI_COMPATIBLE_PARAMS,
|
|
403
|
+
huggingface: OPENAI_COMPATIBLE_PARAMS
|
|
404
|
+
};
|
|
405
|
+
var OPENAI_COMPATIBLE_PARAM_SPECS = {
|
|
406
|
+
temperature: {
|
|
407
|
+
type: "number",
|
|
408
|
+
min: 0,
|
|
409
|
+
max: 2,
|
|
410
|
+
default: 0.7,
|
|
411
|
+
description: "Controls randomness"
|
|
412
|
+
},
|
|
413
|
+
max_tokens: {
|
|
414
|
+
type: "number",
|
|
415
|
+
min: 1,
|
|
416
|
+
default: 4096,
|
|
417
|
+
description: "Maximum output tokens"
|
|
418
|
+
},
|
|
419
|
+
top_p: {
|
|
420
|
+
type: "number",
|
|
421
|
+
min: 0,
|
|
422
|
+
max: 1,
|
|
423
|
+
default: 1,
|
|
424
|
+
description: "Nucleus sampling"
|
|
425
|
+
},
|
|
426
|
+
top_k: {
|
|
427
|
+
type: "number",
|
|
428
|
+
min: 0,
|
|
429
|
+
default: 40,
|
|
430
|
+
description: "Top-K sampling"
|
|
431
|
+
},
|
|
432
|
+
frequency_penalty: {
|
|
433
|
+
type: "number",
|
|
434
|
+
min: -2,
|
|
435
|
+
max: 2,
|
|
436
|
+
default: 0,
|
|
437
|
+
description: "Penalize frequent tokens"
|
|
438
|
+
},
|
|
439
|
+
presence_penalty: {
|
|
440
|
+
type: "number",
|
|
441
|
+
min: -2,
|
|
442
|
+
max: 2,
|
|
443
|
+
default: 0,
|
|
444
|
+
description: "Penalize repeated topics"
|
|
445
|
+
},
|
|
446
|
+
stop: { type: "string", description: "Stop sequences" },
|
|
447
|
+
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
448
|
+
seed: { type: "number", description: "Random seed" },
|
|
449
|
+
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
450
|
+
reasoning_effort: {
|
|
451
|
+
type: "string",
|
|
452
|
+
values: ["none", "minimal", "low", "medium", "high", "xhigh"],
|
|
453
|
+
default: "medium",
|
|
454
|
+
description: "Reasoning effort"
|
|
279
455
|
}
|
|
280
456
|
};
|
|
457
|
+
var GOOGLE_COMPATIBLE_PARAM_SPECS = {
|
|
458
|
+
temperature: {
|
|
459
|
+
type: "number",
|
|
460
|
+
min: 0,
|
|
461
|
+
max: 2,
|
|
462
|
+
default: 0.7,
|
|
463
|
+
description: "Controls randomness"
|
|
464
|
+
},
|
|
465
|
+
maxOutputTokens: {
|
|
466
|
+
type: "number",
|
|
467
|
+
min: 1,
|
|
468
|
+
default: 4096,
|
|
469
|
+
description: "Maximum output tokens"
|
|
470
|
+
},
|
|
471
|
+
topP: {
|
|
472
|
+
type: "number",
|
|
473
|
+
min: 0,
|
|
474
|
+
max: 1,
|
|
475
|
+
default: 1,
|
|
476
|
+
description: "Nucleus sampling"
|
|
477
|
+
},
|
|
478
|
+
topK: {
|
|
479
|
+
type: "number",
|
|
480
|
+
min: 0,
|
|
481
|
+
default: 40,
|
|
482
|
+
description: "Top-K sampling"
|
|
483
|
+
},
|
|
484
|
+
frequencyPenalty: {
|
|
485
|
+
type: "number",
|
|
486
|
+
min: -2,
|
|
487
|
+
max: 2,
|
|
488
|
+
default: 0,
|
|
489
|
+
description: "Penalize frequent tokens"
|
|
490
|
+
},
|
|
491
|
+
presencePenalty: {
|
|
492
|
+
type: "number",
|
|
493
|
+
min: -2,
|
|
494
|
+
max: 2,
|
|
495
|
+
default: 0,
|
|
496
|
+
description: "Penalize repeated topics"
|
|
497
|
+
},
|
|
498
|
+
stopSequences: { type: "string", description: "Stop sequences" },
|
|
499
|
+
candidateCount: {
|
|
500
|
+
type: "number",
|
|
501
|
+
min: 1,
|
|
502
|
+
default: 1,
|
|
503
|
+
description: "Candidate count"
|
|
504
|
+
},
|
|
505
|
+
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
506
|
+
seed: { type: "number", description: "Random seed" },
|
|
507
|
+
responseMimeType: { type: "string", description: "Response MIME type" },
|
|
508
|
+
responseSchema: { type: "string", description: "Response schema" }
|
|
509
|
+
};
|
|
281
510
|
var PARAM_SPECS = {
|
|
282
511
|
openai: {
|
|
283
512
|
temperature: {
|
|
@@ -325,6 +554,7 @@ var PARAM_SPECS = {
|
|
|
325
554
|
description: "Reasoning effort"
|
|
326
555
|
}
|
|
327
556
|
},
|
|
557
|
+
azure: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
328
558
|
anthropic: {
|
|
329
559
|
temperature: {
|
|
330
560
|
type: "number",
|
|
@@ -426,6 +656,7 @@ var PARAM_SPECS = {
|
|
|
426
656
|
responseMimeType: { type: "string", description: "Response MIME type" },
|
|
427
657
|
responseSchema: { type: "string", description: "Response schema" }
|
|
428
658
|
},
|
|
659
|
+
"google-vertex": GOOGLE_COMPATIBLE_PARAM_SPECS,
|
|
429
660
|
mistral: {
|
|
430
661
|
temperature: {
|
|
431
662
|
type: "number",
|
|
@@ -671,7 +902,33 @@ var PARAM_SPECS = {
|
|
|
671
902
|
default: "medium",
|
|
672
903
|
description: "Reasoning effort"
|
|
673
904
|
}
|
|
674
|
-
}
|
|
905
|
+
},
|
|
906
|
+
xai: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
907
|
+
groq: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
908
|
+
fal: {},
|
|
909
|
+
deepinfra: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
910
|
+
"black-forest-labs": {},
|
|
911
|
+
together: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
912
|
+
fireworks: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
913
|
+
deepseek: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
914
|
+
moonshotai: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
915
|
+
perplexity: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
916
|
+
alibaba: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
917
|
+
cerebras: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
918
|
+
replicate: {},
|
|
919
|
+
prodia: {},
|
|
920
|
+
luma: {},
|
|
921
|
+
bytedance: {},
|
|
922
|
+
kling: {},
|
|
923
|
+
elevenlabs: {},
|
|
924
|
+
assemblyai: {},
|
|
925
|
+
deepgram: {},
|
|
926
|
+
gladia: {},
|
|
927
|
+
lmnt: {},
|
|
928
|
+
hume: {},
|
|
929
|
+
revai: {},
|
|
930
|
+
baseten: OPENAI_COMPATIBLE_PARAM_SPECS,
|
|
931
|
+
huggingface: OPENAI_COMPATIBLE_PARAM_SPECS
|
|
675
932
|
};
|
|
676
933
|
function isReasoningModel(model) {
|
|
677
934
|
const name = model.includes("/") ? model.split("/").pop() : model;
|
|
@@ -728,34 +985,96 @@ function bedrockSupportsCaching(model) {
|
|
|
728
985
|
var CACHE_VALUES = {
|
|
729
986
|
openai: void 0,
|
|
730
987
|
// OpenAI auto-caches; no explicit param
|
|
988
|
+
azure: void 0,
|
|
731
989
|
anthropic: "ephemeral",
|
|
732
990
|
google: void 0,
|
|
733
991
|
// Google uses explicit caching API, not a param
|
|
992
|
+
"google-vertex": void 0,
|
|
734
993
|
mistral: void 0,
|
|
735
994
|
cohere: void 0,
|
|
736
995
|
bedrock: "ephemeral",
|
|
737
996
|
// Supported for Claude models on Bedrock
|
|
738
997
|
openrouter: void 0,
|
|
739
998
|
// Depends on underlying provider
|
|
740
|
-
vercel: void 0
|
|
999
|
+
vercel: void 0,
|
|
741
1000
|
// Depends on underlying provider
|
|
1001
|
+
xai: void 0,
|
|
1002
|
+
groq: void 0,
|
|
1003
|
+
fal: void 0,
|
|
1004
|
+
deepinfra: void 0,
|
|
1005
|
+
"black-forest-labs": void 0,
|
|
1006
|
+
together: void 0,
|
|
1007
|
+
fireworks: void 0,
|
|
1008
|
+
deepseek: void 0,
|
|
1009
|
+
moonshotai: void 0,
|
|
1010
|
+
perplexity: void 0,
|
|
1011
|
+
alibaba: void 0,
|
|
1012
|
+
cerebras: void 0,
|
|
1013
|
+
replicate: void 0,
|
|
1014
|
+
prodia: void 0,
|
|
1015
|
+
luma: void 0,
|
|
1016
|
+
bytedance: void 0,
|
|
1017
|
+
kling: void 0,
|
|
1018
|
+
elevenlabs: void 0,
|
|
1019
|
+
assemblyai: void 0,
|
|
1020
|
+
deepgram: void 0,
|
|
1021
|
+
gladia: void 0,
|
|
1022
|
+
lmnt: void 0,
|
|
1023
|
+
hume: void 0,
|
|
1024
|
+
revai: void 0,
|
|
1025
|
+
baseten: void 0,
|
|
1026
|
+
huggingface: void 0
|
|
742
1027
|
};
|
|
743
1028
|
var CACHE_TTLS = {
|
|
744
1029
|
openai: void 0,
|
|
1030
|
+
azure: void 0,
|
|
745
1031
|
anthropic: ["5m", "1h"],
|
|
746
1032
|
google: void 0,
|
|
1033
|
+
"google-vertex": void 0,
|
|
747
1034
|
mistral: void 0,
|
|
748
1035
|
cohere: void 0,
|
|
749
1036
|
bedrock: ["5m", "1h"],
|
|
750
1037
|
// Claude on Bedrock uses same TTLs as direct Anthropic
|
|
751
1038
|
openrouter: void 0,
|
|
752
|
-
vercel: void 0
|
|
1039
|
+
vercel: void 0,
|
|
1040
|
+
xai: void 0,
|
|
1041
|
+
groq: void 0,
|
|
1042
|
+
fal: void 0,
|
|
1043
|
+
deepinfra: void 0,
|
|
1044
|
+
"black-forest-labs": void 0,
|
|
1045
|
+
together: void 0,
|
|
1046
|
+
fireworks: void 0,
|
|
1047
|
+
deepseek: void 0,
|
|
1048
|
+
moonshotai: void 0,
|
|
1049
|
+
perplexity: void 0,
|
|
1050
|
+
alibaba: void 0,
|
|
1051
|
+
cerebras: void 0,
|
|
1052
|
+
replicate: void 0,
|
|
1053
|
+
prodia: void 0,
|
|
1054
|
+
luma: void 0,
|
|
1055
|
+
bytedance: void 0,
|
|
1056
|
+
kling: void 0,
|
|
1057
|
+
elevenlabs: void 0,
|
|
1058
|
+
assemblyai: void 0,
|
|
1059
|
+
deepgram: void 0,
|
|
1060
|
+
gladia: void 0,
|
|
1061
|
+
lmnt: void 0,
|
|
1062
|
+
hume: void 0,
|
|
1063
|
+
revai: void 0,
|
|
1064
|
+
baseten: void 0,
|
|
1065
|
+
huggingface: void 0
|
|
753
1066
|
};
|
|
754
1067
|
var DURATION_RE = /^\d+[mh]$/;
|
|
755
1068
|
|
|
756
1069
|
// src/provider-meta.ts
|
|
757
1070
|
var PROVIDER_META = [
|
|
758
1071
|
{ id: "openai", name: "OpenAI", host: "api.openai.com", color: "#10a37f" },
|
|
1072
|
+
{
|
|
1073
|
+
id: "azure",
|
|
1074
|
+
name: "Azure OpenAI",
|
|
1075
|
+
host: "models.inference.ai.azure.com",
|
|
1076
|
+
color: "#0078d4"
|
|
1077
|
+
},
|
|
759
1078
|
{
|
|
760
1079
|
id: "anthropic",
|
|
761
1080
|
name: "Anthropic",
|
|
@@ -768,6 +1087,12 @@ var PROVIDER_META = [
|
|
|
768
1087
|
host: "generativelanguage.googleapis.com",
|
|
769
1088
|
color: "#4285f4"
|
|
770
1089
|
},
|
|
1090
|
+
{
|
|
1091
|
+
id: "google-vertex",
|
|
1092
|
+
name: "Google Vertex AI",
|
|
1093
|
+
host: "aiplatform.googleapis.com",
|
|
1094
|
+
color: "#34a853"
|
|
1095
|
+
},
|
|
771
1096
|
{ id: "mistral", name: "Mistral", host: "api.mistral.ai", color: "#ff7000" },
|
|
772
1097
|
{ id: "cohere", name: "Cohere", host: "api.cohere.com", color: "#39594d" },
|
|
773
1098
|
{
|
|
@@ -787,454 +1112,137 @@ var PROVIDER_META = [
|
|
|
787
1112
|
name: "Vercel",
|
|
788
1113
|
host: "gateway.ai.vercel.app",
|
|
789
1114
|
color: "#ededed"
|
|
790
|
-
}
|
|
791
|
-
];
|
|
792
|
-
var MODELS = {
|
|
793
|
-
openai: [
|
|
794
|
-
"gpt-5.2",
|
|
795
|
-
"gpt-5.2-pro",
|
|
796
|
-
"gpt-4.1",
|
|
797
|
-
"gpt-4.1-mini",
|
|
798
|
-
"gpt-4.1-nano",
|
|
799
|
-
"o3",
|
|
800
|
-
"o3-mini",
|
|
801
|
-
"o4-mini",
|
|
802
|
-
"o1-pro"
|
|
803
|
-
],
|
|
804
|
-
anthropic: [
|
|
805
|
-
"claude-opus-4-6",
|
|
806
|
-
"claude-sonnet-4-6",
|
|
807
|
-
"claude-sonnet-4-5",
|
|
808
|
-
"claude-haiku-4-5"
|
|
809
|
-
],
|
|
810
|
-
google: [
|
|
811
|
-
"gemini-3-pro-preview",
|
|
812
|
-
"gemini-3-flash-preview",
|
|
813
|
-
"gemini-2.5-pro",
|
|
814
|
-
"gemini-2.5-flash"
|
|
815
|
-
],
|
|
816
|
-
mistral: [
|
|
817
|
-
"mistral-large-latest",
|
|
818
|
-
"mistral-medium-latest",
|
|
819
|
-
"mistral-small-latest",
|
|
820
|
-
"codestral-latest",
|
|
821
|
-
"magistral-medium-latest"
|
|
822
|
-
],
|
|
823
|
-
cohere: [
|
|
824
|
-
"command-a-03-2025",
|
|
825
|
-
"command-r-plus-08-2024",
|
|
826
|
-
"command-r-08-2024",
|
|
827
|
-
"command-r7b-12-2024"
|
|
828
|
-
],
|
|
829
|
-
bedrock: [
|
|
830
|
-
"anthropic.claude-opus-4-6-v1",
|
|
831
|
-
"anthropic.claude-sonnet-4-6-v1",
|
|
832
|
-
"anthropic.claude-haiku-4-5-v1",
|
|
833
|
-
"amazon.nova-pro-v1",
|
|
834
|
-
"amazon.nova-lite-v1",
|
|
835
|
-
"meta.llama3-70b-instruct-v1:0"
|
|
836
|
-
],
|
|
837
|
-
openrouter: [
|
|
838
|
-
"openai/gpt-5.2",
|
|
839
|
-
"anthropic/claude-opus-4-6",
|
|
840
|
-
"google/gemini-2.5-pro",
|
|
841
|
-
"mistral/mistral-large-latest"
|
|
842
|
-
],
|
|
843
|
-
vercel: [
|
|
844
|
-
"openai/gpt-5.2",
|
|
845
|
-
"anthropic/claude-opus-4-6",
|
|
846
|
-
"google/gemini-2.5-pro",
|
|
847
|
-
"google/gemini-3-pro-preview",
|
|
848
|
-
"google/gemini-3-flash-preview",
|
|
849
|
-
"mistral/mistral-large-latest",
|
|
850
|
-
"qwen/qwen2.5-pro"
|
|
851
|
-
]
|
|
852
|
-
};
|
|
853
|
-
var CANONICAL_PARAM_SPECS = {
|
|
854
|
-
openai: {
|
|
855
|
-
temperature: {
|
|
856
|
-
type: "number",
|
|
857
|
-
min: 0,
|
|
858
|
-
max: 2,
|
|
859
|
-
default: 0.7,
|
|
860
|
-
description: "Controls randomness"
|
|
861
|
-
},
|
|
862
|
-
max_tokens: {
|
|
863
|
-
type: "number",
|
|
864
|
-
min: 1,
|
|
865
|
-
default: 4096,
|
|
866
|
-
description: "Maximum output tokens"
|
|
867
|
-
},
|
|
868
|
-
top_p: {
|
|
869
|
-
type: "number",
|
|
870
|
-
min: 0,
|
|
871
|
-
max: 1,
|
|
872
|
-
default: 1,
|
|
873
|
-
description: "Nucleus sampling"
|
|
874
|
-
},
|
|
875
|
-
frequency_penalty: {
|
|
876
|
-
type: "number",
|
|
877
|
-
min: -2,
|
|
878
|
-
max: 2,
|
|
879
|
-
default: 0,
|
|
880
|
-
description: "Penalize frequent tokens"
|
|
881
|
-
},
|
|
882
|
-
presence_penalty: {
|
|
883
|
-
type: "number",
|
|
884
|
-
min: -2,
|
|
885
|
-
max: 2,
|
|
886
|
-
default: 0,
|
|
887
|
-
description: "Penalize repeated topics"
|
|
888
|
-
},
|
|
889
|
-
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
890
|
-
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
891
|
-
seed: { type: "number", default: "", description: "Random seed" },
|
|
892
|
-
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
893
|
-
effort: {
|
|
894
|
-
type: "enum",
|
|
895
|
-
values: ["none", "minimal", "low", "medium", "high", "xhigh"],
|
|
896
|
-
default: "medium",
|
|
897
|
-
description: "Reasoning effort"
|
|
898
|
-
}
|
|
899
1115
|
},
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
max_tokens: {
|
|
909
|
-
type: "number",
|
|
910
|
-
min: 1,
|
|
911
|
-
default: 4096,
|
|
912
|
-
description: "Maximum output tokens"
|
|
913
|
-
},
|
|
914
|
-
top_p: {
|
|
915
|
-
type: "number",
|
|
916
|
-
min: 0,
|
|
917
|
-
max: 1,
|
|
918
|
-
default: 1,
|
|
919
|
-
description: "Nucleus sampling"
|
|
920
|
-
},
|
|
921
|
-
top_k: {
|
|
922
|
-
type: "number",
|
|
923
|
-
min: 0,
|
|
924
|
-
default: 40,
|
|
925
|
-
description: "Top-K sampling"
|
|
926
|
-
},
|
|
927
|
-
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
928
|
-
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
929
|
-
effort: {
|
|
930
|
-
type: "enum",
|
|
931
|
-
values: ["low", "medium", "high", "max"],
|
|
932
|
-
default: "medium",
|
|
933
|
-
description: "Thinking effort"
|
|
934
|
-
},
|
|
935
|
-
cache: {
|
|
936
|
-
type: "enum",
|
|
937
|
-
values: ["ephemeral"],
|
|
938
|
-
default: "ephemeral",
|
|
939
|
-
description: "Cache control"
|
|
940
|
-
},
|
|
941
|
-
cache_ttl: {
|
|
942
|
-
type: "enum",
|
|
943
|
-
values: ["5m", "1h"],
|
|
944
|
-
default: "5m",
|
|
945
|
-
description: "Cache TTL"
|
|
946
|
-
}
|
|
1116
|
+
{ id: "xai", name: "xAI", host: "api.x.ai", color: "#111111" },
|
|
1117
|
+
{ id: "groq", name: "Groq", host: "api.groq.com", color: "#f55036" },
|
|
1118
|
+
{ id: "fal", name: "Fal", host: "fal.run", color: "#111111" },
|
|
1119
|
+
{
|
|
1120
|
+
id: "deepinfra",
|
|
1121
|
+
name: "DeepInfra",
|
|
1122
|
+
host: "api.deepinfra.com",
|
|
1123
|
+
color: "#2563eb"
|
|
947
1124
|
},
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
default: 0.7,
|
|
954
|
-
description: "Controls randomness"
|
|
955
|
-
},
|
|
956
|
-
max_tokens: {
|
|
957
|
-
type: "number",
|
|
958
|
-
min: 1,
|
|
959
|
-
default: 4096,
|
|
960
|
-
description: "Maximum output tokens"
|
|
961
|
-
},
|
|
962
|
-
top_p: {
|
|
963
|
-
type: "number",
|
|
964
|
-
min: 0,
|
|
965
|
-
max: 1,
|
|
966
|
-
default: 1,
|
|
967
|
-
description: "Nucleus sampling"
|
|
968
|
-
},
|
|
969
|
-
top_k: {
|
|
970
|
-
type: "number",
|
|
971
|
-
min: 0,
|
|
972
|
-
default: 40,
|
|
973
|
-
description: "Top-K sampling"
|
|
974
|
-
},
|
|
975
|
-
frequency_penalty: {
|
|
976
|
-
type: "number",
|
|
977
|
-
min: -2,
|
|
978
|
-
max: 2,
|
|
979
|
-
default: 0,
|
|
980
|
-
description: "Penalize frequent tokens"
|
|
981
|
-
},
|
|
982
|
-
presence_penalty: {
|
|
983
|
-
type: "number",
|
|
984
|
-
min: -2,
|
|
985
|
-
max: 2,
|
|
986
|
-
default: 0,
|
|
987
|
-
description: "Penalize repeated topics"
|
|
988
|
-
},
|
|
989
|
-
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
990
|
-
n: { type: "number", min: 1, default: 1, description: "Candidate count" },
|
|
991
|
-
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
992
|
-
seed: { type: "number", default: "", description: "Random seed" }
|
|
1125
|
+
{
|
|
1126
|
+
id: "black-forest-labs",
|
|
1127
|
+
name: "Black Forest Labs",
|
|
1128
|
+
host: "api.bfl.ai",
|
|
1129
|
+
color: "#111111"
|
|
993
1130
|
},
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
default: 0.7,
|
|
1000
|
-
description: "Controls randomness"
|
|
1001
|
-
},
|
|
1002
|
-
max_tokens: {
|
|
1003
|
-
type: "number",
|
|
1004
|
-
min: 1,
|
|
1005
|
-
default: 4096,
|
|
1006
|
-
description: "Maximum output tokens"
|
|
1007
|
-
},
|
|
1008
|
-
top_p: {
|
|
1009
|
-
type: "number",
|
|
1010
|
-
min: 0,
|
|
1011
|
-
max: 1,
|
|
1012
|
-
default: 1,
|
|
1013
|
-
description: "Nucleus sampling"
|
|
1014
|
-
},
|
|
1015
|
-
frequency_penalty: {
|
|
1016
|
-
type: "number",
|
|
1017
|
-
min: -2,
|
|
1018
|
-
max: 2,
|
|
1019
|
-
default: 0,
|
|
1020
|
-
description: "Penalize frequent tokens"
|
|
1021
|
-
},
|
|
1022
|
-
presence_penalty: {
|
|
1023
|
-
type: "number",
|
|
1024
|
-
min: -2,
|
|
1025
|
-
max: 2,
|
|
1026
|
-
default: 0,
|
|
1027
|
-
description: "Penalize repeated topics"
|
|
1028
|
-
},
|
|
1029
|
-
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
1030
|
-
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
1031
|
-
seed: { type: "number", default: "", description: "Random seed" },
|
|
1032
|
-
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
1033
|
-
safe_prompt: {
|
|
1034
|
-
type: "boolean",
|
|
1035
|
-
default: false,
|
|
1036
|
-
description: "Enable safe prompt"
|
|
1037
|
-
},
|
|
1038
|
-
min_tokens: {
|
|
1039
|
-
type: "number",
|
|
1040
|
-
min: 0,
|
|
1041
|
-
default: 0,
|
|
1042
|
-
description: "Minimum tokens"
|
|
1043
|
-
}
|
|
1131
|
+
{
|
|
1132
|
+
id: "together",
|
|
1133
|
+
name: "Together.ai",
|
|
1134
|
+
host: "api.together.xyz",
|
|
1135
|
+
color: "#ff4f00"
|
|
1044
1136
|
},
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
default: 0.7,
|
|
1051
|
-
description: "Controls randomness"
|
|
1052
|
-
},
|
|
1053
|
-
max_tokens: {
|
|
1054
|
-
type: "number",
|
|
1055
|
-
min: 1,
|
|
1056
|
-
default: 4096,
|
|
1057
|
-
description: "Maximum output tokens"
|
|
1058
|
-
},
|
|
1059
|
-
top_p: {
|
|
1060
|
-
type: "number",
|
|
1061
|
-
min: 0,
|
|
1062
|
-
max: 1,
|
|
1063
|
-
default: 1,
|
|
1064
|
-
description: "Nucleus sampling (p)"
|
|
1065
|
-
},
|
|
1066
|
-
top_k: {
|
|
1067
|
-
type: "number",
|
|
1068
|
-
min: 0,
|
|
1069
|
-
max: 500,
|
|
1070
|
-
default: 40,
|
|
1071
|
-
description: "Top-K sampling (k)"
|
|
1072
|
-
},
|
|
1073
|
-
frequency_penalty: {
|
|
1074
|
-
type: "number",
|
|
1075
|
-
min: 0,
|
|
1076
|
-
max: 1,
|
|
1077
|
-
default: 0,
|
|
1078
|
-
description: "Penalize frequent tokens"
|
|
1079
|
-
},
|
|
1080
|
-
presence_penalty: {
|
|
1081
|
-
type: "number",
|
|
1082
|
-
min: 0,
|
|
1083
|
-
max: 1,
|
|
1084
|
-
default: 0,
|
|
1085
|
-
description: "Penalize repeated topics"
|
|
1086
|
-
},
|
|
1087
|
-
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
1088
|
-
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
1089
|
-
seed: { type: "number", default: "", description: "Random seed" }
|
|
1137
|
+
{
|
|
1138
|
+
id: "fireworks",
|
|
1139
|
+
name: "Fireworks",
|
|
1140
|
+
host: "api.fireworks.ai",
|
|
1141
|
+
color: "#7c3aed"
|
|
1090
1142
|
},
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
default: 0.7,
|
|
1097
|
-
description: "Controls randomness"
|
|
1098
|
-
},
|
|
1099
|
-
max_tokens: {
|
|
1100
|
-
type: "number",
|
|
1101
|
-
min: 1,
|
|
1102
|
-
default: 4096,
|
|
1103
|
-
description: "Maximum output tokens"
|
|
1104
|
-
},
|
|
1105
|
-
top_p: {
|
|
1106
|
-
type: "number",
|
|
1107
|
-
min: 0,
|
|
1108
|
-
max: 1,
|
|
1109
|
-
default: 1,
|
|
1110
|
-
description: "Nucleus sampling"
|
|
1111
|
-
},
|
|
1112
|
-
top_k: {
|
|
1113
|
-
type: "number",
|
|
1114
|
-
min: 0,
|
|
1115
|
-
default: 40,
|
|
1116
|
-
description: "Top-K sampling"
|
|
1117
|
-
},
|
|
1118
|
-
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
1119
|
-
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
1120
|
-
cache: {
|
|
1121
|
-
type: "enum",
|
|
1122
|
-
values: ["ephemeral"],
|
|
1123
|
-
default: "ephemeral",
|
|
1124
|
-
description: "Cache control"
|
|
1125
|
-
},
|
|
1126
|
-
cache_ttl: {
|
|
1127
|
-
type: "enum",
|
|
1128
|
-
values: ["5m", "1h"],
|
|
1129
|
-
default: "5m",
|
|
1130
|
-
description: "Cache TTL"
|
|
1131
|
-
}
|
|
1143
|
+
{
|
|
1144
|
+
id: "deepseek",
|
|
1145
|
+
name: "DeepSeek",
|
|
1146
|
+
host: "api.deepseek.com",
|
|
1147
|
+
color: "#4d6bfe"
|
|
1132
1148
|
},
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
default: 0.7,
|
|
1139
|
-
description: "Controls randomness"
|
|
1140
|
-
},
|
|
1141
|
-
max_tokens: {
|
|
1142
|
-
type: "number",
|
|
1143
|
-
min: 1,
|
|
1144
|
-
default: 4096,
|
|
1145
|
-
description: "Maximum output tokens"
|
|
1146
|
-
},
|
|
1147
|
-
top_p: {
|
|
1148
|
-
type: "number",
|
|
1149
|
-
min: 0,
|
|
1150
|
-
max: 1,
|
|
1151
|
-
default: 1,
|
|
1152
|
-
description: "Nucleus sampling"
|
|
1153
|
-
},
|
|
1154
|
-
top_k: {
|
|
1155
|
-
type: "number",
|
|
1156
|
-
min: 0,
|
|
1157
|
-
default: 40,
|
|
1158
|
-
description: "Top-K sampling"
|
|
1159
|
-
},
|
|
1160
|
-
frequency_penalty: {
|
|
1161
|
-
type: "number",
|
|
1162
|
-
min: -2,
|
|
1163
|
-
max: 2,
|
|
1164
|
-
default: 0,
|
|
1165
|
-
description: "Penalize frequent tokens"
|
|
1166
|
-
},
|
|
1167
|
-
presence_penalty: {
|
|
1168
|
-
type: "number",
|
|
1169
|
-
min: -2,
|
|
1170
|
-
max: 2,
|
|
1171
|
-
default: 0,
|
|
1172
|
-
description: "Penalize repeated topics"
|
|
1173
|
-
},
|
|
1174
|
-
stop: { type: "string", default: "", description: "Stop sequences" },
|
|
1175
|
-
n: { type: "number", min: 1, default: 1, description: "Completions count" },
|
|
1176
|
-
seed: { type: "number", default: "", description: "Random seed" },
|
|
1177
|
-
stream: { type: "boolean", default: false, description: "Stream response" },
|
|
1178
|
-
effort: {
|
|
1179
|
-
type: "enum",
|
|
1180
|
-
values: ["none", "minimal", "low", "medium", "high", "xhigh"],
|
|
1181
|
-
default: "medium",
|
|
1182
|
-
description: "Reasoning effort"
|
|
1183
|
-
}
|
|
1149
|
+
{
|
|
1150
|
+
id: "moonshotai",
|
|
1151
|
+
name: "Moonshot AI",
|
|
1152
|
+
host: "api.moonshot.ai",
|
|
1153
|
+
color: "#6b46ff"
|
|
1184
1154
|
},
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1155
|
+
{
|
|
1156
|
+
id: "perplexity",
|
|
1157
|
+
name: "Perplexity",
|
|
1158
|
+
host: "api.perplexity.ai",
|
|
1159
|
+
color: "#20b8cd"
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
id: "alibaba",
|
|
1163
|
+
name: "Alibaba",
|
|
1164
|
+
host: "dashscope-intl.aliyuncs.com",
|
|
1165
|
+
color: "#ff6a00"
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
id: "cerebras",
|
|
1169
|
+
name: "Cerebras",
|
|
1170
|
+
host: "api.cerebras.ai",
|
|
1171
|
+
color: "#d71920"
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
id: "replicate",
|
|
1175
|
+
name: "Replicate",
|
|
1176
|
+
host: "api.replicate.com",
|
|
1177
|
+
color: "#111111"
|
|
1178
|
+
},
|
|
1179
|
+
{ id: "prodia", name: "Prodia", host: "api.prodia.com", color: "#6d28d9" },
|
|
1180
|
+
{ id: "luma", name: "Luma", host: "api.lumalabs.ai", color: "#111111" },
|
|
1181
|
+
{
|
|
1182
|
+
id: "bytedance",
|
|
1183
|
+
name: "ByteDance",
|
|
1184
|
+
host: "ark.cn-beijing.volces.com",
|
|
1185
|
+
color: "#2563eb"
|
|
1186
|
+
},
|
|
1187
|
+
{ id: "kling", name: "Kling AI", host: "api.klingai.com", color: "#111111" },
|
|
1188
|
+
{
|
|
1189
|
+
id: "elevenlabs",
|
|
1190
|
+
name: "ElevenLabs",
|
|
1191
|
+
host: "api.elevenlabs.io",
|
|
1192
|
+
color: "#111111"
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
id: "assemblyai",
|
|
1196
|
+
name: "AssemblyAI",
|
|
1197
|
+
host: "api.assemblyai.com",
|
|
1198
|
+
color: "#4f46e5"
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
id: "deepgram",
|
|
1202
|
+
name: "Deepgram",
|
|
1203
|
+
host: "api.deepgram.com",
|
|
1204
|
+
color: "#13ef93"
|
|
1205
|
+
},
|
|
1206
|
+
{ id: "gladia", name: "Gladia", host: "api.gladia.io", color: "#7c3aed" },
|
|
1207
|
+
{ id: "lmnt", name: "LMNT", host: "api.lmnt.com", color: "#14b8a6" },
|
|
1208
|
+
{ id: "hume", name: "Hume", host: "api.hume.ai", color: "#8b5cf6" },
|
|
1209
|
+
{ id: "revai", name: "Rev.ai", host: "api.rev.ai", color: "#ef4444" },
|
|
1210
|
+
{
|
|
1211
|
+
id: "baseten",
|
|
1212
|
+
name: "Baseten",
|
|
1213
|
+
host: "api.baseten.co",
|
|
1214
|
+
color: "#111111"
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
id: "huggingface",
|
|
1218
|
+
name: "Hugging Face",
|
|
1219
|
+
host: "api-inference.huggingface.co",
|
|
1220
|
+
color: "#ffcc4d"
|
|
1221
|
+
}
|
|
1222
|
+
];
|
|
1223
|
+
function toCanonicalParamSpec(spec) {
|
|
1224
|
+
return {
|
|
1225
|
+
...spec,
|
|
1226
|
+
type: spec.values ? "enum" : spec.type,
|
|
1227
|
+
default: spec.default ?? (spec.type === "string" && !spec.values ? "" : void 0)
|
|
1228
|
+
};
|
|
1229
|
+
}
|
|
1230
|
+
function deriveCanonicalParamSpecs() {
|
|
1231
|
+
const specs = {};
|
|
1232
|
+
for (const provider of Object.keys(PROVIDER_PARAMS)) {
|
|
1233
|
+
specs[provider] = {};
|
|
1234
|
+
for (const [canonicalName, providerName] of Object.entries(
|
|
1235
|
+
PROVIDER_PARAMS[provider]
|
|
1236
|
+
)) {
|
|
1237
|
+
const spec = PARAM_SPECS[provider][providerName];
|
|
1238
|
+
if (spec) {
|
|
1239
|
+
specs[provider][canonicalName] = toCanonicalParamSpec(spec);
|
|
1240
|
+
}
|
|
1235
1241
|
}
|
|
1236
1242
|
}
|
|
1237
|
-
|
|
1243
|
+
return specs;
|
|
1244
|
+
}
|
|
1245
|
+
var CANONICAL_PARAM_SPECS = deriveCanonicalParamSpecs();
|
|
1238
1246
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1239
1247
|
0 && (module.exports = {
|
|
1240
1248
|
ALIASES,
|
|
@@ -1243,7 +1251,6 @@ var CANONICAL_PARAM_SPECS = {
|
|
|
1243
1251
|
CANONICAL_PARAM_SPECS,
|
|
1244
1252
|
DURATION_RE,
|
|
1245
1253
|
HOST_ALIASES,
|
|
1246
|
-
MODELS,
|
|
1247
1254
|
PARAM_SPECS,
|
|
1248
1255
|
PROVIDER_META,
|
|
1249
1256
|
PROVIDER_PARAMS,
|
|
@@ -1258,4 +1265,3 @@ var CANONICAL_PARAM_SPECS = {
|
|
|
1258
1265
|
providerFromHostAlias,
|
|
1259
1266
|
resolveHostAlias
|
|
1260
1267
|
});
|
|
1261
|
-
//# sourceMappingURL=providers.cjs.map
|