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.
Files changed (47) hide show
  1. package/README.md +115 -45
  2. package/dist/ai-sdk.cjs +1177 -0
  3. package/dist/ai-sdk.cjs.map +1 -0
  4. package/dist/ai-sdk.d.cts +28 -0
  5. package/dist/ai-sdk.d.ts +28 -0
  6. package/dist/ai-sdk.js +544 -0
  7. package/dist/ai-sdk.js.map +1 -0
  8. package/dist/{chunk-UYMVUTLV.js → chunk-7HE4RH6X.js} +5 -9
  9. package/dist/chunk-7HE4RH6X.js.map +1 -0
  10. package/dist/{chunk-MPIHGH6L.js → chunk-NZR5DUX5.js} +5 -4
  11. package/dist/chunk-NZR5DUX5.js.map +1 -0
  12. package/dist/chunk-OCJX4QFJ.js +1044 -0
  13. package/dist/chunk-OCJX4QFJ.js.map +1 -0
  14. package/dist/{chunk-FCEV23OT.js → chunk-TQJ2ABCT.js} +9 -3
  15. package/dist/chunk-TQJ2ABCT.js.map +1 -0
  16. package/dist/index.cjs +760 -87
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +1 -1
  19. package/dist/index.d.ts +4 -4
  20. package/dist/index.js +9 -4
  21. package/dist/normalize.cjs +176 -5
  22. package/dist/normalize.cjs.map +1 -1
  23. package/dist/normalize.d.cts +1 -1
  24. package/dist/normalize.d.ts +2 -2
  25. package/dist/normalize.js +2 -2
  26. package/dist/parse.cjs +100 -2
  27. package/dist/parse.cjs.map +1 -1
  28. package/dist/parse.d.cts +5 -1
  29. package/dist/parse.d.ts +5 -1
  30. package/dist/parse.js +2 -1
  31. package/dist/{provider-core-DinpG40u.d.cts → provider-core-B934MuhJ.d.cts} +21 -2
  32. package/dist/{provider-core-DinpG40u.d.ts → provider-core-B934MuhJ.d.ts} +21 -2
  33. package/dist/providers.cjs +1396 -114
  34. package/dist/providers.cjs.map +1 -1
  35. package/dist/providers.d.cts +2 -2
  36. package/dist/providers.d.ts +2 -2
  37. package/dist/providers.js +672 -61
  38. package/dist/providers.js.map +1 -1
  39. package/dist/validate.cjs +750 -82
  40. package/dist/validate.cjs.map +1 -1
  41. package/dist/validate.js +4 -4
  42. package/package.json +13 -3
  43. package/dist/chunk-FCEV23OT.js.map +0 -1
  44. package/dist/chunk-MPIHGH6L.js.map +0 -1
  45. package/dist/chunk-UYMVUTLV.js.map +0 -1
  46. package/dist/chunk-XID353H7.js +0 -370
  47. package/dist/chunk-XID353H7.js.map +0 -1
package/dist/providers.js CHANGED
@@ -3,6 +3,7 @@ import {
3
3
  CACHE_TTLS,
4
4
  CACHE_VALUES,
5
5
  DURATION_RE,
6
+ HOST_ALIASES,
6
7
  PARAM_SPECS,
7
8
  PROVIDER_PARAMS,
8
9
  REASONING_MODEL_UNSUPPORTED,
@@ -12,19 +13,164 @@ import {
12
13
  detectGatewaySubProvider,
13
14
  detectProvider,
14
15
  isGatewayProvider,
15
- isReasoningModel
16
- } from "./chunk-XID353H7.js";
16
+ isReasoningModel,
17
+ providerFromHostAlias,
18
+ resolveHostAlias
19
+ } from "./chunk-OCJX4QFJ.js";
17
20
 
18
21
  // src/provider-meta.ts
19
22
  var PROVIDER_META = [
20
23
  { id: "openai", name: "OpenAI", host: "api.openai.com", color: "#10a37f" },
21
- { id: "anthropic", name: "Anthropic", host: "api.anthropic.com", color: "#e8956a" },
22
- { id: "google", name: "Google", host: "generativelanguage.googleapis.com", color: "#4285f4" },
24
+ {
25
+ id: "azure",
26
+ name: "Azure OpenAI",
27
+ host: "models.inference.ai.azure.com",
28
+ color: "#0078d4"
29
+ },
30
+ {
31
+ id: "anthropic",
32
+ name: "Anthropic",
33
+ host: "api.anthropic.com",
34
+ color: "#e8956a"
35
+ },
36
+ {
37
+ id: "google",
38
+ name: "Google",
39
+ host: "generativelanguage.googleapis.com",
40
+ color: "#4285f4"
41
+ },
42
+ {
43
+ id: "google-vertex",
44
+ name: "Google Vertex AI",
45
+ host: "aiplatform.googleapis.com",
46
+ color: "#34a853"
47
+ },
23
48
  { id: "mistral", name: "Mistral", host: "api.mistral.ai", color: "#ff7000" },
24
49
  { id: "cohere", name: "Cohere", host: "api.cohere.com", color: "#39594d" },
25
- { id: "bedrock", name: "Bedrock", host: "bedrock-runtime.us-east-1.amazonaws.com", color: "#ff9900" },
26
- { id: "openrouter", name: "OpenRouter", host: "openrouter.ai", color: "#818cf8" },
27
- { id: "vercel", name: "Vercel", host: "gateway.ai.vercel.app", color: "#ededed" }
50
+ {
51
+ id: "bedrock",
52
+ name: "Bedrock",
53
+ host: "bedrock-runtime.us-east-1.amazonaws.com",
54
+ color: "#ff9900"
55
+ },
56
+ {
57
+ id: "openrouter",
58
+ name: "OpenRouter",
59
+ host: "openrouter.ai",
60
+ color: "#818cf8"
61
+ },
62
+ {
63
+ id: "vercel",
64
+ name: "Vercel",
65
+ host: "gateway.ai.vercel.app",
66
+ color: "#ededed"
67
+ },
68
+ { id: "xai", name: "xAI", host: "api.x.ai", color: "#111111" },
69
+ { id: "groq", name: "Groq", host: "api.groq.com", color: "#f55036" },
70
+ { id: "fal", name: "Fal", host: "fal.run", color: "#111111" },
71
+ {
72
+ id: "deepinfra",
73
+ name: "DeepInfra",
74
+ host: "api.deepinfra.com",
75
+ color: "#2563eb"
76
+ },
77
+ {
78
+ id: "black-forest-labs",
79
+ name: "Black Forest Labs",
80
+ host: "api.bfl.ai",
81
+ color: "#111111"
82
+ },
83
+ {
84
+ id: "together",
85
+ name: "Together.ai",
86
+ host: "api.together.xyz",
87
+ color: "#ff4f00"
88
+ },
89
+ {
90
+ id: "fireworks",
91
+ name: "Fireworks",
92
+ host: "api.fireworks.ai",
93
+ color: "#7c3aed"
94
+ },
95
+ {
96
+ id: "deepseek",
97
+ name: "DeepSeek",
98
+ host: "api.deepseek.com",
99
+ color: "#4d6bfe"
100
+ },
101
+ {
102
+ id: "moonshotai",
103
+ name: "Moonshot AI",
104
+ host: "api.moonshot.ai",
105
+ color: "#6b46ff"
106
+ },
107
+ {
108
+ id: "perplexity",
109
+ name: "Perplexity",
110
+ host: "api.perplexity.ai",
111
+ color: "#20b8cd"
112
+ },
113
+ {
114
+ id: "alibaba",
115
+ name: "Alibaba",
116
+ host: "dashscope-intl.aliyuncs.com",
117
+ color: "#ff6a00"
118
+ },
119
+ {
120
+ id: "cerebras",
121
+ name: "Cerebras",
122
+ host: "api.cerebras.ai",
123
+ color: "#d71920"
124
+ },
125
+ {
126
+ id: "replicate",
127
+ name: "Replicate",
128
+ host: "api.replicate.com",
129
+ color: "#111111"
130
+ },
131
+ { id: "prodia", name: "Prodia", host: "api.prodia.com", color: "#6d28d9" },
132
+ { id: "luma", name: "Luma", host: "api.lumalabs.ai", color: "#111111" },
133
+ {
134
+ id: "bytedance",
135
+ name: "ByteDance",
136
+ host: "ark.cn-beijing.volces.com",
137
+ color: "#2563eb"
138
+ },
139
+ { id: "kling", name: "Kling AI", host: "api.klingai.com", color: "#111111" },
140
+ {
141
+ id: "elevenlabs",
142
+ name: "ElevenLabs",
143
+ host: "api.elevenlabs.io",
144
+ color: "#111111"
145
+ },
146
+ {
147
+ id: "assemblyai",
148
+ name: "AssemblyAI",
149
+ host: "api.assemblyai.com",
150
+ color: "#4f46e5"
151
+ },
152
+ {
153
+ id: "deepgram",
154
+ name: "Deepgram",
155
+ host: "api.deepgram.com",
156
+ color: "#13ef93"
157
+ },
158
+ { id: "gladia", name: "Gladia", host: "api.gladia.io", color: "#7c3aed" },
159
+ { id: "lmnt", name: "LMNT", host: "api.lmnt.com", color: "#14b8a6" },
160
+ { id: "hume", name: "Hume", host: "api.hume.ai", color: "#8b5cf6" },
161
+ { id: "revai", name: "Rev.ai", host: "api.rev.ai", color: "#ef4444" },
162
+ {
163
+ id: "baseten",
164
+ name: "Baseten",
165
+ host: "api.baseten.co",
166
+ color: "#111111"
167
+ },
168
+ {
169
+ id: "huggingface",
170
+ name: "Hugging Face",
171
+ host: "api-inference.huggingface.co",
172
+ color: "#ffcc4d"
173
+ }
28
174
  ];
29
175
  var MODELS = {
30
176
  openai: [
@@ -38,6 +184,7 @@ var MODELS = {
38
184
  "o4-mini",
39
185
  "o1-pro"
40
186
  ],
187
+ azure: ["gpt-5.2", "gpt-4.1", "o3", "o4-mini"],
41
188
  anthropic: [
42
189
  "claude-opus-4-6",
43
190
  "claude-sonnet-4-6",
@@ -50,6 +197,12 @@ var MODELS = {
50
197
  "gemini-2.5-pro",
51
198
  "gemini-2.5-flash"
52
199
  ],
200
+ "google-vertex": [
201
+ "gemini-3-pro-preview",
202
+ "gemini-3-flash-preview",
203
+ "gemini-2.5-pro",
204
+ "gemini-2.5-flash"
205
+ ],
53
206
  mistral: [
54
207
  "mistral-large-latest",
55
208
  "mistral-medium-latest",
@@ -85,104 +238,559 @@ var MODELS = {
85
238
  "google/gemini-3-flash-preview",
86
239
  "mistral/mistral-large-latest",
87
240
  "qwen/qwen2.5-pro"
241
+ ],
242
+ xai: ["grok-4", "grok-3", "grok-3-mini"],
243
+ groq: ["openai/gpt-oss-120b", "llama-3.3-70b-versatile"],
244
+ fal: ["fal-ai/flux-pro", "fal-ai/imagen4/preview"],
245
+ deepinfra: [
246
+ "meta-llama/Meta-Llama-3.1-70B-Instruct",
247
+ "deepseek-ai/DeepSeek-V3"
248
+ ],
249
+ "black-forest-labs": ["flux-pro-1.1", "flux-kontext-pro"],
250
+ together: [
251
+ "meta-llama/Llama-3.3-70B-Instruct-Turbo",
252
+ "deepseek-ai/DeepSeek-V3"
253
+ ],
254
+ fireworks: [
255
+ "accounts/fireworks/models/llama-v3p1-70b-instruct",
256
+ "accounts/fireworks/models/deepseek-v3"
257
+ ],
258
+ deepseek: ["deepseek-chat", "deepseek-reasoner"],
259
+ moonshotai: ["kimi-k2-0905-preview", "moonshot-v1-128k"],
260
+ perplexity: ["sonar", "sonar-pro", "sonar-reasoning"],
261
+ alibaba: ["qwen-plus", "qwen-max", "qwen3-coder-plus"],
262
+ cerebras: ["llama3.1-8b", "llama-3.3-70b"],
263
+ replicate: [
264
+ "black-forest-labs/flux-schnell",
265
+ "meta/meta-llama-3-70b-instruct"
266
+ ],
267
+ prodia: ["sdxl", "flux-schnell"],
268
+ luma: ["ray-2", "photon-1"],
269
+ bytedance: ["seedream-4-0", "seedance-1-0-pro"],
270
+ kling: ["kling-v2.1", "kling-v1.6"],
271
+ elevenlabs: ["eleven_multilingual_v2", "eleven_turbo_v2_5"],
272
+ assemblyai: ["universal"],
273
+ deepgram: ["nova-3", "nova-2"],
274
+ gladia: ["solaria-1"],
275
+ lmnt: ["aurora"],
276
+ hume: ["octave"],
277
+ revai: ["machine"],
278
+ baseten: ["meta-llama/Llama-3.1-8B-Instruct", "deepseek-ai/DeepSeek-R1"],
279
+ huggingface: [
280
+ "meta-llama/Llama-3.1-8B-Instruct",
281
+ "mistralai/Mistral-7B-Instruct-v0.3"
88
282
  ]
89
283
  };
284
+ var OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS = {
285
+ temperature: {
286
+ type: "number",
287
+ min: 0,
288
+ max: 2,
289
+ default: 0.7,
290
+ description: "Controls randomness"
291
+ },
292
+ max_tokens: {
293
+ type: "number",
294
+ min: 1,
295
+ default: 4096,
296
+ description: "Maximum output tokens"
297
+ },
298
+ top_p: {
299
+ type: "number",
300
+ min: 0,
301
+ max: 1,
302
+ default: 1,
303
+ description: "Nucleus sampling"
304
+ },
305
+ top_k: {
306
+ type: "number",
307
+ min: 0,
308
+ default: 40,
309
+ description: "Top-K sampling"
310
+ },
311
+ frequency_penalty: {
312
+ type: "number",
313
+ min: -2,
314
+ max: 2,
315
+ default: 0,
316
+ description: "Penalize frequent tokens"
317
+ },
318
+ presence_penalty: {
319
+ type: "number",
320
+ min: -2,
321
+ max: 2,
322
+ default: 0,
323
+ description: "Penalize repeated topics"
324
+ },
325
+ stop: { type: "string", default: "", description: "Stop sequences" },
326
+ n: { type: "number", min: 1, default: 1, description: "Completions count" },
327
+ seed: { type: "number", default: "", description: "Random seed" },
328
+ stream: { type: "boolean", default: false, description: "Stream response" },
329
+ effort: {
330
+ type: "enum",
331
+ values: ["none", "minimal", "low", "medium", "high", "xhigh"],
332
+ default: "medium",
333
+ description: "Reasoning effort"
334
+ }
335
+ };
336
+ var GOOGLE_COMPATIBLE_CANONICAL_PARAM_SPECS = {
337
+ temperature: {
338
+ type: "number",
339
+ min: 0,
340
+ max: 2,
341
+ default: 0.7,
342
+ description: "Controls randomness"
343
+ },
344
+ max_tokens: {
345
+ type: "number",
346
+ min: 1,
347
+ default: 4096,
348
+ description: "Maximum output tokens"
349
+ },
350
+ top_p: {
351
+ type: "number",
352
+ min: 0,
353
+ max: 1,
354
+ default: 1,
355
+ description: "Nucleus sampling"
356
+ },
357
+ top_k: {
358
+ type: "number",
359
+ min: 0,
360
+ default: 40,
361
+ description: "Top-K sampling"
362
+ },
363
+ frequency_penalty: {
364
+ type: "number",
365
+ min: -2,
366
+ max: 2,
367
+ default: 0,
368
+ description: "Penalize frequent tokens"
369
+ },
370
+ presence_penalty: {
371
+ type: "number",
372
+ min: -2,
373
+ max: 2,
374
+ default: 0,
375
+ description: "Penalize repeated topics"
376
+ },
377
+ stop: { type: "string", default: "", description: "Stop sequences" },
378
+ n: { type: "number", min: 1, default: 1, description: "Candidate count" },
379
+ stream: { type: "boolean", default: false, description: "Stream response" },
380
+ seed: { type: "number", default: "", description: "Random seed" }
381
+ };
90
382
  var CANONICAL_PARAM_SPECS = {
91
383
  openai: {
92
- temperature: { type: "number", min: 0, max: 2, default: 0.7, description: "Controls randomness" },
93
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
94
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
95
- frequency_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize frequent tokens" },
96
- presence_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize repeated topics" },
384
+ temperature: {
385
+ type: "number",
386
+ min: 0,
387
+ max: 2,
388
+ default: 0.7,
389
+ description: "Controls randomness"
390
+ },
391
+ max_tokens: {
392
+ type: "number",
393
+ min: 1,
394
+ default: 4096,
395
+ description: "Maximum output tokens"
396
+ },
397
+ top_p: {
398
+ type: "number",
399
+ min: 0,
400
+ max: 1,
401
+ default: 1,
402
+ description: "Nucleus sampling"
403
+ },
404
+ frequency_penalty: {
405
+ type: "number",
406
+ min: -2,
407
+ max: 2,
408
+ default: 0,
409
+ description: "Penalize frequent tokens"
410
+ },
411
+ presence_penalty: {
412
+ type: "number",
413
+ min: -2,
414
+ max: 2,
415
+ default: 0,
416
+ description: "Penalize repeated topics"
417
+ },
97
418
  stop: { type: "string", default: "", description: "Stop sequences" },
98
419
  n: { type: "number", min: 1, default: 1, description: "Completions count" },
99
420
  seed: { type: "number", default: "", description: "Random seed" },
100
421
  stream: { type: "boolean", default: false, description: "Stream response" },
101
- effort: { type: "enum", values: ["none", "minimal", "low", "medium", "high", "xhigh"], default: "medium", description: "Reasoning effort" }
422
+ effort: {
423
+ type: "enum",
424
+ values: ["none", "minimal", "low", "medium", "high", "xhigh"],
425
+ default: "medium",
426
+ description: "Reasoning effort"
427
+ }
102
428
  },
429
+ azure: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
103
430
  anthropic: {
104
- temperature: { type: "number", min: 0, max: 1, default: 0.7, description: "Controls randomness" },
105
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
106
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
107
- top_k: { type: "number", min: 0, default: 40, description: "Top-K sampling" },
431
+ temperature: {
432
+ type: "number",
433
+ min: 0,
434
+ max: 1,
435
+ default: 0.7,
436
+ description: "Controls randomness"
437
+ },
438
+ max_tokens: {
439
+ type: "number",
440
+ min: 1,
441
+ default: 4096,
442
+ description: "Maximum output tokens"
443
+ },
444
+ top_p: {
445
+ type: "number",
446
+ min: 0,
447
+ max: 1,
448
+ default: 1,
449
+ description: "Nucleus sampling"
450
+ },
451
+ top_k: {
452
+ type: "number",
453
+ min: 0,
454
+ default: 40,
455
+ description: "Top-K sampling"
456
+ },
108
457
  stop: { type: "string", default: "", description: "Stop sequences" },
109
458
  stream: { type: "boolean", default: false, description: "Stream response" },
110
- effort: { type: "enum", values: ["low", "medium", "high", "max"], default: "medium", description: "Thinking effort" },
111
- cache: { type: "enum", values: ["ephemeral"], default: "ephemeral", description: "Cache control" },
112
- cache_ttl: { type: "enum", values: ["5m", "1h"], default: "5m", description: "Cache TTL" }
459
+ effort: {
460
+ type: "enum",
461
+ values: ["low", "medium", "high", "max"],
462
+ default: "medium",
463
+ description: "Thinking effort"
464
+ },
465
+ cache: {
466
+ type: "enum",
467
+ values: ["ephemeral"],
468
+ default: "ephemeral",
469
+ description: "Cache control"
470
+ },
471
+ cache_ttl: {
472
+ type: "enum",
473
+ values: ["5m", "1h"],
474
+ default: "5m",
475
+ description: "Cache TTL"
476
+ }
113
477
  },
114
478
  google: {
115
- temperature: { type: "number", min: 0, max: 2, default: 0.7, description: "Controls randomness" },
116
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
117
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
118
- top_k: { type: "number", min: 0, default: 40, description: "Top-K sampling" },
119
- frequency_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize frequent tokens" },
120
- presence_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize repeated topics" },
479
+ temperature: {
480
+ type: "number",
481
+ min: 0,
482
+ max: 2,
483
+ default: 0.7,
484
+ description: "Controls randomness"
485
+ },
486
+ max_tokens: {
487
+ type: "number",
488
+ min: 1,
489
+ default: 4096,
490
+ description: "Maximum output tokens"
491
+ },
492
+ top_p: {
493
+ type: "number",
494
+ min: 0,
495
+ max: 1,
496
+ default: 1,
497
+ description: "Nucleus sampling"
498
+ },
499
+ top_k: {
500
+ type: "number",
501
+ min: 0,
502
+ default: 40,
503
+ description: "Top-K sampling"
504
+ },
505
+ frequency_penalty: {
506
+ type: "number",
507
+ min: -2,
508
+ max: 2,
509
+ default: 0,
510
+ description: "Penalize frequent tokens"
511
+ },
512
+ presence_penalty: {
513
+ type: "number",
514
+ min: -2,
515
+ max: 2,
516
+ default: 0,
517
+ description: "Penalize repeated topics"
518
+ },
121
519
  stop: { type: "string", default: "", description: "Stop sequences" },
122
520
  n: { type: "number", min: 1, default: 1, description: "Candidate count" },
123
521
  stream: { type: "boolean", default: false, description: "Stream response" },
124
522
  seed: { type: "number", default: "", description: "Random seed" }
125
523
  },
524
+ "google-vertex": GOOGLE_COMPATIBLE_CANONICAL_PARAM_SPECS,
126
525
  mistral: {
127
- temperature: { type: "number", min: 0, max: 1, default: 0.7, description: "Controls randomness" },
128
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
129
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
130
- frequency_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize frequent tokens" },
131
- presence_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize repeated topics" },
526
+ temperature: {
527
+ type: "number",
528
+ min: 0,
529
+ max: 1,
530
+ default: 0.7,
531
+ description: "Controls randomness"
532
+ },
533
+ max_tokens: {
534
+ type: "number",
535
+ min: 1,
536
+ default: 4096,
537
+ description: "Maximum output tokens"
538
+ },
539
+ top_p: {
540
+ type: "number",
541
+ min: 0,
542
+ max: 1,
543
+ default: 1,
544
+ description: "Nucleus sampling"
545
+ },
546
+ frequency_penalty: {
547
+ type: "number",
548
+ min: -2,
549
+ max: 2,
550
+ default: 0,
551
+ description: "Penalize frequent tokens"
552
+ },
553
+ presence_penalty: {
554
+ type: "number",
555
+ min: -2,
556
+ max: 2,
557
+ default: 0,
558
+ description: "Penalize repeated topics"
559
+ },
132
560
  stop: { type: "string", default: "", description: "Stop sequences" },
133
561
  n: { type: "number", min: 1, default: 1, description: "Completions count" },
134
562
  seed: { type: "number", default: "", description: "Random seed" },
135
563
  stream: { type: "boolean", default: false, description: "Stream response" },
136
- safe_prompt: { type: "boolean", default: false, description: "Enable safe prompt" },
137
- min_tokens: { type: "number", min: 0, default: 0, description: "Minimum tokens" }
564
+ safe_prompt: {
565
+ type: "boolean",
566
+ default: false,
567
+ description: "Enable safe prompt"
568
+ },
569
+ min_tokens: {
570
+ type: "number",
571
+ min: 0,
572
+ default: 0,
573
+ description: "Minimum tokens"
574
+ }
138
575
  },
139
576
  cohere: {
140
- temperature: { type: "number", min: 0, max: 1, default: 0.7, description: "Controls randomness" },
141
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
142
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling (p)" },
143
- top_k: { type: "number", min: 0, max: 500, default: 40, description: "Top-K sampling (k)" },
144
- frequency_penalty: { type: "number", min: 0, max: 1, default: 0, description: "Penalize frequent tokens" },
145
- presence_penalty: { type: "number", min: 0, max: 1, default: 0, description: "Penalize repeated topics" },
577
+ temperature: {
578
+ type: "number",
579
+ min: 0,
580
+ max: 1,
581
+ default: 0.7,
582
+ description: "Controls randomness"
583
+ },
584
+ max_tokens: {
585
+ type: "number",
586
+ min: 1,
587
+ default: 4096,
588
+ description: "Maximum output tokens"
589
+ },
590
+ top_p: {
591
+ type: "number",
592
+ min: 0,
593
+ max: 1,
594
+ default: 1,
595
+ description: "Nucleus sampling (p)"
596
+ },
597
+ top_k: {
598
+ type: "number",
599
+ min: 0,
600
+ max: 500,
601
+ default: 40,
602
+ description: "Top-K sampling (k)"
603
+ },
604
+ frequency_penalty: {
605
+ type: "number",
606
+ min: 0,
607
+ max: 1,
608
+ default: 0,
609
+ description: "Penalize frequent tokens"
610
+ },
611
+ presence_penalty: {
612
+ type: "number",
613
+ min: 0,
614
+ max: 1,
615
+ default: 0,
616
+ description: "Penalize repeated topics"
617
+ },
146
618
  stop: { type: "string", default: "", description: "Stop sequences" },
147
619
  stream: { type: "boolean", default: false, description: "Stream response" },
148
620
  seed: { type: "number", default: "", description: "Random seed" }
149
621
  },
150
622
  bedrock: {
151
- temperature: { type: "number", min: 0, max: 1, default: 0.7, description: "Controls randomness" },
152
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
153
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
154
- top_k: { type: "number", min: 0, default: 40, description: "Top-K sampling" },
623
+ temperature: {
624
+ type: "number",
625
+ min: 0,
626
+ max: 1,
627
+ default: 0.7,
628
+ description: "Controls randomness"
629
+ },
630
+ max_tokens: {
631
+ type: "number",
632
+ min: 1,
633
+ default: 4096,
634
+ description: "Maximum output tokens"
635
+ },
636
+ top_p: {
637
+ type: "number",
638
+ min: 0,
639
+ max: 1,
640
+ default: 1,
641
+ description: "Nucleus sampling"
642
+ },
643
+ top_k: {
644
+ type: "number",
645
+ min: 0,
646
+ default: 40,
647
+ description: "Top-K sampling"
648
+ },
155
649
  stop: { type: "string", default: "", description: "Stop sequences" },
156
650
  stream: { type: "boolean", default: false, description: "Stream response" },
157
- cache: { type: "enum", values: ["ephemeral"], default: "ephemeral", description: "Cache control" },
158
- cache_ttl: { type: "enum", values: ["5m", "1h"], default: "5m", description: "Cache TTL" }
651
+ cache: {
652
+ type: "enum",
653
+ values: ["ephemeral"],
654
+ default: "ephemeral",
655
+ description: "Cache control"
656
+ },
657
+ cache_ttl: {
658
+ type: "enum",
659
+ values: ["5m", "1h"],
660
+ default: "5m",
661
+ description: "Cache TTL"
662
+ }
159
663
  },
160
664
  openrouter: {
161
- temperature: { type: "number", min: 0, max: 2, default: 0.7, description: "Controls randomness" },
162
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
163
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
164
- top_k: { type: "number", min: 0, default: 40, description: "Top-K sampling" },
165
- frequency_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize frequent tokens" },
166
- presence_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize repeated topics" },
665
+ temperature: {
666
+ type: "number",
667
+ min: 0,
668
+ max: 2,
669
+ default: 0.7,
670
+ description: "Controls randomness"
671
+ },
672
+ max_tokens: {
673
+ type: "number",
674
+ min: 1,
675
+ default: 4096,
676
+ description: "Maximum output tokens"
677
+ },
678
+ top_p: {
679
+ type: "number",
680
+ min: 0,
681
+ max: 1,
682
+ default: 1,
683
+ description: "Nucleus sampling"
684
+ },
685
+ top_k: {
686
+ type: "number",
687
+ min: 0,
688
+ default: 40,
689
+ description: "Top-K sampling"
690
+ },
691
+ frequency_penalty: {
692
+ type: "number",
693
+ min: -2,
694
+ max: 2,
695
+ default: 0,
696
+ description: "Penalize frequent tokens"
697
+ },
698
+ presence_penalty: {
699
+ type: "number",
700
+ min: -2,
701
+ max: 2,
702
+ default: 0,
703
+ description: "Penalize repeated topics"
704
+ },
167
705
  stop: { type: "string", default: "", description: "Stop sequences" },
168
706
  n: { type: "number", min: 1, default: 1, description: "Completions count" },
169
707
  seed: { type: "number", default: "", description: "Random seed" },
170
708
  stream: { type: "boolean", default: false, description: "Stream response" },
171
- effort: { type: "enum", values: ["none", "minimal", "low", "medium", "high", "xhigh"], default: "medium", description: "Reasoning effort" }
709
+ effort: {
710
+ type: "enum",
711
+ values: ["none", "minimal", "low", "medium", "high", "xhigh"],
712
+ default: "medium",
713
+ description: "Reasoning effort"
714
+ }
172
715
  },
173
716
  vercel: {
174
- temperature: { type: "number", min: 0, max: 2, default: 0.7, description: "Controls randomness" },
175
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
176
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
177
- top_k: { type: "number", min: 0, default: 40, description: "Top-K sampling" },
178
- frequency_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize frequent tokens" },
179
- presence_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize repeated topics" },
717
+ temperature: {
718
+ type: "number",
719
+ min: 0,
720
+ max: 2,
721
+ default: 0.7,
722
+ description: "Controls randomness"
723
+ },
724
+ max_tokens: {
725
+ type: "number",
726
+ min: 1,
727
+ default: 4096,
728
+ description: "Maximum output tokens"
729
+ },
730
+ top_p: {
731
+ type: "number",
732
+ min: 0,
733
+ max: 1,
734
+ default: 1,
735
+ description: "Nucleus sampling"
736
+ },
737
+ top_k: {
738
+ type: "number",
739
+ min: 0,
740
+ default: 40,
741
+ description: "Top-K sampling"
742
+ },
743
+ frequency_penalty: {
744
+ type: "number",
745
+ min: -2,
746
+ max: 2,
747
+ default: 0,
748
+ description: "Penalize frequent tokens"
749
+ },
750
+ presence_penalty: {
751
+ type: "number",
752
+ min: -2,
753
+ max: 2,
754
+ default: 0,
755
+ description: "Penalize repeated topics"
756
+ },
180
757
  stop: { type: "string", default: "", description: "Stop sequences" },
181
758
  n: { type: "number", min: 1, default: 1, description: "Completions count" },
182
759
  seed: { type: "number", default: "", description: "Random seed" },
183
760
  stream: { type: "boolean", default: false, description: "Stream response" },
184
- effort: { type: "enum", values: ["none", "minimal", "low", "medium", "high", "xhigh"], default: "medium", description: "Reasoning effort" }
185
- }
761
+ effort: {
762
+ type: "enum",
763
+ values: ["none", "minimal", "low", "medium", "high", "xhigh"],
764
+ default: "medium",
765
+ description: "Reasoning effort"
766
+ }
767
+ },
768
+ xai: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
769
+ groq: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
770
+ fal: {},
771
+ deepinfra: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
772
+ "black-forest-labs": {},
773
+ together: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
774
+ fireworks: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
775
+ deepseek: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
776
+ moonshotai: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
777
+ perplexity: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
778
+ alibaba: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
779
+ cerebras: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
780
+ replicate: {},
781
+ prodia: {},
782
+ luma: {},
783
+ bytedance: {},
784
+ kling: {},
785
+ elevenlabs: {},
786
+ assemblyai: {},
787
+ deepgram: {},
788
+ gladia: {},
789
+ lmnt: {},
790
+ hume: {},
791
+ revai: {},
792
+ baseten: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS,
793
+ huggingface: OPENAI_COMPATIBLE_CANONICAL_PARAM_SPECS
186
794
  };
187
795
  export {
188
796
  ALIASES,
@@ -190,6 +798,7 @@ export {
190
798
  CACHE_VALUES,
191
799
  CANONICAL_PARAM_SPECS,
192
800
  DURATION_RE,
801
+ HOST_ALIASES,
193
802
  MODELS,
194
803
  PARAM_SPECS,
195
804
  PROVIDER_META,
@@ -201,6 +810,8 @@ export {
201
810
  detectGatewaySubProvider,
202
811
  detectProvider,
203
812
  isGatewayProvider,
204
- isReasoningModel
813
+ isReasoningModel,
814
+ providerFromHostAlias,
815
+ resolveHostAlias
205
816
  };
206
817
  //# sourceMappingURL=providers.js.map