llm-strings 1.1.1 → 1.2.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 (54) hide show
  1. package/README.md +117 -45
  2. package/dist/ai-sdk.cjs +831 -0
  3. package/dist/ai-sdk.cjs.map +1 -0
  4. package/dist/ai-sdk.d.cts +27 -0
  5. package/dist/ai-sdk.d.ts +27 -0
  6. package/dist/ai-sdk.js +465 -0
  7. package/dist/ai-sdk.js.map +1 -0
  8. package/dist/{chunk-MPIHGH6L.js → chunk-2ARD4TFU.js} +5 -4
  9. package/dist/chunk-2ARD4TFU.js.map +1 -0
  10. package/dist/{chunk-FCEV23OT.js → chunk-BCOUH7LH.js} +9 -3
  11. package/dist/chunk-BCOUH7LH.js.map +1 -0
  12. package/dist/{chunk-UYMVUTLV.js → chunk-RPXK2A7O.js} +5 -9
  13. package/dist/chunk-RPXK2A7O.js.map +1 -0
  14. package/dist/{chunk-XID353H7.js → chunk-W4NIQY7M.js} +412 -52
  15. package/dist/chunk-W4NIQY7M.js.map +1 -0
  16. package/dist/index.cjs +1032 -12
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +1 -1
  19. package/dist/index.d.ts +1 -1
  20. package/dist/index.js +9 -4
  21. package/dist/normalize.cjs +370 -4
  22. package/dist/normalize.cjs.map +1 -1
  23. package/dist/normalize.d.cts +1 -1
  24. package/dist/normalize.d.ts +1 -1
  25. package/dist/normalize.js +2 -2
  26. package/dist/parse.cjs +129 -5
  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.ts → provider-core-BiAl8MCV.d.cts} +20 -1
  32. package/dist/{provider-core-DinpG40u.d.cts → provider-core-BiAl8MCV.d.ts} +20 -1
  33. package/dist/providers.cjs +1145 -90
  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 +379 -60
  38. package/dist/providers.js.map +1 -1
  39. package/dist/validate.cjs +1017 -6
  40. package/dist/validate.cjs.map +1 -1
  41. package/dist/validate.js +4 -4
  42. package/package.json +13 -2
  43. package/dist/chunk-FCEV23OT.js.map +0 -1
  44. package/dist/chunk-MGWGNZDJ.cjs +0 -116
  45. package/dist/chunk-MGWGNZDJ.cjs.map +0 -1
  46. package/dist/chunk-MPIHGH6L.js.map +0 -1
  47. package/dist/chunk-N6NVBE43.cjs +0 -37
  48. package/dist/chunk-N6NVBE43.cjs.map +0 -1
  49. package/dist/chunk-NSCBY4VD.cjs +0 -370
  50. package/dist/chunk-NSCBY4VD.cjs.map +0 -1
  51. package/dist/chunk-RSUXM42X.cjs +0 -180
  52. package/dist/chunk-RSUXM42X.cjs.map +0 -1
  53. package/dist/chunk-UYMVUTLV.js.map +0 -1
  54. package/dist/chunk-XID353H7.js.map +0 -1
@@ -1,30 +1,793 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
19
 
20
+ // src/providers.ts
21
+ var providers_exports = {};
22
+ __export(providers_exports, {
23
+ ALIASES: () => ALIASES,
24
+ CACHE_TTLS: () => CACHE_TTLS,
25
+ CACHE_VALUES: () => CACHE_VALUES,
26
+ CANONICAL_PARAM_SPECS: () => CANONICAL_PARAM_SPECS,
27
+ DURATION_RE: () => DURATION_RE,
28
+ HOST_ALIASES: () => HOST_ALIASES,
29
+ MODELS: () => MODELS,
30
+ PARAM_SPECS: () => PARAM_SPECS,
31
+ PROVIDER_META: () => PROVIDER_META,
32
+ PROVIDER_PARAMS: () => PROVIDER_PARAMS,
33
+ REASONING_MODEL_UNSUPPORTED: () => REASONING_MODEL_UNSUPPORTED,
34
+ bedrockSupportsCaching: () => bedrockSupportsCaching,
35
+ canHostOpenAIModels: () => canHostOpenAIModels,
36
+ detectBedrockModelFamily: () => detectBedrockModelFamily,
37
+ detectGatewaySubProvider: () => detectGatewaySubProvider,
38
+ detectProvider: () => detectProvider,
39
+ isGatewayProvider: () => isGatewayProvider,
40
+ isReasoningModel: () => isReasoningModel,
41
+ providerFromHostAlias: () => providerFromHostAlias,
42
+ resolveHostAlias: () => resolveHostAlias
43
+ });
44
+ module.exports = __toCommonJS(providers_exports);
15
45
 
16
- var _chunkNSCBY4VDcjs = require('./chunk-NSCBY4VD.cjs');
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
+ anthropic: "api.anthropic.com",
53
+ google: "generativelanguage.googleapis.com",
54
+ aistudio: "generativelanguage.googleapis.com",
55
+ mistral: "api.mistral.ai",
56
+ cohere: "api.cohere.com",
57
+ bedrock: "bedrock-runtime.us-east-1.amazonaws.com",
58
+ openrouter: "openrouter.ai",
59
+ vercel: "gateway.ai.vercel.app",
60
+ alibaba: "dashscope-intl.aliyuncs.com",
61
+ alibabacloud: "dashscope-intl.aliyuncs.com",
62
+ dashscope: "dashscope-intl.aliyuncs.com",
63
+ fireworks: "api.fireworks.ai",
64
+ fireworksai: "api.fireworks.ai",
65
+ venice: "api.venice.ai",
66
+ parasail: "api.parasail.io",
67
+ deepinfra: "api.deepinfra.com",
68
+ atlascloud: "api.atlascloud.ai",
69
+ novita: "api.novita.ai",
70
+ novitaai: "api.novita.ai",
71
+ grok: "api.x.ai",
72
+ xai: "api.x.ai",
73
+ wandb: "api.inference.wandb.ai",
74
+ weightsandbiases: "api.inference.wandb.ai",
75
+ baidu: "qianfan.baidubce.com",
76
+ qianfan: "qianfan.baidubce.com",
77
+ vertex: "aiplatform.googleapis.com",
78
+ xiaomi: "api.xiaomimimo.com",
79
+ minimax: "api.minimax.io"
80
+ };
81
+ function readProcessEnv() {
82
+ return typeof process !== "undefined" && process.env ? process.env : {};
83
+ }
84
+ function normalizeHostValue(value) {
85
+ const trimmed = value.trim();
86
+ if (!trimmed) return trimmed;
87
+ try {
88
+ if (trimmed.includes("://")) {
89
+ return new URL(trimmed).host;
90
+ }
91
+ } catch {
92
+ }
93
+ return trimmed.replace(/^\/\//, "").split("/")[0] ?? trimmed;
94
+ }
95
+ function envHostOverride(alias, env) {
96
+ const upper = alias.toUpperCase();
97
+ const override = env[`LLM_STRINGS_${upper}_HOST`] ?? env[`LLM_STRINGS_HOST_${upper}`];
98
+ return override?.trim() ? override : void 0;
99
+ }
100
+ function resolveHostAlias(host, env = readProcessEnv()) {
101
+ const normalizedHost = host.toLowerCase();
102
+ if (!hasOwn(HOST_ALIASES, normalizedHost)) {
103
+ return { host };
104
+ }
105
+ const alias = normalizedHost;
106
+ const override = envHostOverride(alias, env);
107
+ return {
108
+ host: normalizeHostValue(override ?? HOST_ALIASES[alias]),
109
+ alias
110
+ };
111
+ }
112
+ function providerFromHostAlias(alias) {
113
+ const normalizedAlias = alias.toLowerCase();
114
+ if (hasOwn(PROVIDER_PARAMS, normalizedAlias)) {
115
+ return normalizedAlias;
116
+ }
117
+ return void 0;
118
+ }
119
+ function detectProvider(host) {
120
+ host = host.toLowerCase();
121
+ if (host.includes("openrouter")) return "openrouter";
122
+ if (host.includes("gateway.ai.vercel")) return "vercel";
123
+ if (host.includes("amazonaws") || host.includes("bedrock")) return "bedrock";
124
+ if (host.includes("openai")) return "openai";
125
+ if (host.includes("anthropic") || host.includes("claude")) return "anthropic";
126
+ if (host.includes("googleapis") || host.includes("google")) return "google";
127
+ if (host.includes("mistral")) return "mistral";
128
+ if (host.includes("cohere")) return "cohere";
129
+ return void 0;
130
+ }
131
+ var ALIASES = {
132
+ // temperature
133
+ temp: "temperature",
134
+ // max_tokens
135
+ max: "max_tokens",
136
+ max_out: "max_tokens",
137
+ max_output: "max_tokens",
138
+ max_output_tokens: "max_tokens",
139
+ max_completion_tokens: "max_tokens",
140
+ maxOutputTokens: "max_tokens",
141
+ maxTokens: "max_tokens",
142
+ // top_p
143
+ topp: "top_p",
144
+ topP: "top_p",
145
+ nucleus: "top_p",
146
+ // top_k
147
+ topk: "top_k",
148
+ topK: "top_k",
149
+ // frequency_penalty
150
+ freq: "frequency_penalty",
151
+ freq_penalty: "frequency_penalty",
152
+ frequencyPenalty: "frequency_penalty",
153
+ repetition_penalty: "frequency_penalty",
154
+ // presence_penalty
155
+ pres: "presence_penalty",
156
+ pres_penalty: "presence_penalty",
157
+ presencePenalty: "presence_penalty",
158
+ // stop
159
+ stop_sequences: "stop",
160
+ stopSequences: "stop",
161
+ stop_sequence: "stop",
162
+ // seed
163
+ random_seed: "seed",
164
+ randomSeed: "seed",
165
+ // n (completions count)
166
+ candidateCount: "n",
167
+ candidate_count: "n",
168
+ num_completions: "n",
169
+ // effort / reasoning
170
+ reasoning_effort: "effort",
171
+ reasoning: "effort",
172
+ // cache
173
+ cache_control: "cache",
174
+ cacheControl: "cache",
175
+ cachePoint: "cache",
176
+ cache_point: "cache"
177
+ };
178
+ var PROVIDER_PARAMS = {
179
+ openai: {
180
+ temperature: "temperature",
181
+ max_tokens: "max_tokens",
182
+ top_p: "top_p",
183
+ frequency_penalty: "frequency_penalty",
184
+ presence_penalty: "presence_penalty",
185
+ stop: "stop",
186
+ n: "n",
187
+ seed: "seed",
188
+ stream: "stream",
189
+ effort: "reasoning_effort"
190
+ },
191
+ anthropic: {
192
+ temperature: "temperature",
193
+ max_tokens: "max_tokens",
194
+ top_p: "top_p",
195
+ top_k: "top_k",
196
+ stop: "stop_sequences",
197
+ stream: "stream",
198
+ effort: "effort",
199
+ cache: "cache_control",
200
+ cache_ttl: "cache_ttl"
201
+ },
202
+ google: {
203
+ temperature: "temperature",
204
+ max_tokens: "maxOutputTokens",
205
+ top_p: "topP",
206
+ top_k: "topK",
207
+ frequency_penalty: "frequencyPenalty",
208
+ presence_penalty: "presencePenalty",
209
+ stop: "stopSequences",
210
+ n: "candidateCount",
211
+ stream: "stream",
212
+ seed: "seed",
213
+ responseMimeType: "responseMimeType",
214
+ responseSchema: "responseSchema"
215
+ },
216
+ mistral: {
217
+ temperature: "temperature",
218
+ max_tokens: "max_tokens",
219
+ top_p: "top_p",
220
+ frequency_penalty: "frequency_penalty",
221
+ presence_penalty: "presence_penalty",
222
+ stop: "stop",
223
+ n: "n",
224
+ seed: "random_seed",
225
+ stream: "stream",
226
+ safe_prompt: "safe_prompt",
227
+ min_tokens: "min_tokens"
228
+ },
229
+ cohere: {
230
+ temperature: "temperature",
231
+ max_tokens: "max_tokens",
232
+ top_p: "p",
233
+ top_k: "k",
234
+ frequency_penalty: "frequency_penalty",
235
+ presence_penalty: "presence_penalty",
236
+ stop: "stop_sequences",
237
+ stream: "stream",
238
+ seed: "seed"
239
+ },
240
+ bedrock: {
241
+ // Bedrock Converse API uses camelCase
242
+ temperature: "temperature",
243
+ max_tokens: "maxTokens",
244
+ top_p: "topP",
245
+ top_k: "topK",
246
+ // Claude models via additionalModelRequestFields
247
+ stop: "stopSequences",
248
+ stream: "stream",
249
+ cache: "cache_control",
250
+ cache_ttl: "cache_ttl"
251
+ },
252
+ openrouter: {
253
+ // OpenAI-compatible API with extra routing params
254
+ temperature: "temperature",
255
+ max_tokens: "max_tokens",
256
+ top_p: "top_p",
257
+ top_k: "top_k",
258
+ frequency_penalty: "frequency_penalty",
259
+ presence_penalty: "presence_penalty",
260
+ stop: "stop",
261
+ n: "n",
262
+ seed: "seed",
263
+ stream: "stream",
264
+ effort: "reasoning_effort"
265
+ },
266
+ vercel: {
267
+ // OpenAI-compatible gateway
268
+ temperature: "temperature",
269
+ max_tokens: "max_tokens",
270
+ top_p: "top_p",
271
+ top_k: "top_k",
272
+ frequency_penalty: "frequency_penalty",
273
+ presence_penalty: "presence_penalty",
274
+ stop: "stop",
275
+ n: "n",
276
+ seed: "seed",
277
+ stream: "stream",
278
+ effort: "reasoning_effort"
279
+ }
280
+ };
281
+ var PARAM_SPECS = {
282
+ openai: {
283
+ temperature: {
284
+ type: "number",
285
+ min: 0,
286
+ max: 2,
287
+ default: 0.7,
288
+ description: "Controls randomness"
289
+ },
290
+ max_tokens: {
291
+ type: "number",
292
+ min: 1,
293
+ default: 4096,
294
+ description: "Maximum output tokens"
295
+ },
296
+ top_p: {
297
+ type: "number",
298
+ min: 0,
299
+ max: 1,
300
+ default: 1,
301
+ description: "Nucleus sampling"
302
+ },
303
+ frequency_penalty: {
304
+ type: "number",
305
+ min: -2,
306
+ max: 2,
307
+ default: 0,
308
+ description: "Penalize frequent tokens"
309
+ },
310
+ presence_penalty: {
311
+ type: "number",
312
+ min: -2,
313
+ max: 2,
314
+ default: 0,
315
+ description: "Penalize repeated topics"
316
+ },
317
+ stop: { type: "string", description: "Stop sequences" },
318
+ n: { type: "number", min: 1, default: 1, description: "Completions count" },
319
+ seed: { type: "number", description: "Random seed" },
320
+ stream: { type: "boolean", default: false, description: "Stream response" },
321
+ reasoning_effort: {
322
+ type: "string",
323
+ values: ["none", "minimal", "low", "medium", "high", "xhigh"],
324
+ default: "medium",
325
+ description: "Reasoning effort"
326
+ }
327
+ },
328
+ anthropic: {
329
+ temperature: {
330
+ type: "number",
331
+ min: 0,
332
+ max: 1,
333
+ default: 0.7,
334
+ description: "Controls randomness"
335
+ },
336
+ max_tokens: {
337
+ type: "number",
338
+ min: 1,
339
+ default: 4096,
340
+ description: "Maximum output tokens"
341
+ },
342
+ top_p: {
343
+ type: "number",
344
+ min: 0,
345
+ max: 1,
346
+ default: 1,
347
+ description: "Nucleus sampling"
348
+ },
349
+ top_k: {
350
+ type: "number",
351
+ min: 0,
352
+ default: 40,
353
+ description: "Top-K sampling"
354
+ },
355
+ stop_sequences: { type: "string", description: "Stop sequences" },
356
+ stream: { type: "boolean", default: false, description: "Stream response" },
357
+ effort: {
358
+ type: "string",
359
+ values: ["low", "medium", "high", "max"],
360
+ default: "medium",
361
+ description: "Thinking effort"
362
+ },
363
+ cache_control: {
364
+ type: "string",
365
+ values: ["ephemeral"],
366
+ default: "ephemeral",
367
+ description: "Cache control"
368
+ },
369
+ cache_ttl: {
370
+ type: "string",
371
+ values: ["5m", "1h"],
372
+ default: "5m",
373
+ description: "Cache TTL"
374
+ }
375
+ },
376
+ google: {
377
+ temperature: {
378
+ type: "number",
379
+ min: 0,
380
+ max: 2,
381
+ default: 0.7,
382
+ description: "Controls randomness"
383
+ },
384
+ maxOutputTokens: {
385
+ type: "number",
386
+ min: 1,
387
+ default: 4096,
388
+ description: "Maximum output tokens"
389
+ },
390
+ topP: {
391
+ type: "number",
392
+ min: 0,
393
+ max: 1,
394
+ default: 1,
395
+ description: "Nucleus sampling"
396
+ },
397
+ topK: {
398
+ type: "number",
399
+ min: 0,
400
+ default: 40,
401
+ description: "Top-K sampling"
402
+ },
403
+ frequencyPenalty: {
404
+ type: "number",
405
+ min: -2,
406
+ max: 2,
407
+ default: 0,
408
+ description: "Penalize frequent tokens"
409
+ },
410
+ presencePenalty: {
411
+ type: "number",
412
+ min: -2,
413
+ max: 2,
414
+ default: 0,
415
+ description: "Penalize repeated topics"
416
+ },
417
+ stopSequences: { type: "string", description: "Stop sequences" },
418
+ candidateCount: {
419
+ type: "number",
420
+ min: 1,
421
+ default: 1,
422
+ description: "Candidate count"
423
+ },
424
+ stream: { type: "boolean", default: false, description: "Stream response" },
425
+ seed: { type: "number", description: "Random seed" },
426
+ responseMimeType: { type: "string", description: "Response MIME type" },
427
+ responseSchema: { type: "string", description: "Response schema" }
428
+ },
429
+ mistral: {
430
+ temperature: {
431
+ type: "number",
432
+ min: 0,
433
+ max: 1,
434
+ default: 0.7,
435
+ description: "Controls randomness"
436
+ },
437
+ max_tokens: {
438
+ type: "number",
439
+ min: 1,
440
+ default: 4096,
441
+ description: "Maximum output tokens"
442
+ },
443
+ top_p: {
444
+ type: "number",
445
+ min: 0,
446
+ max: 1,
447
+ default: 1,
448
+ description: "Nucleus sampling"
449
+ },
450
+ frequency_penalty: {
451
+ type: "number",
452
+ min: -2,
453
+ max: 2,
454
+ default: 0,
455
+ description: "Penalize frequent tokens"
456
+ },
457
+ presence_penalty: {
458
+ type: "number",
459
+ min: -2,
460
+ max: 2,
461
+ default: 0,
462
+ description: "Penalize repeated topics"
463
+ },
464
+ stop: { type: "string", description: "Stop sequences" },
465
+ n: { type: "number", min: 1, default: 1, description: "Completions count" },
466
+ random_seed: { type: "number", description: "Random seed" },
467
+ stream: { type: "boolean", default: false, description: "Stream response" },
468
+ safe_prompt: {
469
+ type: "boolean",
470
+ default: false,
471
+ description: "Enable safe prompt"
472
+ },
473
+ min_tokens: {
474
+ type: "number",
475
+ min: 0,
476
+ default: 0,
477
+ description: "Minimum tokens"
478
+ }
479
+ },
480
+ cohere: {
481
+ temperature: {
482
+ type: "number",
483
+ min: 0,
484
+ max: 1,
485
+ default: 0.7,
486
+ description: "Controls randomness"
487
+ },
488
+ max_tokens: {
489
+ type: "number",
490
+ min: 1,
491
+ default: 4096,
492
+ description: "Maximum output tokens"
493
+ },
494
+ p: {
495
+ type: "number",
496
+ min: 0,
497
+ max: 1,
498
+ default: 1,
499
+ description: "Nucleus sampling (p)"
500
+ },
501
+ k: {
502
+ type: "number",
503
+ min: 0,
504
+ max: 500,
505
+ default: 40,
506
+ description: "Top-K sampling (k)"
507
+ },
508
+ frequency_penalty: {
509
+ type: "number",
510
+ min: 0,
511
+ max: 1,
512
+ default: 0,
513
+ description: "Penalize frequent tokens"
514
+ },
515
+ presence_penalty: {
516
+ type: "number",
517
+ min: 0,
518
+ max: 1,
519
+ default: 0,
520
+ description: "Penalize repeated topics"
521
+ },
522
+ stop_sequences: { type: "string", description: "Stop sequences" },
523
+ stream: { type: "boolean", default: false, description: "Stream response" },
524
+ seed: { type: "number", description: "Random seed" }
525
+ },
526
+ bedrock: {
527
+ // Converse API inferenceConfig params
528
+ temperature: {
529
+ type: "number",
530
+ min: 0,
531
+ max: 1,
532
+ default: 0.7,
533
+ description: "Controls randomness"
534
+ },
535
+ maxTokens: {
536
+ type: "number",
537
+ min: 1,
538
+ default: 4096,
539
+ description: "Maximum output tokens"
540
+ },
541
+ topP: {
542
+ type: "number",
543
+ min: 0,
544
+ max: 1,
545
+ default: 1,
546
+ description: "Nucleus sampling"
547
+ },
548
+ topK: {
549
+ type: "number",
550
+ min: 0,
551
+ default: 40,
552
+ description: "Top-K sampling"
553
+ },
554
+ stopSequences: { type: "string", description: "Stop sequences" },
555
+ stream: { type: "boolean", default: false, description: "Stream response" },
556
+ cache_control: {
557
+ type: "string",
558
+ values: ["ephemeral"],
559
+ default: "ephemeral",
560
+ description: "Cache control"
561
+ },
562
+ cache_ttl: {
563
+ type: "string",
564
+ values: ["5m", "1h"],
565
+ default: "5m",
566
+ description: "Cache TTL"
567
+ }
568
+ },
569
+ openrouter: {
570
+ // Loose validation — proxies to many providers with varying ranges
571
+ temperature: {
572
+ type: "number",
573
+ min: 0,
574
+ max: 2,
575
+ default: 0.7,
576
+ description: "Controls randomness"
577
+ },
578
+ max_tokens: {
579
+ type: "number",
580
+ min: 1,
581
+ default: 4096,
582
+ description: "Maximum output tokens"
583
+ },
584
+ top_p: {
585
+ type: "number",
586
+ min: 0,
587
+ max: 1,
588
+ default: 1,
589
+ description: "Nucleus sampling"
590
+ },
591
+ top_k: {
592
+ type: "number",
593
+ min: 0,
594
+ default: 40,
595
+ description: "Top-K sampling"
596
+ },
597
+ frequency_penalty: {
598
+ type: "number",
599
+ min: -2,
600
+ max: 2,
601
+ default: 0,
602
+ description: "Penalize frequent tokens"
603
+ },
604
+ presence_penalty: {
605
+ type: "number",
606
+ min: -2,
607
+ max: 2,
608
+ default: 0,
609
+ description: "Penalize repeated topics"
610
+ },
611
+ stop: { type: "string", description: "Stop sequences" },
612
+ n: { type: "number", min: 1, default: 1, description: "Completions count" },
613
+ seed: { type: "number", description: "Random seed" },
614
+ stream: { type: "boolean", default: false, description: "Stream response" },
615
+ reasoning_effort: {
616
+ type: "string",
617
+ values: ["none", "minimal", "low", "medium", "high", "xhigh"],
618
+ default: "medium",
619
+ description: "Reasoning effort"
620
+ }
621
+ },
622
+ vercel: {
623
+ // Loose validation — proxies to many providers with varying ranges
624
+ temperature: {
625
+ type: "number",
626
+ min: 0,
627
+ max: 2,
628
+ default: 0.7,
629
+ description: "Controls randomness"
630
+ },
631
+ max_tokens: {
632
+ type: "number",
633
+ min: 1,
634
+ default: 4096,
635
+ description: "Maximum output tokens"
636
+ },
637
+ top_p: {
638
+ type: "number",
639
+ min: 0,
640
+ max: 1,
641
+ default: 1,
642
+ description: "Nucleus sampling"
643
+ },
644
+ top_k: {
645
+ type: "number",
646
+ min: 0,
647
+ default: 40,
648
+ description: "Top-K sampling"
649
+ },
650
+ frequency_penalty: {
651
+ type: "number",
652
+ min: -2,
653
+ max: 2,
654
+ default: 0,
655
+ description: "Penalize frequent tokens"
656
+ },
657
+ presence_penalty: {
658
+ type: "number",
659
+ min: -2,
660
+ max: 2,
661
+ default: 0,
662
+ description: "Penalize repeated topics"
663
+ },
664
+ stop: { type: "string", description: "Stop sequences" },
665
+ n: { type: "number", min: 1, default: 1, description: "Completions count" },
666
+ seed: { type: "number", description: "Random seed" },
667
+ stream: { type: "boolean", default: false, description: "Stream response" },
668
+ reasoning_effort: {
669
+ type: "string",
670
+ values: ["none", "minimal", "low", "medium", "high", "xhigh"],
671
+ default: "medium",
672
+ description: "Reasoning effort"
673
+ }
674
+ }
675
+ };
676
+ function isReasoningModel(model) {
677
+ const name = model.includes("/") ? model.split("/").pop() : model;
678
+ return /^o[134]/.test(name);
679
+ }
680
+ function canHostOpenAIModels(provider) {
681
+ return provider === "openai" || provider === "openrouter" || provider === "vercel";
682
+ }
683
+ function isGatewayProvider(provider) {
684
+ return provider === "openrouter" || provider === "vercel";
685
+ }
686
+ function detectGatewaySubProvider(model) {
687
+ const slash = model.indexOf("/");
688
+ if (slash < 1) return void 0;
689
+ const prefix = model.slice(0, slash);
690
+ const direct = [
691
+ "openai",
692
+ "anthropic",
693
+ "google",
694
+ "mistral",
695
+ "cohere"
696
+ ];
697
+ return direct.find((p) => p === prefix);
698
+ }
699
+ var REASONING_MODEL_UNSUPPORTED = /* @__PURE__ */ new Set([
700
+ "temperature",
701
+ "top_p",
702
+ "frequency_penalty",
703
+ "presence_penalty",
704
+ "n"
705
+ ]);
706
+ function detectBedrockModelFamily(model) {
707
+ const parts = model.split(".");
708
+ let prefix = parts[0];
709
+ if (["us", "eu", "apac", "global"].includes(prefix) && parts.length > 1) {
710
+ prefix = parts[1];
711
+ }
712
+ const families = [
713
+ "anthropic",
714
+ "meta",
715
+ "amazon",
716
+ "mistral",
717
+ "cohere",
718
+ "ai21"
719
+ ];
720
+ return families.find((f) => prefix === f);
721
+ }
722
+ function bedrockSupportsCaching(model) {
723
+ const family = detectBedrockModelFamily(model);
724
+ if (family === "anthropic") return true;
725
+ if (family === "amazon" && model.includes("nova")) return true;
726
+ return false;
727
+ }
728
+ var CACHE_VALUES = {
729
+ openai: void 0,
730
+ // OpenAI auto-caches; no explicit param
731
+ anthropic: "ephemeral",
732
+ google: void 0,
733
+ // Google uses explicit caching API, not a param
734
+ mistral: void 0,
735
+ cohere: void 0,
736
+ bedrock: "ephemeral",
737
+ // Supported for Claude models on Bedrock
738
+ openrouter: void 0,
739
+ // Depends on underlying provider
740
+ vercel: void 0
741
+ // Depends on underlying provider
742
+ };
743
+ var CACHE_TTLS = {
744
+ openai: void 0,
745
+ anthropic: ["5m", "1h"],
746
+ google: void 0,
747
+ mistral: void 0,
748
+ cohere: void 0,
749
+ bedrock: ["5m", "1h"],
750
+ // Claude on Bedrock uses same TTLs as direct Anthropic
751
+ openrouter: void 0,
752
+ vercel: void 0
753
+ };
754
+ var DURATION_RE = /^\d+[mh]$/;
17
755
 
18
756
  // src/provider-meta.ts
19
757
  var PROVIDER_META = [
20
758
  { 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" },
759
+ {
760
+ id: "anthropic",
761
+ name: "Anthropic",
762
+ host: "api.anthropic.com",
763
+ color: "#e8956a"
764
+ },
765
+ {
766
+ id: "google",
767
+ name: "Google",
768
+ host: "generativelanguage.googleapis.com",
769
+ color: "#4285f4"
770
+ },
23
771
  { id: "mistral", name: "Mistral", host: "api.mistral.ai", color: "#ff7000" },
24
772
  { 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" }
773
+ {
774
+ id: "bedrock",
775
+ name: "Bedrock",
776
+ host: "bedrock-runtime.us-east-1.amazonaws.com",
777
+ color: "#ff9900"
778
+ },
779
+ {
780
+ id: "openrouter",
781
+ name: "OpenRouter",
782
+ host: "openrouter.ai",
783
+ color: "#818cf8"
784
+ },
785
+ {
786
+ id: "vercel",
787
+ name: "Vercel",
788
+ host: "gateway.ai.vercel.app",
789
+ color: "#ededed"
790
+ }
28
791
  ];
29
792
  var MODELS = {
30
793
  openai: [
@@ -89,118 +852,410 @@ var MODELS = {
89
852
  };
90
853
  var CANONICAL_PARAM_SPECS = {
91
854
  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" },
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
+ },
97
889
  stop: { type: "string", default: "", description: "Stop sequences" },
98
890
  n: { type: "number", min: 1, default: 1, description: "Completions count" },
99
891
  seed: { type: "number", default: "", description: "Random seed" },
100
892
  stream: { type: "boolean", default: false, description: "Stream response" },
101
- effort: { type: "enum", values: ["none", "minimal", "low", "medium", "high", "xhigh"], default: "medium", description: "Reasoning effort" }
893
+ effort: {
894
+ type: "enum",
895
+ values: ["none", "minimal", "low", "medium", "high", "xhigh"],
896
+ default: "medium",
897
+ description: "Reasoning effort"
898
+ }
102
899
  },
103
900
  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" },
901
+ temperature: {
902
+ type: "number",
903
+ min: 0,
904
+ max: 1,
905
+ default: 0.7,
906
+ description: "Controls randomness"
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
+ },
108
927
  stop: { type: "string", default: "", description: "Stop sequences" },
109
928
  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" }
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
+ }
113
947
  },
114
948
  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" },
949
+ temperature: {
950
+ type: "number",
951
+ min: 0,
952
+ max: 2,
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
+ },
121
989
  stop: { type: "string", default: "", description: "Stop sequences" },
122
990
  n: { type: "number", min: 1, default: 1, description: "Candidate count" },
123
991
  stream: { type: "boolean", default: false, description: "Stream response" },
124
992
  seed: { type: "number", default: "", description: "Random seed" }
125
993
  },
126
994
  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" },
995
+ temperature: {
996
+ type: "number",
997
+ min: 0,
998
+ max: 1,
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
+ },
132
1029
  stop: { type: "string", default: "", description: "Stop sequences" },
133
1030
  n: { type: "number", min: 1, default: 1, description: "Completions count" },
134
1031
  seed: { type: "number", default: "", description: "Random seed" },
135
1032
  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" }
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
+ }
138
1044
  },
139
1045
  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" },
1046
+ temperature: {
1047
+ type: "number",
1048
+ min: 0,
1049
+ max: 1,
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
+ },
146
1087
  stop: { type: "string", default: "", description: "Stop sequences" },
147
1088
  stream: { type: "boolean", default: false, description: "Stream response" },
148
1089
  seed: { type: "number", default: "", description: "Random seed" }
149
1090
  },
150
1091
  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" },
1092
+ temperature: {
1093
+ type: "number",
1094
+ min: 0,
1095
+ max: 1,
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
+ },
155
1118
  stop: { type: "string", default: "", description: "Stop sequences" },
156
1119
  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" }
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
+ }
159
1132
  },
160
1133
  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" },
1134
+ temperature: {
1135
+ type: "number",
1136
+ min: 0,
1137
+ max: 2,
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
+ },
167
1174
  stop: { type: "string", default: "", description: "Stop sequences" },
168
1175
  n: { type: "number", min: 1, default: 1, description: "Completions count" },
169
1176
  seed: { type: "number", default: "", description: "Random seed" },
170
1177
  stream: { type: "boolean", default: false, description: "Stream response" },
171
- effort: { type: "enum", values: ["none", "minimal", "low", "medium", "high", "xhigh"], default: "medium", description: "Reasoning effort" }
1178
+ effort: {
1179
+ type: "enum",
1180
+ values: ["none", "minimal", "low", "medium", "high", "xhigh"],
1181
+ default: "medium",
1182
+ description: "Reasoning effort"
1183
+ }
172
1184
  },
173
1185
  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" },
1186
+ temperature: {
1187
+ type: "number",
1188
+ min: 0,
1189
+ max: 2,
1190
+ default: 0.7,
1191
+ description: "Controls randomness"
1192
+ },
1193
+ max_tokens: {
1194
+ type: "number",
1195
+ min: 1,
1196
+ default: 4096,
1197
+ description: "Maximum output tokens"
1198
+ },
1199
+ top_p: {
1200
+ type: "number",
1201
+ min: 0,
1202
+ max: 1,
1203
+ default: 1,
1204
+ description: "Nucleus sampling"
1205
+ },
1206
+ top_k: {
1207
+ type: "number",
1208
+ min: 0,
1209
+ default: 40,
1210
+ description: "Top-K sampling"
1211
+ },
1212
+ frequency_penalty: {
1213
+ type: "number",
1214
+ min: -2,
1215
+ max: 2,
1216
+ default: 0,
1217
+ description: "Penalize frequent tokens"
1218
+ },
1219
+ presence_penalty: {
1220
+ type: "number",
1221
+ min: -2,
1222
+ max: 2,
1223
+ default: 0,
1224
+ description: "Penalize repeated topics"
1225
+ },
180
1226
  stop: { type: "string", default: "", description: "Stop sequences" },
181
1227
  n: { type: "number", min: 1, default: 1, description: "Completions count" },
182
1228
  seed: { type: "number", default: "", description: "Random seed" },
183
1229
  stream: { type: "boolean", default: false, description: "Stream response" },
184
- effort: { type: "enum", values: ["none", "minimal", "low", "medium", "high", "xhigh"], default: "medium", description: "Reasoning effort" }
1230
+ effort: {
1231
+ type: "enum",
1232
+ values: ["none", "minimal", "low", "medium", "high", "xhigh"],
1233
+ default: "medium",
1234
+ description: "Reasoning effort"
1235
+ }
185
1236
  }
186
1237
  };
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
- exports.ALIASES = _chunkNSCBY4VDcjs.ALIASES; exports.CACHE_TTLS = _chunkNSCBY4VDcjs.CACHE_TTLS; exports.CACHE_VALUES = _chunkNSCBY4VDcjs.CACHE_VALUES; exports.CANONICAL_PARAM_SPECS = CANONICAL_PARAM_SPECS; exports.DURATION_RE = _chunkNSCBY4VDcjs.DURATION_RE; exports.MODELS = MODELS; exports.PARAM_SPECS = _chunkNSCBY4VDcjs.PARAM_SPECS; exports.PROVIDER_META = PROVIDER_META; exports.PROVIDER_PARAMS = _chunkNSCBY4VDcjs.PROVIDER_PARAMS; exports.REASONING_MODEL_UNSUPPORTED = _chunkNSCBY4VDcjs.REASONING_MODEL_UNSUPPORTED; exports.bedrockSupportsCaching = _chunkNSCBY4VDcjs.bedrockSupportsCaching; exports.canHostOpenAIModels = _chunkNSCBY4VDcjs.canHostOpenAIModels; exports.detectBedrockModelFamily = _chunkNSCBY4VDcjs.detectBedrockModelFamily; exports.detectGatewaySubProvider = _chunkNSCBY4VDcjs.detectGatewaySubProvider; exports.detectProvider = _chunkNSCBY4VDcjs.detectProvider; exports.isGatewayProvider = _chunkNSCBY4VDcjs.isGatewayProvider; exports.isReasoningModel = _chunkNSCBY4VDcjs.isReasoningModel;
1238
+ // Annotate the CommonJS export names for ESM import in node:
1239
+ 0 && (module.exports = {
1240
+ ALIASES,
1241
+ CACHE_TTLS,
1242
+ CACHE_VALUES,
1243
+ CANONICAL_PARAM_SPECS,
1244
+ DURATION_RE,
1245
+ HOST_ALIASES,
1246
+ MODELS,
1247
+ PARAM_SPECS,
1248
+ PROVIDER_META,
1249
+ PROVIDER_PARAMS,
1250
+ REASONING_MODEL_UNSUPPORTED,
1251
+ bedrockSupportsCaching,
1252
+ canHostOpenAIModels,
1253
+ detectBedrockModelFamily,
1254
+ detectGatewaySubProvider,
1255
+ detectProvider,
1256
+ isGatewayProvider,
1257
+ isReasoningModel,
1258
+ providerFromHostAlias,
1259
+ resolveHostAlias
1260
+ });
206
1261
  //# sourceMappingURL=providers.cjs.map