llm-strings 1.0.1 → 1.1.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 +87 -12
  2. package/dist/chunk-6P5GSSNW.js +176 -0
  3. package/dist/chunk-6P5GSSNW.js.map +1 -0
  4. package/dist/chunk-FCEV23OT.js +37 -0
  5. package/dist/chunk-FCEV23OT.js.map +1 -0
  6. package/dist/chunk-MGWGNZDJ.cjs +116 -0
  7. package/dist/chunk-MGWGNZDJ.cjs.map +1 -0
  8. package/dist/chunk-MPIHGH6L.js +116 -0
  9. package/dist/chunk-MPIHGH6L.js.map +1 -0
  10. package/dist/chunk-N6NVBE43.cjs +37 -0
  11. package/dist/chunk-N6NVBE43.cjs.map +1 -0
  12. package/dist/chunk-NSCBY4VD.cjs +370 -0
  13. package/dist/chunk-NSCBY4VD.cjs.map +1 -0
  14. package/dist/chunk-RR3VXIW2.cjs +176 -0
  15. package/dist/chunk-RR3VXIW2.cjs.map +1 -0
  16. package/dist/chunk-RSUXM42X.cjs +180 -0
  17. package/dist/chunk-RSUXM42X.cjs.map +1 -0
  18. package/dist/chunk-UYMVUTLV.js +180 -0
  19. package/dist/chunk-UYMVUTLV.js.map +1 -0
  20. package/dist/chunk-XID353H7.js +370 -0
  21. package/dist/chunk-XID353H7.js.map +1 -0
  22. package/dist/index.cjs +46 -811
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +5 -80
  25. package/dist/index.d.ts +5 -80
  26. package/dist/index.js +29 -753
  27. package/dist/index.js.map +1 -1
  28. package/dist/normalize.cjs +8 -0
  29. package/dist/normalize.cjs.map +1 -0
  30. package/dist/normalize.d.cts +33 -0
  31. package/dist/normalize.d.ts +33 -0
  32. package/dist/normalize.js +8 -0
  33. package/dist/normalize.js.map +1 -0
  34. package/dist/parse.cjs +9 -0
  35. package/dist/parse.cjs.map +1 -0
  36. package/dist/parse.d.cts +32 -0
  37. package/dist/parse.d.ts +32 -0
  38. package/dist/parse.js +9 -0
  39. package/dist/parse.js.map +1 -0
  40. package/dist/provider-core-BUaKKLpd.d.cts +53 -0
  41. package/dist/provider-core-BUaKKLpd.d.ts +53 -0
  42. package/dist/providers.cjs +40 -560
  43. package/dist/providers.cjs.map +1 -1
  44. package/dist/providers.d.cts +4 -42
  45. package/dist/providers.d.ts +4 -42
  46. package/dist/providers.js +23 -504
  47. package/dist/providers.js.map +1 -1
  48. package/dist/validate.cjs +10 -0
  49. package/dist/validate.cjs.map +1 -0
  50. package/dist/validate.d.cts +21 -0
  51. package/dist/validate.d.ts +21 -0
  52. package/dist/validate.js +10 -0
  53. package/dist/validate.js.map +1 -0
  54. package/package.json +33 -1
@@ -1,561 +1,41 @@
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);
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
- MODELS: () => MODELS,
29
- PARAM_SPECS: () => PARAM_SPECS,
30
- PROVIDER_META: () => PROVIDER_META,
31
- PROVIDER_PARAMS: () => PROVIDER_PARAMS,
32
- REASONING_MODEL_UNSUPPORTED: () => REASONING_MODEL_UNSUPPORTED,
33
- bedrockSupportsCaching: () => bedrockSupportsCaching,
34
- canHostOpenAIModels: () => canHostOpenAIModels,
35
- detectBedrockModelFamily: () => detectBedrockModelFamily,
36
- detectProvider: () => detectProvider,
37
- isReasoningModel: () => isReasoningModel
38
- });
39
- module.exports = __toCommonJS(providers_exports);
40
- function detectProvider(host) {
41
- if (host.includes("openrouter")) return "openrouter";
42
- if (host.includes("gateway.ai.vercel")) return "vercel";
43
- if (host.includes("amazonaws") || host.includes("bedrock")) return "bedrock";
44
- if (host.includes("openai")) return "openai";
45
- if (host.includes("anthropic") || host.includes("claude")) return "anthropic";
46
- if (host.includes("googleapis") || host.includes("google")) return "google";
47
- if (host.includes("mistral")) return "mistral";
48
- if (host.includes("cohere")) return "cohere";
49
- return void 0;
50
- }
51
- var ALIASES = {
52
- // temperature
53
- temp: "temperature",
54
- // max_tokens
55
- max: "max_tokens",
56
- max_out: "max_tokens",
57
- max_output: "max_tokens",
58
- max_output_tokens: "max_tokens",
59
- max_completion_tokens: "max_tokens",
60
- maxOutputTokens: "max_tokens",
61
- maxTokens: "max_tokens",
62
- // top_p
63
- topp: "top_p",
64
- topP: "top_p",
65
- nucleus: "top_p",
66
- // top_k
67
- topk: "top_k",
68
- topK: "top_k",
69
- // frequency_penalty
70
- freq: "frequency_penalty",
71
- freq_penalty: "frequency_penalty",
72
- frequencyPenalty: "frequency_penalty",
73
- repetition_penalty: "frequency_penalty",
74
- // presence_penalty
75
- pres: "presence_penalty",
76
- pres_penalty: "presence_penalty",
77
- presencePenalty: "presence_penalty",
78
- // stop
79
- stop_sequences: "stop",
80
- stopSequences: "stop",
81
- stop_sequence: "stop",
82
- // seed
83
- random_seed: "seed",
84
- randomSeed: "seed",
85
- // n (completions count)
86
- candidateCount: "n",
87
- candidate_count: "n",
88
- num_completions: "n",
89
- // effort / reasoning
90
- reasoning_effort: "effort",
91
- reasoning: "effort",
92
- // cache
93
- cache_control: "cache",
94
- cacheControl: "cache",
95
- cachePoint: "cache",
96
- cache_point: "cache"
97
- };
98
- var PROVIDER_PARAMS = {
99
- openai: {
100
- temperature: "temperature",
101
- max_tokens: "max_tokens",
102
- top_p: "top_p",
103
- frequency_penalty: "frequency_penalty",
104
- presence_penalty: "presence_penalty",
105
- stop: "stop",
106
- n: "n",
107
- seed: "seed",
108
- stream: "stream",
109
- effort: "reasoning_effort"
110
- },
111
- anthropic: {
112
- temperature: "temperature",
113
- max_tokens: "max_tokens",
114
- top_p: "top_p",
115
- top_k: "top_k",
116
- stop: "stop_sequences",
117
- stream: "stream",
118
- effort: "effort",
119
- cache: "cache_control",
120
- cache_ttl: "cache_ttl"
121
- },
122
- google: {
123
- temperature: "temperature",
124
- max_tokens: "maxOutputTokens",
125
- top_p: "topP",
126
- top_k: "topK",
127
- frequency_penalty: "frequencyPenalty",
128
- presence_penalty: "presencePenalty",
129
- stop: "stopSequences",
130
- n: "candidateCount",
131
- stream: "stream",
132
- seed: "seed",
133
- responseMimeType: "responseMimeType",
134
- responseSchema: "responseSchema"
135
- },
136
- mistral: {
137
- temperature: "temperature",
138
- max_tokens: "max_tokens",
139
- top_p: "top_p",
140
- frequency_penalty: "frequency_penalty",
141
- presence_penalty: "presence_penalty",
142
- stop: "stop",
143
- n: "n",
144
- seed: "random_seed",
145
- stream: "stream",
146
- safe_prompt: "safe_prompt",
147
- min_tokens: "min_tokens"
148
- },
149
- cohere: {
150
- temperature: "temperature",
151
- max_tokens: "max_tokens",
152
- top_p: "p",
153
- top_k: "k",
154
- frequency_penalty: "frequency_penalty",
155
- presence_penalty: "presence_penalty",
156
- stop: "stop_sequences",
157
- stream: "stream",
158
- seed: "seed"
159
- },
160
- bedrock: {
161
- // Bedrock Converse API uses camelCase
162
- temperature: "temperature",
163
- max_tokens: "maxTokens",
164
- top_p: "topP",
165
- top_k: "topK",
166
- // Claude models via additionalModelRequestFields
167
- stop: "stopSequences",
168
- stream: "stream",
169
- cache: "cache_control",
170
- cache_ttl: "cache_ttl"
171
- },
172
- openrouter: {
173
- // OpenAI-compatible API with extra routing params
174
- temperature: "temperature",
175
- max_tokens: "max_tokens",
176
- top_p: "top_p",
177
- top_k: "top_k",
178
- frequency_penalty: "frequency_penalty",
179
- presence_penalty: "presence_penalty",
180
- stop: "stop",
181
- n: "n",
182
- seed: "seed",
183
- stream: "stream",
184
- effort: "reasoning_effort"
185
- },
186
- vercel: {
187
- // OpenAI-compatible gateway
188
- temperature: "temperature",
189
- max_tokens: "max_tokens",
190
- top_p: "top_p",
191
- top_k: "top_k",
192
- frequency_penalty: "frequency_penalty",
193
- presence_penalty: "presence_penalty",
194
- stop: "stop",
195
- n: "n",
196
- seed: "seed",
197
- stream: "stream",
198
- effort: "reasoning_effort"
199
- }
200
- };
201
- var PARAM_SPECS = {
202
- openai: {
203
- temperature: { type: "number", min: 0, max: 2 },
204
- max_tokens: { type: "number", min: 1 },
205
- top_p: { type: "number", min: 0, max: 1 },
206
- frequency_penalty: { type: "number", min: -2, max: 2 },
207
- presence_penalty: { type: "number", min: -2, max: 2 },
208
- stop: { type: "string" },
209
- n: { type: "number", min: 1 },
210
- seed: { type: "number" },
211
- stream: { type: "boolean" },
212
- reasoning_effort: {
213
- type: "string",
214
- values: ["none", "minimal", "low", "medium", "high", "xhigh"]
215
- }
216
- },
217
- anthropic: {
218
- temperature: { type: "number", min: 0, max: 1 },
219
- max_tokens: { type: "number", min: 1 },
220
- top_p: { type: "number", min: 0, max: 1 },
221
- top_k: { type: "number", min: 0 },
222
- stop_sequences: { type: "string" },
223
- stream: { type: "boolean" },
224
- effort: { type: "string", values: ["low", "medium", "high", "max"] },
225
- cache_control: { type: "string", values: ["ephemeral"] },
226
- cache_ttl: { type: "string", values: ["5m", "1h"] }
227
- },
228
- google: {
229
- temperature: { type: "number", min: 0, max: 2 },
230
- maxOutputTokens: { type: "number", min: 1 },
231
- topP: { type: "number", min: 0, max: 1 },
232
- topK: { type: "number", min: 0 },
233
- frequencyPenalty: { type: "number", min: -2, max: 2 },
234
- presencePenalty: { type: "number", min: -2, max: 2 },
235
- stopSequences: { type: "string" },
236
- candidateCount: { type: "number", min: 1 },
237
- stream: { type: "boolean" },
238
- seed: { type: "number" },
239
- responseMimeType: { type: "string" },
240
- responseSchema: { type: "string" }
241
- },
242
- mistral: {
243
- temperature: { type: "number", min: 0, max: 1 },
244
- max_tokens: { type: "number", min: 1 },
245
- top_p: { type: "number", min: 0, max: 1 },
246
- frequency_penalty: { type: "number", min: -2, max: 2 },
247
- presence_penalty: { type: "number", min: -2, max: 2 },
248
- stop: { type: "string" },
249
- n: { type: "number", min: 1 },
250
- random_seed: { type: "number" },
251
- stream: { type: "boolean" },
252
- safe_prompt: { type: "boolean" },
253
- min_tokens: { type: "number", min: 0 }
254
- },
255
- cohere: {
256
- temperature: { type: "number", min: 0, max: 1 },
257
- max_tokens: { type: "number", min: 1 },
258
- p: { type: "number", min: 0, max: 1 },
259
- k: { type: "number", min: 0, max: 500 },
260
- frequency_penalty: { type: "number", min: 0, max: 1 },
261
- presence_penalty: { type: "number", min: 0, max: 1 },
262
- stop_sequences: { type: "string" },
263
- stream: { type: "boolean" },
264
- seed: { type: "number" }
265
- },
266
- bedrock: {
267
- // Converse API inferenceConfig params
268
- temperature: { type: "number", min: 0, max: 1 },
269
- maxTokens: { type: "number", min: 1 },
270
- topP: { type: "number", min: 0, max: 1 },
271
- topK: { type: "number", min: 0 },
272
- stopSequences: { type: "string" },
273
- stream: { type: "boolean" },
274
- cache_control: { type: "string", values: ["ephemeral"] },
275
- cache_ttl: { type: "string", values: ["5m", "1h"] }
276
- },
277
- openrouter: {
278
- // Loose validation — proxies to many providers with varying ranges
279
- temperature: { type: "number", min: 0, max: 2 },
280
- max_tokens: { type: "number", min: 1 },
281
- top_p: { type: "number", min: 0, max: 1 },
282
- top_k: { type: "number", min: 0 },
283
- frequency_penalty: { type: "number", min: -2, max: 2 },
284
- presence_penalty: { type: "number", min: -2, max: 2 },
285
- stop: { type: "string" },
286
- n: { type: "number", min: 1 },
287
- seed: { type: "number" },
288
- stream: { type: "boolean" },
289
- reasoning_effort: {
290
- type: "string",
291
- values: ["none", "minimal", "low", "medium", "high", "xhigh"]
292
- }
293
- },
294
- vercel: {
295
- // Loose validation — proxies to many providers with varying ranges
296
- temperature: { type: "number", min: 0, max: 2 },
297
- max_tokens: { type: "number", min: 1 },
298
- top_p: { type: "number", min: 0, max: 1 },
299
- top_k: { type: "number", min: 0 },
300
- frequency_penalty: { type: "number", min: -2, max: 2 },
301
- presence_penalty: { type: "number", min: -2, max: 2 },
302
- stop: { type: "string" },
303
- n: { type: "number", min: 1 },
304
- seed: { type: "number" },
305
- stream: { type: "boolean" },
306
- reasoning_effort: {
307
- type: "string",
308
- values: ["none", "minimal", "low", "medium", "high", "xhigh"]
309
- }
310
- }
311
- };
312
- function isReasoningModel(model) {
313
- const name = model.includes("/") ? model.split("/").pop() : model;
314
- return /^o[134]/.test(name);
315
- }
316
- function canHostOpenAIModels(provider) {
317
- return provider === "openai" || provider === "openrouter" || provider === "vercel";
318
- }
319
- var REASONING_MODEL_UNSUPPORTED = /* @__PURE__ */ new Set([
320
- "temperature",
321
- "top_p",
322
- "frequency_penalty",
323
- "presence_penalty",
324
- "n"
325
- ]);
326
- function detectBedrockModelFamily(model) {
327
- const parts = model.split(".");
328
- let prefix = parts[0];
329
- if (["us", "eu", "apac", "global"].includes(prefix) && parts.length > 1) {
330
- prefix = parts[1];
331
- }
332
- const families = [
333
- "anthropic",
334
- "meta",
335
- "amazon",
336
- "mistral",
337
- "cohere",
338
- "ai21"
339
- ];
340
- return families.find((f) => prefix === f);
341
- }
342
- function bedrockSupportsCaching(model) {
343
- const family = detectBedrockModelFamily(model);
344
- if (family === "anthropic") return true;
345
- if (family === "amazon" && model.includes("nova")) return true;
346
- return false;
347
- }
348
- var CACHE_VALUES = {
349
- openai: void 0,
350
- // OpenAI auto-caches; no explicit param
351
- anthropic: "ephemeral",
352
- google: void 0,
353
- // Google uses explicit caching API, not a param
354
- mistral: void 0,
355
- cohere: void 0,
356
- bedrock: "ephemeral",
357
- // Supported for Claude models on Bedrock
358
- openrouter: void 0,
359
- // Depends on underlying provider
360
- vercel: void 0
361
- // Depends on underlying provider
362
- };
363
- var CACHE_TTLS = {
364
- openai: void 0,
365
- anthropic: ["5m", "1h"],
366
- google: void 0,
367
- mistral: void 0,
368
- cohere: void 0,
369
- bedrock: ["5m", "1h"],
370
- // Claude on Bedrock uses same TTLs as direct Anthropic
371
- openrouter: void 0,
372
- vercel: void 0
373
- };
374
- var DURATION_RE = /^\d+[mh]$/;
375
- var PROVIDER_META = [
376
- { id: "openai", name: "OpenAI", host: "api.openai.com", color: "#10a37f" },
377
- { id: "anthropic", name: "Anthropic", host: "api.anthropic.com", color: "#e8956a" },
378
- { id: "google", name: "Google", host: "generativelanguage.googleapis.com", color: "#4285f4" },
379
- { id: "mistral", name: "Mistral", host: "api.mistral.ai", color: "#ff7000" },
380
- { id: "cohere", name: "Cohere", host: "api.cohere.com", color: "#39594d" },
381
- { id: "bedrock", name: "Bedrock", host: "bedrock-runtime.us-east-1.amazonaws.com", color: "#ff9900" },
382
- { id: "openrouter", name: "OpenRouter", host: "openrouter.ai", color: "#818cf8" },
383
- { id: "vercel", name: "Vercel", host: "gateway.ai.vercel.app", color: "#ededed" }
384
- ];
385
- var MODELS = {
386
- openai: [
387
- "gpt-5.2",
388
- "gpt-5.2-pro",
389
- "gpt-4.1",
390
- "gpt-4.1-mini",
391
- "gpt-4.1-nano",
392
- "o3",
393
- "o3-mini",
394
- "o4-mini",
395
- "o1-pro"
396
- ],
397
- anthropic: [
398
- "claude-opus-4-6",
399
- "claude-sonnet-4-6",
400
- "claude-sonnet-4-5",
401
- "claude-haiku-4-5"
402
- ],
403
- google: [
404
- "gemini-3-pro-preview",
405
- "gemini-3-flash-preview",
406
- "gemini-2.5-pro",
407
- "gemini-2.5-flash"
408
- ],
409
- mistral: [
410
- "mistral-large-latest",
411
- "mistral-medium-latest",
412
- "mistral-small-latest",
413
- "codestral-latest",
414
- "magistral-medium-latest"
415
- ],
416
- cohere: [
417
- "command-a-03-2025",
418
- "command-r-plus-08-2024",
419
- "command-r-08-2024",
420
- "command-r7b-12-2024"
421
- ],
422
- bedrock: [
423
- "anthropic.claude-opus-4-6-v1",
424
- "anthropic.claude-sonnet-4-6-v1",
425
- "anthropic.claude-haiku-4-5-v1",
426
- "amazon.nova-pro-v1",
427
- "amazon.nova-lite-v1",
428
- "meta.llama3-70b-instruct-v1:0"
429
- ],
430
- openrouter: [
431
- "openai/gpt-5.2",
432
- "anthropic/claude-opus-4-6",
433
- "google/gemini-2.5-pro",
434
- "mistral/mistral-large-latest"
435
- ],
436
- vercel: [
437
- "openai/gpt-5.2",
438
- "anthropic/claude-opus-4-6",
439
- "google/gemini-2.5-pro",
440
- "google/gemini-3-pro-preview",
441
- "google/gemini-3-flash-preview",
442
- "mistral/mistral-large-latest",
443
- "qwen/qwen2.5-pro"
444
- ]
445
- };
446
- var CANONICAL_PARAM_SPECS = {
447
- openai: {
448
- temperature: { type: "number", min: 0, max: 2, default: 0.7, description: "Controls randomness" },
449
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
450
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
451
- frequency_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize frequent tokens" },
452
- presence_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize repeated topics" },
453
- stop: { type: "string", default: "", description: "Stop sequences" },
454
- n: { type: "number", min: 1, default: 1, description: "Completions count" },
455
- seed: { type: "number", default: "", description: "Random seed" },
456
- stream: { type: "boolean", default: false, description: "Stream response" },
457
- effort: { type: "enum", values: ["none", "minimal", "low", "medium", "high", "xhigh"], default: "medium", description: "Reasoning effort" }
458
- },
459
- anthropic: {
460
- temperature: { type: "number", min: 0, max: 1, default: 0.7, description: "Controls randomness" },
461
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
462
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
463
- top_k: { type: "number", min: 0, default: 40, description: "Top-K sampling" },
464
- stop: { type: "string", default: "", description: "Stop sequences" },
465
- stream: { type: "boolean", default: false, description: "Stream response" },
466
- effort: { type: "enum", values: ["low", "medium", "high", "max"], default: "medium", description: "Thinking effort" },
467
- cache: { type: "enum", values: ["ephemeral"], default: "ephemeral", description: "Cache control" },
468
- cache_ttl: { type: "enum", values: ["5m", "1h"], default: "5m", description: "Cache TTL" }
469
- },
470
- google: {
471
- temperature: { type: "number", min: 0, max: 2, default: 0.7, description: "Controls randomness" },
472
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
473
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
474
- top_k: { type: "number", min: 0, default: 40, description: "Top-K sampling" },
475
- frequency_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize frequent tokens" },
476
- presence_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize repeated topics" },
477
- stop: { type: "string", default: "", description: "Stop sequences" },
478
- n: { type: "number", min: 1, default: 1, description: "Candidate count" },
479
- stream: { type: "boolean", default: false, description: "Stream response" },
480
- seed: { type: "number", default: "", description: "Random seed" }
481
- },
482
- mistral: {
483
- temperature: { type: "number", min: 0, max: 1, default: 0.7, description: "Controls randomness" },
484
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
485
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
486
- frequency_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize frequent tokens" },
487
- presence_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize repeated topics" },
488
- stop: { type: "string", default: "", description: "Stop sequences" },
489
- n: { type: "number", min: 1, default: 1, description: "Completions count" },
490
- seed: { type: "number", default: "", description: "Random seed" },
491
- stream: { type: "boolean", default: false, description: "Stream response" },
492
- safe_prompt: { type: "boolean", default: false, description: "Enable safe prompt" },
493
- min_tokens: { type: "number", min: 0, default: 0, description: "Minimum tokens" }
494
- },
495
- cohere: {
496
- temperature: { type: "number", min: 0, max: 1, default: 0.7, description: "Controls randomness" },
497
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
498
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling (p)" },
499
- top_k: { type: "number", min: 0, max: 500, default: 40, description: "Top-K sampling (k)" },
500
- frequency_penalty: { type: "number", min: 0, max: 1, default: 0, description: "Penalize frequent tokens" },
501
- presence_penalty: { type: "number", min: 0, max: 1, default: 0, description: "Penalize repeated topics" },
502
- stop: { type: "string", default: "", description: "Stop sequences" },
503
- stream: { type: "boolean", default: false, description: "Stream response" },
504
- seed: { type: "number", default: "", description: "Random seed" }
505
- },
506
- bedrock: {
507
- temperature: { type: "number", min: 0, max: 1, default: 0.7, description: "Controls randomness" },
508
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
509
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
510
- top_k: { type: "number", min: 0, default: 40, description: "Top-K sampling" },
511
- stop: { type: "string", default: "", description: "Stop sequences" },
512
- stream: { type: "boolean", default: false, description: "Stream response" },
513
- cache: { type: "enum", values: ["ephemeral"], default: "ephemeral", description: "Cache control" },
514
- cache_ttl: { type: "enum", values: ["5m", "1h"], default: "5m", description: "Cache TTL" }
515
- },
516
- openrouter: {
517
- temperature: { type: "number", min: 0, max: 2, default: 0.7, description: "Controls randomness" },
518
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
519
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
520
- top_k: { type: "number", min: 0, default: 40, description: "Top-K sampling" },
521
- frequency_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize frequent tokens" },
522
- presence_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize repeated topics" },
523
- stop: { type: "string", default: "", description: "Stop sequences" },
524
- n: { type: "number", min: 1, default: 1, description: "Completions count" },
525
- seed: { type: "number", default: "", description: "Random seed" },
526
- stream: { type: "boolean", default: false, description: "Stream response" },
527
- effort: { type: "enum", values: ["none", "minimal", "low", "medium", "high", "xhigh"], default: "medium", description: "Reasoning effort" }
528
- },
529
- vercel: {
530
- temperature: { type: "number", min: 0, max: 2, default: 0.7, description: "Controls randomness" },
531
- max_tokens: { type: "number", min: 1, default: 4096, description: "Maximum output tokens" },
532
- top_p: { type: "number", min: 0, max: 1, default: 1, description: "Nucleus sampling" },
533
- top_k: { type: "number", min: 0, default: 40, description: "Top-K sampling" },
534
- frequency_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize frequent tokens" },
535
- presence_penalty: { type: "number", min: -2, max: 2, default: 0, description: "Penalize repeated topics" },
536
- stop: { type: "string", default: "", description: "Stop sequences" },
537
- n: { type: "number", min: 1, default: 1, description: "Completions count" },
538
- seed: { type: "number", default: "", description: "Random seed" },
539
- stream: { type: "boolean", default: false, description: "Stream response" },
540
- effort: { type: "enum", values: ["none", "minimal", "low", "medium", "high", "xhigh"], default: "medium", description: "Reasoning effort" }
541
- }
542
- };
543
- // Annotate the CommonJS export names for ESM import in node:
544
- 0 && (module.exports = {
545
- ALIASES,
546
- CACHE_TTLS,
547
- CACHE_VALUES,
548
- CANONICAL_PARAM_SPECS,
549
- DURATION_RE,
550
- MODELS,
551
- PARAM_SPECS,
552
- PROVIDER_META,
553
- PROVIDER_PARAMS,
554
- REASONING_MODEL_UNSUPPORTED,
555
- bedrockSupportsCaching,
556
- canHostOpenAIModels,
557
- detectBedrockModelFamily,
558
- detectProvider,
559
- isReasoningModel
560
- });
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+ var _chunkRR3VXIW2cjs = require('./chunk-RR3VXIW2.cjs');
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+ var _chunkNSCBY4VDcjs = require('./chunk-NSCBY4VD.cjs');
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+ exports.ALIASES = _chunkNSCBY4VDcjs.ALIASES; exports.CACHE_TTLS = _chunkNSCBY4VDcjs.CACHE_TTLS; exports.CACHE_VALUES = _chunkNSCBY4VDcjs.CACHE_VALUES; exports.CANONICAL_PARAM_SPECS = _chunkRR3VXIW2cjs.CANONICAL_PARAM_SPECS; exports.DURATION_RE = _chunkNSCBY4VDcjs.DURATION_RE; exports.MODELS = _chunkRR3VXIW2cjs.MODELS; exports.PARAM_SPECS = _chunkNSCBY4VDcjs.PARAM_SPECS; exports.PROVIDER_META = _chunkRR3VXIW2cjs.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;
561
41
  //# sourceMappingURL=providers.cjs.map