@stll/ai-catalog 0.3.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,1573 +1,2 @@
1
- import * as v from "valibot";
2
- //#region src/model-rate.d.ts
3
- /**
4
- * models.dev publishes USD prices per one million tokens. Stella stores the
5
- * same rates as integer ledger units so usage arithmetic never depends on
6
- * floating point values.
7
- */
8
- export declare const MODEL_RATE_UNITS_PER_USD = 100000;
9
- type ModelRateAmounts = {
10
- /** Normalized ledger units per 1M input tokens. */
11
- inputPerMTok: number;
12
- /** Normalized ledger units per 1M output tokens. */
13
- outputPerMTok: number;
14
- /**
15
- * Normalized ledger units per 1M cached input tokens, when the provider
16
- * offers a cache-read adjustment. Falls back to `inputPerMTok` when absent.
17
- */
18
- cachedInputPerMTok?: number;
19
- /**
20
- * Normalized ledger units per 1M tokens written to a prompt cache. Falls
21
- * back to `inputPerMTok` when absent.
22
- */
23
- cachedWriteInputPerMTok?: number;
24
- };
25
- /**
26
- * A discriminated rate schedule. Consumers resolve the schedule from the
27
- * request's total input tokens before reading any prices, so a model with a
28
- * long-context premium cannot accidentally be metered at its base rate.
29
- */
30
- type ModelRate = ({
31
- kind: "flat";
32
- } & ModelRateAmounts) | {
33
- kind: "input-token-tiered";
34
- /** The base tier applies at or below this total input-token count. */
35
- inputTokenThreshold: number;
36
- standard: ModelRateAmounts;
37
- /** Applies to the entire request once input exceeds the threshold. */
38
- aboveThreshold: ModelRateAmounts;
39
- };
40
- export declare const getStandardModelRate: (rate: ModelRate) => ModelRateAmounts;
41
- export declare const resolveModelRate: (rate: ModelRate, inputTokens: number) => ModelRateAmounts;
42
- //#endregion
43
- //#region src/model-rates.gen.d.ts
44
- export declare const MODEL_RATES: {
45
- readonly "gemini-3.8-flash": {
46
- readonly kind: "flat";
47
- readonly inputPerMTok: 75000;
48
- readonly outputPerMTok: 375000;
49
- readonly cachedInputPerMTok: 7500;
50
- };
51
- readonly "gemini-3.7-flash": {
52
- readonly kind: "flat";
53
- readonly inputPerMTok: 75000;
54
- readonly outputPerMTok: 375000;
55
- readonly cachedInputPerMTok: 7500;
56
- };
57
- readonly "gemini-3.6-flash": {
58
- readonly kind: "flat";
59
- readonly inputPerMTok: 75000;
60
- readonly outputPerMTok: 375000;
61
- readonly cachedInputPerMTok: 7500;
62
- };
63
- readonly "gemini-3.5-flash-lite": {
64
- readonly kind: "flat";
65
- readonly inputPerMTok: 30000;
66
- readonly outputPerMTok: 250000;
67
- readonly cachedInputPerMTok: 3000;
68
- };
69
- readonly "gemini-3.1-pro-preview": {
70
- readonly kind: "input-token-tiered";
71
- readonly inputTokenThreshold: 200000;
72
- readonly standard: {
73
- readonly inputPerMTok: 200000;
74
- readonly outputPerMTok: 1200000;
75
- readonly cachedInputPerMTok: 20000;
76
- };
77
- readonly aboveThreshold: {
78
- readonly inputPerMTok: 400000;
79
- readonly outputPerMTok: 1800000;
80
- readonly cachedInputPerMTok: 40000;
81
- };
82
- };
83
- readonly "gemini-3.5-flash": {
84
- readonly kind: "flat";
85
- readonly inputPerMTok: 150000;
86
- readonly outputPerMTok: 900000;
87
- readonly cachedInputPerMTok: 15000;
88
- };
89
- readonly "gemini-3.1-flash-lite": {
90
- readonly kind: "flat";
91
- readonly inputPerMTok: 25000;
92
- readonly outputPerMTok: 150000;
93
- readonly cachedInputPerMTok: 2500;
94
- };
95
- readonly "gpt-6.1-sol": {
96
- readonly kind: "input-token-tiered";
97
- readonly inputTokenThreshold: 272000;
98
- readonly standard: {
99
- readonly inputPerMTok: 200000;
100
- readonly outputPerMTok: 1000000;
101
- readonly cachedInputPerMTok: 10000;
102
- readonly cachedWriteInputPerMTok: 250000;
103
- };
104
- readonly aboveThreshold: {
105
- readonly inputPerMTok: 400000;
106
- readonly outputPerMTok: 1500000;
107
- readonly cachedInputPerMTok: 20000;
108
- readonly cachedWriteInputPerMTok: 500000;
109
- };
110
- };
111
- readonly "gpt-6-astra": {
112
- readonly kind: "input-token-tiered";
113
- readonly inputTokenThreshold: 272000;
114
- readonly standard: {
115
- readonly inputPerMTok: 1000000;
116
- readonly outputPerMTok: 5000000;
117
- readonly cachedInputPerMTok: 100000;
118
- readonly cachedWriteInputPerMTok: 1250000;
119
- };
120
- readonly aboveThreshold: {
121
- readonly inputPerMTok: 2000000;
122
- readonly outputPerMTok: 7500000;
123
- readonly cachedInputPerMTok: 200000;
124
- readonly cachedWriteInputPerMTok: 2500000;
125
- };
126
- };
127
- readonly "gpt-6-sol": {
128
- readonly kind: "input-token-tiered";
129
- readonly inputTokenThreshold: 272000;
130
- readonly standard: {
131
- readonly inputPerMTok: 200000;
132
- readonly outputPerMTok: 1000000;
133
- readonly cachedInputPerMTok: 20000;
134
- readonly cachedWriteInputPerMTok: 250000;
135
- };
136
- readonly aboveThreshold: {
137
- readonly inputPerMTok: 400000;
138
- readonly outputPerMTok: 1500000;
139
- readonly cachedInputPerMTok: 40000;
140
- readonly cachedWriteInputPerMTok: 500000;
141
- };
142
- };
143
- readonly "gpt-6-luna": {
144
- readonly kind: "input-token-tiered";
145
- readonly inputTokenThreshold: 272000;
146
- readonly standard: {
147
- readonly inputPerMTok: 10000;
148
- readonly outputPerMTok: 50000;
149
- readonly cachedInputPerMTok: 1000;
150
- readonly cachedWriteInputPerMTok: 12500;
151
- };
152
- readonly aboveThreshold: {
153
- readonly inputPerMTok: 20000;
154
- readonly outputPerMTok: 75000;
155
- readonly cachedInputPerMTok: 2000;
156
- readonly cachedWriteInputPerMTok: 25000;
157
- };
158
- };
159
- readonly "gpt-5.6": {
160
- readonly kind: "input-token-tiered";
161
- readonly inputTokenThreshold: 272000;
162
- readonly standard: {
163
- readonly inputPerMTok: 400000;
164
- readonly outputPerMTok: 2000000;
165
- readonly cachedInputPerMTok: 40000;
166
- readonly cachedWriteInputPerMTok: 500000;
167
- };
168
- readonly aboveThreshold: {
169
- readonly inputPerMTok: 800000;
170
- readonly outputPerMTok: 3000000;
171
- readonly cachedInputPerMTok: 80000;
172
- readonly cachedWriteInputPerMTok: 1000000;
173
- };
174
- };
175
- readonly "gpt-5.6-terra": {
176
- readonly kind: "input-token-tiered";
177
- readonly inputTokenThreshold: 272000;
178
- readonly standard: {
179
- readonly inputPerMTok: 200000;
180
- readonly outputPerMTok: 1200000;
181
- readonly cachedInputPerMTok: 20000;
182
- readonly cachedWriteInputPerMTok: 250000;
183
- };
184
- readonly aboveThreshold: {
185
- readonly inputPerMTok: 400000;
186
- readonly outputPerMTok: 1800000;
187
- readonly cachedInputPerMTok: 40000;
188
- readonly cachedWriteInputPerMTok: 500000;
189
- };
190
- };
191
- readonly "gpt-5.6-luna": {
192
- readonly kind: "input-token-tiered";
193
- readonly inputTokenThreshold: 272000;
194
- readonly standard: {
195
- readonly inputPerMTok: 20000;
196
- readonly outputPerMTok: 120000;
197
- readonly cachedInputPerMTok: 2000;
198
- readonly cachedWriteInputPerMTok: 25000;
199
- };
200
- readonly aboveThreshold: {
201
- readonly inputPerMTok: 40000;
202
- readonly outputPerMTok: 180000;
203
- readonly cachedInputPerMTok: 4000;
204
- readonly cachedWriteInputPerMTok: 50000;
205
- };
206
- };
207
- readonly "gpt-5.5": {
208
- readonly kind: "input-token-tiered";
209
- readonly inputTokenThreshold: 272000;
210
- readonly standard: {
211
- readonly inputPerMTok: 500000;
212
- readonly outputPerMTok: 3000000;
213
- readonly cachedInputPerMTok: 50000;
214
- };
215
- readonly aboveThreshold: {
216
- readonly inputPerMTok: 1000000;
217
- readonly outputPerMTok: 4500000;
218
- readonly cachedInputPerMTok: 100000;
219
- };
220
- };
221
- readonly "gpt-5.4": {
222
- readonly kind: "input-token-tiered";
223
- readonly inputTokenThreshold: 272000;
224
- readonly standard: {
225
- readonly inputPerMTok: 250000;
226
- readonly outputPerMTok: 1500000;
227
- readonly cachedInputPerMTok: 25000;
228
- };
229
- readonly aboveThreshold: {
230
- readonly inputPerMTok: 500000;
231
- readonly outputPerMTok: 2250000;
232
- readonly cachedInputPerMTok: 50000;
233
- };
234
- };
235
- readonly "gpt-5.4-mini": {
236
- readonly kind: "flat";
237
- readonly inputPerMTok: 75000;
238
- readonly outputPerMTok: 450000;
239
- readonly cachedInputPerMTok: 7500;
240
- };
241
- readonly "gpt-5.4-nano": {
242
- readonly kind: "flat";
243
- readonly inputPerMTok: 20000;
244
- readonly outputPerMTok: 125000;
245
- readonly cachedInputPerMTok: 2000;
246
- };
247
- readonly "gpt-5.2": {
248
- readonly kind: "flat";
249
- readonly inputPerMTok: 175000;
250
- readonly outputPerMTok: 1400000;
251
- readonly cachedInputPerMTok: 17500;
252
- };
253
- readonly "claude-sonnet-5-5": {
254
- readonly kind: "flat";
255
- readonly inputPerMTok: 200000;
256
- readonly outputPerMTok: 1000000;
257
- readonly cachedInputPerMTok: 20000;
258
- readonly cachedWriteInputPerMTok: 250000;
259
- };
260
- readonly "claude-sonnet-5": {
261
- readonly kind: "flat";
262
- readonly inputPerMTok: 200000;
263
- readonly outputPerMTok: 1000000;
264
- readonly cachedInputPerMTok: 20000;
265
- readonly cachedWriteInputPerMTok: 250000;
266
- };
267
- readonly "claude-fable-5-1": {
268
- readonly kind: "flat";
269
- readonly inputPerMTok: 1000000;
270
- readonly outputPerMTok: 5000000;
271
- readonly cachedInputPerMTok: 25000;
272
- readonly cachedWriteInputPerMTok: 1250000;
273
- };
274
- readonly "claude-fable-5": {
275
- readonly kind: "flat";
276
- readonly inputPerMTok: 1000000;
277
- readonly outputPerMTok: 5000000;
278
- readonly cachedInputPerMTok: 100000;
279
- readonly cachedWriteInputPerMTok: 1250000;
280
- };
281
- readonly "claude-opus-5-5": {
282
- readonly kind: "flat";
283
- readonly inputPerMTok: 400000;
284
- readonly outputPerMTok: 2000000;
285
- readonly cachedInputPerMTok: 20000;
286
- readonly cachedWriteInputPerMTok: 500000;
287
- };
288
- readonly "claude-opus-5": {
289
- readonly kind: "flat";
290
- readonly inputPerMTok: 500000;
291
- readonly outputPerMTok: 2500000;
292
- readonly cachedInputPerMTok: 50000;
293
- readonly cachedWriteInputPerMTok: 625000;
294
- };
295
- readonly "claude-opus-4-8": {
296
- readonly kind: "flat";
297
- readonly inputPerMTok: 500000;
298
- readonly outputPerMTok: 2500000;
299
- readonly cachedInputPerMTok: 50000;
300
- readonly cachedWriteInputPerMTok: 625000;
301
- };
302
- readonly "claude-opus-4-7": {
303
- readonly kind: "flat";
304
- readonly inputPerMTok: 500000;
305
- readonly outputPerMTok: 2500000;
306
- readonly cachedInputPerMTok: 50000;
307
- readonly cachedWriteInputPerMTok: 625000;
308
- };
309
- readonly "claude-sonnet-4-6": {
310
- readonly kind: "flat";
311
- readonly inputPerMTok: 300000;
312
- readonly outputPerMTok: 1500000;
313
- readonly cachedInputPerMTok: 30000;
314
- readonly cachedWriteInputPerMTok: 375000;
315
- };
316
- readonly "claude-opus-4-6": {
317
- readonly kind: "flat";
318
- readonly inputPerMTok: 500000;
319
- readonly outputPerMTok: 2500000;
320
- readonly cachedInputPerMTok: 50000;
321
- readonly cachedWriteInputPerMTok: 625000;
322
- };
323
- readonly "claude-haiku-4-5-20251001": {
324
- readonly kind: "flat";
325
- readonly inputPerMTok: 100000;
326
- readonly outputPerMTok: 500000;
327
- readonly cachedInputPerMTok: 10000;
328
- readonly cachedWriteInputPerMTok: 125000;
329
- };
330
- readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": {
331
- readonly kind: "flat";
332
- readonly inputPerMTok: 330000;
333
- readonly outputPerMTok: 1650000;
334
- readonly cachedInputPerMTok: 33000;
335
- readonly cachedWriteInputPerMTok: 412500;
336
- };
337
- readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": {
338
- readonly kind: "flat";
339
- readonly inputPerMTok: 110000;
340
- readonly outputPerMTok: 550000;
341
- readonly cachedInputPerMTok: 11000;
342
- readonly cachedWriteInputPerMTok: 137500;
343
- };
344
- readonly "us.amazon.nova-pro-v1:0": {
345
- readonly kind: "flat";
346
- readonly inputPerMTok: 80000;
347
- readonly outputPerMTok: 320000;
348
- readonly cachedInputPerMTok: 20000;
349
- readonly cachedWriteInputPerMTok: 80000;
350
- };
351
- readonly "us.amazon.nova-lite-v1:0": {
352
- readonly kind: "flat";
353
- readonly inputPerMTok: 6000;
354
- readonly outputPerMTok: 24000;
355
- readonly cachedInputPerMTok: 1500;
356
- readonly cachedWriteInputPerMTok: 6000;
357
- };
358
- readonly "us.amazon.nova-micro-v1:0": {
359
- readonly kind: "flat";
360
- readonly inputPerMTok: 3500;
361
- readonly outputPerMTok: 14000;
362
- readonly cachedInputPerMTok: 875;
363
- readonly cachedWriteInputPerMTok: 3500;
364
- };
365
- readonly "openai.gpt-oss-120b-1:0": {
366
- readonly kind: "flat";
367
- readonly inputPerMTok: 15000;
368
- readonly outputPerMTok: 60000;
369
- };
370
- readonly "openai.gpt-oss-20b-1:0": {
371
- readonly kind: "flat";
372
- readonly inputPerMTok: 7000;
373
- readonly outputPerMTok: 30000;
374
- };
375
- readonly "mistral-large-latest": {
376
- readonly kind: "flat";
377
- readonly inputPerMTok: 50000;
378
- readonly outputPerMTok: 150000;
379
- readonly cachedInputPerMTok: 5000;
380
- };
381
- readonly "mistral-medium-latest": {
382
- readonly kind: "flat";
383
- readonly inputPerMTok: 150000;
384
- readonly outputPerMTok: 750000;
385
- readonly cachedInputPerMTok: 15000;
386
- };
387
- readonly "mistral-small-latest": {
388
- readonly kind: "flat";
389
- readonly inputPerMTok: 15000;
390
- readonly outputPerMTok: 60000;
391
- readonly cachedInputPerMTok: 1500;
392
- };
393
- readonly "gemini-2.5-flash": {
394
- readonly kind: "flat";
395
- readonly inputPerMTok: 30000;
396
- readonly outputPerMTok: 250000;
397
- readonly cachedInputPerMTok: 3000;
398
- };
399
- readonly "gemini-2.5-pro": {
400
- readonly kind: "input-token-tiered";
401
- readonly inputTokenThreshold: 200000;
402
- readonly standard: {
403
- readonly inputPerMTok: 125000;
404
- readonly outputPerMTok: 1000000;
405
- readonly cachedInputPerMTok: 12500;
406
- };
407
- readonly aboveThreshold: {
408
- readonly inputPerMTok: 250000;
409
- readonly outputPerMTok: 1500000;
410
- readonly cachedInputPerMTok: 25000;
411
- };
412
- };
413
- readonly "gpt-4o-mini": {
414
- readonly kind: "flat";
415
- readonly inputPerMTok: 15000;
416
- readonly outputPerMTok: 60000;
417
- readonly cachedInputPerMTok: 7500;
418
- };
419
- readonly "gpt-4o": {
420
- readonly kind: "flat";
421
- readonly inputPerMTok: 250000;
422
- readonly outputPerMTok: 1000000;
423
- readonly cachedInputPerMTok: 125000;
424
- };
425
- readonly "us.deepseek.r1-v1:0": {
426
- readonly kind: "flat";
427
- readonly inputPerMTok: 135000;
428
- readonly outputPerMTok: 540000;
429
- };
430
- };
431
- //#endregion
432
- //#region src/model-rate-policy.d.ts
433
- export declare const MODELS_DEV_RATE_PROVIDER_BY_CATALOG_PROVIDER: {
434
- readonly google: "google";
435
- readonly openai: "openai";
436
- readonly anthropic: "anthropic";
437
- readonly bedrock: "amazon-bedrock";
438
- readonly mistral: "mistral";
439
- };
440
- type ModelsDevRateProvider = (typeof MODELS_DEV_RATE_PROVIDER_BY_CATALOG_PROVIDER)[keyof typeof MODELS_DEV_RATE_PROVIDER_BY_CATALOG_PROVIDER];
441
- /**
442
- * Explicit source coordinates for non-offered model IDs that remain valid in
443
- * deployment overrides and usage attribution. Their numeric rates still come
444
- * exclusively from models.dev.
445
- */
446
- export declare const RETAINED_MODELS_DEV_RATE_ENTRIES: {
447
- readonly "gemini-2.5-flash": {
448
- readonly modelId: "gemini-2.5-flash";
449
- readonly provider: "google";
450
- };
451
- readonly "gemini-2.5-pro": {
452
- readonly modelId: "gemini-2.5-pro";
453
- readonly provider: "google";
454
- };
455
- readonly "gpt-4o-mini": {
456
- readonly modelId: "gpt-4o-mini";
457
- readonly provider: "openai";
458
- };
459
- readonly "gpt-4o": {
460
- readonly modelId: "gpt-4o";
461
- readonly provider: "openai";
462
- };
463
- readonly "us.deepseek.r1-v1:0": {
464
- readonly modelId: "us.deepseek.r1-v1:0";
465
- readonly provider: "amazon-bedrock";
466
- };
467
- };
468
- /**
469
- * Exact mappings where Stella uses a provider routing ID while models.dev
470
- * publishes pricing under the corresponding base model ID. Generation rejects
471
- * a mapping once models.dev begins publishing the Stella ID directly, so the
472
- * map is empty whenever upstream covers every offered ID.
473
- */
474
- export declare const MODELS_DEV_RATE_SOURCE_ALIASES: {};
475
- //#endregion
476
- //#region src/capabilities-overrides.d.ts
477
- /**
478
- * Hand-declared capabilities for offered models that models.dev does
479
- * not cover. The capability generator
480
- * (`packages/scripts/src/model-catalog-capabilities-gen.ts`) refuses
481
- * an override for any model the upstream source covers, so manual
482
- * data cannot shadow sourced data — this file can only ever fill
483
- * genuine gaps, each with a dated justification.
484
- */
485
- type CapabilityOverride = {
486
- documentInput: boolean;
487
- documentInputReason: string;
488
- reasoningEfforts: readonly ReasoningEffort[] | null;
489
- /** The most output tokens one response may carry, from the provider docs. */
490
- outputTokens: number;
491
- temperatureSupported: boolean;
492
- /**
493
- * Every role sends tool definitions or structured output, so an
494
- * offered model must accept tools.
495
- */
496
- toolCalling: true;
497
- /** Why the upstream source cannot answer for this model. Dated. */
498
- reason: string;
499
- };
500
- export declare const CAPABILITY_OVERRIDES: Partial<Record<OfferedBYOKModelId, CapabilityOverride>>;
501
- //#endregion
502
- //#region src/document-input-overrides.d.ts
503
- type DocumentInputOverride = {
504
- /** Whether the model accepts a PDF/file content part. */
505
- supported: boolean;
506
- /** Why the live catalogue cannot answer correctly. Dated. */
507
- reason: string;
508
- };
509
- /**
510
- * Reviewed document-input corrections for models.dev records that exist but
511
- * under-report the provider API's file-input support. The generator rejects an
512
- * override once upstream agrees, so sourced data takes ownership automatically.
513
- */
514
- export declare const DOCUMENT_INPUT_OVERRIDES: Partial<Record<OfferedBYOKModelId, DocumentInputOverride>>;
515
- //#endregion
516
- //#region src/capabilities.gen.d.ts
517
- /**
518
- * Reasoning-effort values each offered model accepts, `null` when the
519
- * model exposes no effort-style reasoning control. A missing `"none"`
520
- * means the model's reasoning cannot be disabled; consumers must go
521
- * through `resolveReasoningEffort`.
522
- */
523
- export declare const MODEL_REASONING_EFFORTS: {
524
- readonly "gemini-3.8-flash": readonly ["low", "medium", "high"];
525
- readonly "gemini-3.7-flash": readonly ["low", "medium", "high"];
526
- readonly "gemini-3.6-flash": readonly ["minimal", "low", "medium", "high"];
527
- readonly "gemini-3.5-flash-lite": readonly ["minimal", "low", "medium", "high"];
528
- readonly "gemini-3.1-pro-preview": readonly ["low", "medium", "high"];
529
- readonly "gemini-3.5-flash": readonly ["minimal", "low", "medium", "high"];
530
- readonly "gemini-3.1-flash-lite": readonly ["minimal", "low", "medium", "high"];
531
- readonly "openai/gpt-6.1-sol": readonly ["low", "medium", "high", "xhigh", "max"];
532
- readonly "openai/gpt-6-astra": readonly ["low", "medium", "high", "xhigh", "max"];
533
- readonly "openai/gpt-6-sol": readonly ["none", "low", "medium", "high", "xhigh", "max"];
534
- readonly "openai/gpt-6-luna": readonly ["none", "low", "medium", "high", "xhigh", "max"];
535
- readonly "openai/gpt-5.6-sol": readonly ["none", "low", "medium", "high", "xhigh", "max"];
536
- readonly "openai/gpt-5.6-terra": readonly ["none", "low", "medium", "high", "xhigh", "max"];
537
- readonly "openai/gpt-5.6-luna": readonly ["none", "low", "medium", "high", "xhigh", "max"];
538
- readonly "google/gemini-3.8-flash": readonly ["low", "medium", "high"];
539
- readonly "google/gemini-3.7-flash": readonly ["low", "medium", "high"];
540
- readonly "google/gemini-3.6-flash": readonly ["minimal", "low", "medium", "high"];
541
- readonly "google/gemini-3.5-flash-lite": readonly ["minimal", "low", "medium", "high"];
542
- readonly "google/gemini-3.1-pro-preview": readonly ["low", "medium", "high"];
543
- readonly "google/gemini-3.5-flash": readonly ["minimal", "low", "medium", "high"];
544
- readonly "google/gemini-3.1-flash-lite": readonly ["none", "minimal", "low", "medium", "high"];
545
- readonly "anthropic/claude-sonnet-5.5": readonly ["low", "medium", "high", "xhigh", "max"];
546
- readonly "anthropic/claude-sonnet-5": readonly ["none", "low", "medium", "high", "xhigh", "max"];
547
- readonly "anthropic/claude-opus-5": readonly ["none", "low", "medium", "high", "xhigh", "max"];
548
- readonly "anthropic/claude-opus-4.8": readonly ["none", "low", "medium", "high", "xhigh", "max"];
549
- readonly "anthropic/claude-sonnet-4.6": readonly ["none", "low", "medium", "high", "max"];
550
- readonly "openai/gpt-5.5": readonly ["none", "low", "medium", "high", "xhigh"];
551
- readonly "openai/gpt-5.4-mini": readonly ["none", "low", "medium", "high", "xhigh"];
552
- readonly "gpt-6.1-sol": readonly ["low", "medium", "high", "xhigh", "max"];
553
- readonly "gpt-6-astra": readonly ["low", "medium", "high", "xhigh", "max"];
554
- readonly "gpt-6-sol": readonly ["none", "low", "medium", "high", "xhigh", "max"];
555
- readonly "gpt-6-luna": readonly ["none", "low", "medium", "high", "xhigh", "max"];
556
- readonly "gpt-5.6": readonly ["none", "low", "medium", "high", "xhigh", "max"];
557
- readonly "gpt-5.6-terra": readonly ["none", "low", "medium", "high", "xhigh", "max"];
558
- readonly "gpt-5.6-luna": readonly ["none", "low", "medium", "high", "xhigh", "max"];
559
- readonly "gpt-5.5": readonly ["none", "low", "medium", "high", "xhigh"];
560
- readonly "gpt-5.4": readonly ["none", "low", "medium", "high", "xhigh"];
561
- readonly "gpt-5.4-mini": readonly ["none", "low", "medium", "high", "xhigh"];
562
- readonly "gpt-5.4-nano": readonly ["none", "low", "medium", "high", "xhigh"];
563
- readonly "gpt-5.2": readonly ["none", "low", "medium", "high", "xhigh"];
564
- readonly "claude-sonnet-5-5": readonly ["low", "medium", "high", "xhigh", "max"];
565
- readonly "claude-sonnet-5": readonly ["none", "low", "medium", "high", "xhigh", "max"];
566
- readonly "claude-fable-5-1": readonly ["low", "medium", "high", "xhigh", "max"];
567
- readonly "claude-fable-5": readonly ["low", "medium", "high", "xhigh", "max"];
568
- readonly "claude-opus-5-5": readonly ["low", "medium", "high", "xhigh", "max"];
569
- readonly "claude-opus-5": readonly ["low", "medium", "high", "xhigh", "max"];
570
- readonly "claude-opus-4-8": readonly ["low", "medium", "high", "xhigh", "max"];
571
- readonly "claude-opus-4-7": readonly ["low", "medium", "high", "xhigh", "max"];
572
- readonly "claude-sonnet-4-6": readonly ["low", "medium", "high", "max"];
573
- readonly "claude-opus-4-6": readonly ["low", "medium", "high", "max"];
574
- readonly "claude-haiku-4-5-20251001": null;
575
- readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": null;
576
- readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": null;
577
- readonly "us.amazon.nova-pro-v1:0": null;
578
- readonly "us.amazon.nova-lite-v1:0": null;
579
- readonly "us.amazon.nova-micro-v1:0": null;
580
- readonly "openai.gpt-oss-120b-1:0": readonly ["low", "medium", "high"];
581
- readonly "openai.gpt-oss-20b-1:0": readonly ["low", "medium", "high"];
582
- readonly "mistral-large-latest": null;
583
- readonly "mistral-medium-latest": readonly ["none", "high"];
584
- readonly "mistral-small-latest": readonly ["none", "high"];
585
- };
586
- /**
587
- * Concrete provider-default effort where the upstream catalogue publishes
588
- * one. OpenRouter is the source today; null means the provider does not expose
589
- * a truthful named default, so clients must retain a separate Default choice.
590
- */
591
- export declare const MODEL_DEFAULT_REASONING_EFFORTS: {
592
- readonly "gemini-3.8-flash": null;
593
- readonly "gemini-3.7-flash": null;
594
- readonly "gemini-3.6-flash": null;
595
- readonly "gemini-3.5-flash-lite": null;
596
- readonly "gemini-3.1-pro-preview": null;
597
- readonly "gemini-3.5-flash": null;
598
- readonly "gemini-3.1-flash-lite": null;
599
- readonly "openai/gpt-6.1-sol": "medium";
600
- readonly "openai/gpt-6-astra": "medium";
601
- readonly "openai/gpt-6-sol": "medium";
602
- readonly "openai/gpt-6-luna": "medium";
603
- readonly "openai/gpt-5.6-sol": "medium";
604
- readonly "openai/gpt-5.6-terra": "medium";
605
- readonly "openai/gpt-5.6-luna": "medium";
606
- readonly "google/gemini-3.8-flash": "medium";
607
- readonly "google/gemini-3.7-flash": "medium";
608
- readonly "google/gemini-3.6-flash": "medium";
609
- readonly "google/gemini-3.5-flash-lite": "minimal";
610
- readonly "google/gemini-3.1-pro-preview": "medium";
611
- readonly "google/gemini-3.5-flash": "medium";
612
- readonly "google/gemini-3.1-flash-lite": "minimal";
613
- readonly "anthropic/claude-sonnet-5.5": "high";
614
- readonly "anthropic/claude-sonnet-5": "high";
615
- readonly "anthropic/claude-opus-5": "high";
616
- readonly "anthropic/claude-opus-4.8": "high";
617
- readonly "anthropic/claude-sonnet-4.6": "medium";
618
- readonly "openai/gpt-5.5": "medium";
619
- readonly "openai/gpt-5.4-mini": "medium";
620
- readonly "gpt-6.1-sol": null;
621
- readonly "gpt-6-astra": null;
622
- readonly "gpt-6-sol": null;
623
- readonly "gpt-6-luna": null;
624
- readonly "gpt-5.6": null;
625
- readonly "gpt-5.6-terra": null;
626
- readonly "gpt-5.6-luna": null;
627
- readonly "gpt-5.5": null;
628
- readonly "gpt-5.4": null;
629
- readonly "gpt-5.4-mini": null;
630
- readonly "gpt-5.4-nano": null;
631
- readonly "gpt-5.2": null;
632
- readonly "claude-sonnet-5-5": null;
633
- readonly "claude-sonnet-5": null;
634
- readonly "claude-fable-5-1": null;
635
- readonly "claude-fable-5": null;
636
- readonly "claude-opus-5-5": null;
637
- readonly "claude-opus-5": null;
638
- readonly "claude-opus-4-8": null;
639
- readonly "claude-opus-4-7": null;
640
- readonly "claude-sonnet-4-6": null;
641
- readonly "claude-opus-4-6": null;
642
- readonly "claude-haiku-4-5-20251001": null;
643
- readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": null;
644
- readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": null;
645
- readonly "us.amazon.nova-pro-v1:0": null;
646
- readonly "us.amazon.nova-lite-v1:0": null;
647
- readonly "us.amazon.nova-micro-v1:0": null;
648
- readonly "openai.gpt-oss-120b-1:0": null;
649
- readonly "openai.gpt-oss-20b-1:0": null;
650
- readonly "mistral-large-latest": null;
651
- readonly "mistral-medium-latest": null;
652
- readonly "mistral-small-latest": null;
653
- };
654
- /**
655
- * Whether stella should emit a `temperature` sampling override.
656
- * `"omit"` covers rejected, deprecated, and accepted-but-ignored
657
- * parameters. Consumers must go through `shouldEmitTemperature`.
658
- */
659
- export declare const MODEL_TEMPERATURE_POLICIES: {
660
- readonly "gemini-3.8-flash": "omit";
661
- readonly "gemini-3.7-flash": "omit";
662
- readonly "gemini-3.6-flash": "omit";
663
- readonly "gemini-3.5-flash-lite": "omit";
664
- readonly "gemini-3.1-pro-preview": "emit";
665
- readonly "gemini-3.5-flash": "emit";
666
- readonly "gemini-3.1-flash-lite": "emit";
667
- readonly "openai/gpt-6.1-sol": "omit";
668
- readonly "openai/gpt-6-astra": "omit";
669
- readonly "openai/gpt-6-sol": "omit";
670
- readonly "openai/gpt-6-luna": "omit";
671
- readonly "openai/gpt-5.6-sol": "omit";
672
- readonly "openai/gpt-5.6-terra": "omit";
673
- readonly "openai/gpt-5.6-luna": "omit";
674
- readonly "google/gemini-3.8-flash": "omit";
675
- readonly "google/gemini-3.7-flash": "omit";
676
- readonly "google/gemini-3.6-flash": "omit";
677
- readonly "google/gemini-3.5-flash-lite": "omit";
678
- readonly "google/gemini-3.1-pro-preview": "emit";
679
- readonly "google/gemini-3.5-flash": "emit";
680
- readonly "google/gemini-3.1-flash-lite": "emit";
681
- readonly "anthropic/claude-sonnet-5.5": "emit";
682
- readonly "anthropic/claude-sonnet-5": "omit";
683
- readonly "anthropic/claude-opus-5": "emit";
684
- readonly "anthropic/claude-opus-4.8": "emit";
685
- readonly "anthropic/claude-sonnet-4.6": "emit";
686
- readonly "openai/gpt-5.5": "omit";
687
- readonly "openai/gpt-5.4-mini": "omit";
688
- readonly "gpt-6.1-sol": "omit";
689
- readonly "gpt-6-astra": "omit";
690
- readonly "gpt-6-sol": "omit";
691
- readonly "gpt-6-luna": "omit";
692
- readonly "gpt-5.6": "omit";
693
- readonly "gpt-5.6-terra": "omit";
694
- readonly "gpt-5.6-luna": "omit";
695
- readonly "gpt-5.5": "omit";
696
- readonly "gpt-5.4": "emit";
697
- readonly "gpt-5.4-mini": "emit";
698
- readonly "gpt-5.4-nano": "emit";
699
- readonly "gpt-5.2": "emit";
700
- readonly "claude-sonnet-5-5": "omit";
701
- readonly "claude-sonnet-5": "omit";
702
- readonly "claude-fable-5-1": "omit";
703
- readonly "claude-fable-5": "omit";
704
- readonly "claude-opus-5-5": "omit";
705
- readonly "claude-opus-5": "omit";
706
- readonly "claude-opus-4-8": "omit";
707
- readonly "claude-opus-4-7": "omit";
708
- readonly "claude-sonnet-4-6": "emit";
709
- readonly "claude-opus-4-6": "emit";
710
- readonly "claude-haiku-4-5-20251001": "emit";
711
- readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": "emit";
712
- readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": "emit";
713
- readonly "us.amazon.nova-pro-v1:0": "emit";
714
- readonly "us.amazon.nova-lite-v1:0": "emit";
715
- readonly "us.amazon.nova-micro-v1:0": "emit";
716
- readonly "openai.gpt-oss-120b-1:0": "emit";
717
- readonly "openai.gpt-oss-20b-1:0": "emit";
718
- readonly "mistral-large-latest": "emit";
719
- readonly "mistral-medium-latest": "emit";
720
- readonly "mistral-small-latest": "emit";
721
- };
722
- /**
723
- * The most output tokens one response of each offered model may carry
724
- * (models.dev `limit.output`). Consumers must go through
725
- * `getOutputTokenLimit`.
726
- */
727
- export declare const MODEL_OUTPUT_TOKEN_LIMITS: {
728
- readonly "gemini-3.8-flash": 65536;
729
- readonly "gemini-3.7-flash": 65536;
730
- readonly "gemini-3.6-flash": 65536;
731
- readonly "gemini-3.5-flash-lite": 65536;
732
- readonly "gemini-3.1-pro-preview": 65536;
733
- readonly "gemini-3.5-flash": 65536;
734
- readonly "gemini-3.1-flash-lite": 65536;
735
- readonly "openai/gpt-6.1-sol": 128000;
736
- readonly "openai/gpt-6-astra": 128000;
737
- readonly "openai/gpt-6-sol": 128000;
738
- readonly "openai/gpt-6-luna": 128000;
739
- readonly "openai/gpt-5.6-sol": 128000;
740
- readonly "openai/gpt-5.6-terra": 128000;
741
- readonly "openai/gpt-5.6-luna": 128000;
742
- readonly "google/gemini-3.8-flash": 65536;
743
- readonly "google/gemini-3.7-flash": 65536;
744
- readonly "google/gemini-3.6-flash": 65536;
745
- readonly "google/gemini-3.5-flash-lite": 65536;
746
- readonly "google/gemini-3.1-pro-preview": 65536;
747
- readonly "google/gemini-3.5-flash": 65536;
748
- readonly "google/gemini-3.1-flash-lite": 65536;
749
- readonly "anthropic/claude-sonnet-5.5": 128000;
750
- readonly "anthropic/claude-sonnet-5": 128000;
751
- readonly "anthropic/claude-opus-5": 128000;
752
- readonly "anthropic/claude-opus-4.8": 128000;
753
- readonly "anthropic/claude-sonnet-4.6": 128000;
754
- readonly "openai/gpt-5.5": 128000;
755
- readonly "openai/gpt-5.4-mini": 128000;
756
- readonly "gpt-6.1-sol": 128000;
757
- readonly "gpt-6-astra": 128000;
758
- readonly "gpt-6-sol": 128000;
759
- readonly "gpt-6-luna": 128000;
760
- readonly "gpt-5.6": 128000;
761
- readonly "gpt-5.6-terra": 128000;
762
- readonly "gpt-5.6-luna": 128000;
763
- readonly "gpt-5.5": 128000;
764
- readonly "gpt-5.4": 128000;
765
- readonly "gpt-5.4-mini": 128000;
766
- readonly "gpt-5.4-nano": 128000;
767
- readonly "gpt-5.2": 128000;
768
- readonly "claude-sonnet-5-5": 128000;
769
- readonly "claude-sonnet-5": 128000;
770
- readonly "claude-fable-5-1": 128000;
771
- readonly "claude-fable-5": 128000;
772
- readonly "claude-opus-5-5": 128000;
773
- readonly "claude-opus-5": 128000;
774
- readonly "claude-opus-4-8": 128000;
775
- readonly "claude-opus-4-7": 128000;
776
- readonly "claude-sonnet-4-6": 128000;
777
- readonly "claude-opus-4-6": 128000;
778
- readonly "claude-haiku-4-5-20251001": 64000;
779
- readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": 64000;
780
- readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": 64000;
781
- readonly "us.amazon.nova-pro-v1:0": 10000;
782
- readonly "us.amazon.nova-lite-v1:0": 10000;
783
- readonly "us.amazon.nova-micro-v1:0": 10000;
784
- readonly "openai.gpt-oss-120b-1:0": 128000;
785
- readonly "openai.gpt-oss-20b-1:0": 128000;
786
- readonly "mistral-large-latest": 262144;
787
- readonly "mistral-medium-latest": 262144;
788
- readonly "mistral-small-latest": 256000;
789
- };
790
- //#endregion
791
- //#region src/index.d.ts
792
- /**
793
- * Logical model roles. Call sites declare *what* they need, not
794
- * *which* model to use.
795
- *
796
- * - fast: classification, extraction, short generation
797
- * - chat: conversational with tool use and streaming
798
- * - reasoning: complex multi-step legal analysis
799
- * - pdf: native PDF/image understanding
800
- */
801
- export declare const MODEL_ROLES: readonly ["fast", "chat", "reasoning", "pdf"];
802
- export type ModelRole = (typeof MODEL_ROLES)[number];
803
- export declare const TEMPERATURE_POLICIES: readonly ["emit", "omit"];
804
- export type TemperaturePolicy = (typeof TEMPERATURE_POLICIES)[number];
805
- export declare const STREAMING_TOOL_USE_SUPPORTS: readonly ["supported", "unsupported"];
806
- export type StreamingToolUseSupport = (typeof STREAMING_TOOL_USE_SUPPORTS)[number];
807
- export declare const AI_PROVIDERS: readonly ["google", "openrouter", "openai", "azure_foundry", "anthropic", "bedrock", "mistral", "openai_compatible", "huggingface"];
808
- export type AIProvider = (typeof AI_PROVIDERS)[number];
809
- declare const AI_PROVIDER_ADAPTER_KIND: {
810
- readonly google: "tanstack";
811
- readonly openrouter: "tanstack";
812
- readonly openai: "tanstack";
813
- readonly azure_foundry: "custom";
814
- readonly anthropic: "tanstack";
815
- readonly bedrock: "tanstack";
816
- readonly mistral: "tanstack";
817
- readonly openai_compatible: "custom";
818
- readonly huggingface: "custom";
819
- };
820
- export type TanStackAIProvider = { [TProvider in AIProvider]: (typeof AI_PROVIDER_ADAPTER_KIND)[TProvider] extends "tanstack" ? TProvider : never; }[AIProvider];
821
- export declare const TANSTACK_AI_PROVIDERS: readonly ["google", "openrouter", "openai", "anthropic", "bedrock", "mistral"];
822
- export declare const MODEL_CATALOG_PROVIDER_KIND: {
823
- readonly google: "first-party";
824
- readonly openrouter: "aggregator";
825
- readonly openai: "first-party";
826
- readonly anthropic: "first-party";
827
- readonly bedrock: "platform";
828
- readonly mistral: "first-party";
829
- };
830
- /** Providers whose picker IDs map directly to public first-party catalogs. */
831
- export type FirstPartyModelProvider = { [TProvider in TanStackAIProvider]: (typeof MODEL_CATALOG_PROVIDER_KIND)[TProvider] extends "first-party" ? TProvider : never; }[TanStackAIProvider];
832
- declare const FIRST_PARTY_MODEL_PROVIDER_VALUES: readonly ["google", "openai", "anthropic", "mistral"];
833
- /**
834
- * Runtime form of the first-party provider union. The conditional annotation
835
- * makes adding a first-party policy without adding its discovery implementation
836
- * a compile error.
837
- */
838
- export declare const FIRST_PARTY_MODEL_PROVIDERS: Exclude<FirstPartyModelProvider, (typeof FIRST_PARTY_MODEL_PROVIDER_VALUES)[number]> extends never ? typeof FIRST_PARTY_MODEL_PROVIDER_VALUES : never;
839
- /**
840
- * Per-role default model IDs for the BYOK-capable cloud providers.
841
- * Shared between the instance default table (`DEFAULT_MODELS`) and the
842
- * settings-UI default selection, so a default is defined exactly once.
843
- */
844
- export declare const BYOK_DEFAULT_MODELS: {
845
- readonly google: {
846
- readonly fast: "gemini-3.8-flash";
847
- readonly chat: "gemini-3.8-flash";
848
- readonly reasoning: "gemini-3.8-flash";
849
- readonly pdf: "gemini-3.8-flash";
850
- };
851
- readonly openrouter: {
852
- readonly fast: "openai/gpt-6-luna";
853
- readonly chat: "openai/gpt-6-sol";
854
- readonly reasoning: "openai/gpt-6-sol";
855
- readonly pdf: "openai/gpt-6-sol";
856
- };
857
- readonly openai: {
858
- readonly fast: "gpt-6-luna";
859
- readonly chat: "gpt-6-sol";
860
- readonly reasoning: "gpt-6-sol";
861
- readonly pdf: "gpt-6-sol";
862
- };
863
- readonly anthropic: {
864
- readonly fast: "claude-opus-5-5";
865
- readonly chat: "claude-opus-5-5";
866
- readonly reasoning: "claude-opus-5-5";
867
- readonly pdf: "claude-opus-5-5";
868
- };
869
- readonly bedrock: {
870
- readonly fast: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
871
- readonly chat: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
872
- readonly reasoning: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
873
- readonly pdf: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
874
- };
875
- readonly mistral: {
876
- readonly fast: "mistral-small-latest";
877
- readonly chat: "mistral-medium-latest";
878
- readonly reasoning: "mistral-medium-latest";
879
- readonly pdf: "mistral-large-latest";
880
- };
881
- };
882
- /**
883
- * Instance-level default model IDs per provider. Extends the BYOK
884
- * defaults with the providers that only the instance path uses
885
- * (custom deployments and OpenAI-compatible endpoints).
886
- */
887
- export declare const DEFAULT_MODELS: {
888
- readonly azure_foundry: {
889
- readonly fast: "gpt-5.6-luna";
890
- readonly chat: "gpt-5.6-terra";
891
- readonly reasoning: "gpt-5.6-terra";
892
- readonly pdf: "gpt-5.6-terra";
893
- };
894
- readonly openai_compatible: {
895
- readonly fast: "default";
896
- readonly chat: "default";
897
- readonly reasoning: "default";
898
- readonly pdf: "default";
899
- };
900
- readonly huggingface: {
901
- readonly fast: "speakleash/Bielik-1.5B-v3.0-Instruct";
902
- readonly chat: "speakleash/Bielik-11B-v2.3-Instruct";
903
- readonly reasoning: "speakleash/Bielik-11B-v2.3-Instruct";
904
- readonly pdf: "speakleash/Bielik-11B-v2.3-Instruct";
905
- };
906
- readonly google: {
907
- readonly fast: "gemini-3.8-flash";
908
- readonly chat: "gemini-3.8-flash";
909
- readonly reasoning: "gemini-3.8-flash";
910
- readonly pdf: "gemini-3.8-flash";
911
- };
912
- readonly openrouter: {
913
- readonly fast: "openai/gpt-6-luna";
914
- readonly chat: "openai/gpt-6-sol";
915
- readonly reasoning: "openai/gpt-6-sol";
916
- readonly pdf: "openai/gpt-6-sol";
917
- };
918
- readonly openai: {
919
- readonly fast: "gpt-6-luna";
920
- readonly chat: "gpt-6-sol";
921
- readonly reasoning: "gpt-6-sol";
922
- readonly pdf: "gpt-6-sol";
923
- };
924
- readonly anthropic: {
925
- readonly fast: "claude-opus-5-5";
926
- readonly chat: "claude-opus-5-5";
927
- readonly reasoning: "claude-opus-5-5";
928
- readonly pdf: "claude-opus-5-5";
929
- };
930
- readonly bedrock: {
931
- readonly fast: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
932
- readonly chat: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
933
- readonly reasoning: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
934
- readonly pdf: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
935
- };
936
- readonly mistral: {
937
- readonly fast: "mistral-small-latest";
938
- readonly chat: "mistral-medium-latest";
939
- readonly reasoning: "mistral-medium-latest";
940
- readonly pdf: "mistral-large-latest";
941
- };
942
- };
943
- /**
944
- * BYOK-offered model IDs per provider — the curated catalog users pick
945
- * from in org settings, and the server-side allowlist the API enforces.
946
- * The frontend list is not a security boundary; this is what the API
947
- * accepts.
948
- *
949
- * Limited to providers the TanStack AI integration supports for BYOK.
950
- * Providers without a first-class TanStack adapter path are intentionally
951
- * not accepted at this boundary.
952
- */
953
- export declare const BYOK_MODEL_OPTIONS: {
954
- readonly google: readonly ["gemini-3.8-flash", "gemini-3.7-flash", "gemini-3.6-flash", "gemini-3.5-flash-lite", "gemini-3.1-pro-preview", "gemini-3.5-flash", "gemini-3.1-flash-lite"];
955
- readonly anthropic: readonly ["claude-sonnet-5-5", "claude-sonnet-5", "claude-fable-5-1", "claude-fable-5", "claude-opus-5-5", "claude-opus-5", "claude-opus-4-8", "claude-opus-4-7", "claude-sonnet-4-6", "claude-opus-4-6", "claude-haiku-4-5-20251001"];
956
- readonly openai: readonly [...("gpt-6-astra" | "gpt-6-sol" | "gpt-6-luna" | "gpt-5.6" | "gpt-5.6-terra" | "gpt-5.6-luna" | "gpt-6.1-sol")[], "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.2"];
957
- readonly openrouter: readonly [...("openai/gpt-6-astra" | "openai/gpt-6-sol" | "openai/gpt-6-luna" | "openai/gpt-5.6-sol" | "openai/gpt-5.6-terra" | "openai/gpt-5.6-luna" | "openai/gpt-6.1-sol")[], "google/gemini-3.8-flash", "google/gemini-3.7-flash", "google/gemini-3.6-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.1-pro-preview", "google/gemini-3.5-flash", "google/gemini-3.1-flash-lite", "anthropic/claude-sonnet-5.5", "anthropic/claude-sonnet-5", "anthropic/claude-opus-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6", "openai/gpt-5.5", "openai/gpt-5.4-mini"];
958
- readonly bedrock: readonly ["us.anthropic.claude-sonnet-4-5-20250929-v1:0", "us.anthropic.claude-haiku-4-5-20251001-v1:0", "us.amazon.nova-pro-v1:0", "us.amazon.nova-lite-v1:0", "us.amazon.nova-micro-v1:0", "openai.gpt-oss-120b-1:0", "openai.gpt-oss-20b-1:0"];
959
- readonly mistral: readonly ["mistral-large-latest", "mistral-medium-latest", "mistral-small-latest"];
960
- };
961
- export type BYOKProvider = keyof typeof BYOK_MODEL_OPTIONS;
962
- export type BYOKModelIdByProvider = { [TProvider in BYOKProvider]: (typeof BYOK_MODEL_OPTIONS)[TProvider][number]; };
963
- export type OfferedBYOKModelId = BYOKModelIdByProvider[BYOKProvider];
964
- export type ModelDisplayMetadata = {
965
- /** Human-readable product name; model names are trademarks and stay untranslated. */
966
- displayName: string;
967
- /** Brand mark to show. This may differ from the routing provider. */
968
- iconProvider: BYOKProvider;
969
- };
970
- /**
971
- * Presentation metadata for every offered model. Keeping this exhaustive beside
972
- * the allowlist prevents a newly offered model from leaking a raw provider ID
973
- * into user-facing pickers. OpenRouter entries deliberately carry their model
974
- * creator's icon while their routing provider remains available separately.
975
- */
976
- export declare const MODEL_DISPLAY_METADATA: {
977
- readonly "gemini-3.8-flash": {
978
- readonly displayName: "Gemini 3.8 Flash";
979
- readonly iconProvider: "google";
980
- };
981
- readonly "gemini-3.7-flash": {
982
- readonly displayName: "Gemini 3.7 Flash";
983
- readonly iconProvider: "google";
984
- };
985
- readonly "gemini-3.6-flash": {
986
- readonly displayName: "Gemini 3.6 Flash";
987
- readonly iconProvider: "google";
988
- };
989
- readonly "gemini-3.5-flash-lite": {
990
- readonly displayName: "Gemini 3.5 Flash Lite";
991
- readonly iconProvider: "google";
992
- };
993
- readonly "gemini-3.1-pro-preview": {
994
- readonly displayName: "Gemini 3.1 Pro Preview";
995
- readonly iconProvider: "google";
996
- };
997
- readonly "gemini-3.5-flash": {
998
- readonly displayName: "Gemini 3.5 Flash";
999
- readonly iconProvider: "google";
1000
- };
1001
- readonly "gemini-3.1-flash-lite": {
1002
- readonly displayName: "Gemini 3.1 Flash Lite";
1003
- readonly iconProvider: "google";
1004
- };
1005
- readonly "claude-sonnet-5-5": {
1006
- readonly displayName: "Claude Sonnet 5.5";
1007
- readonly iconProvider: "anthropic";
1008
- };
1009
- readonly "claude-sonnet-5": {
1010
- readonly displayName: "Claude Sonnet 5";
1011
- readonly iconProvider: "anthropic";
1012
- };
1013
- readonly "claude-fable-5-1": {
1014
- readonly displayName: "Claude Fable 5.1";
1015
- readonly iconProvider: "anthropic";
1016
- };
1017
- readonly "claude-fable-5": {
1018
- readonly displayName: "Claude Fable 5";
1019
- readonly iconProvider: "anthropic";
1020
- };
1021
- readonly "claude-opus-5-5": {
1022
- readonly displayName: "Claude Opus 5.5";
1023
- readonly iconProvider: "anthropic";
1024
- };
1025
- readonly "claude-opus-5": {
1026
- readonly displayName: "Claude Opus 5";
1027
- readonly iconProvider: "anthropic";
1028
- };
1029
- readonly "claude-opus-4-8": {
1030
- readonly displayName: "Claude Opus 4.8";
1031
- readonly iconProvider: "anthropic";
1032
- };
1033
- readonly "claude-opus-4-7": {
1034
- readonly displayName: "Claude Opus 4.7";
1035
- readonly iconProvider: "anthropic";
1036
- };
1037
- readonly "claude-sonnet-4-6": {
1038
- readonly displayName: "Claude Sonnet 4.6";
1039
- readonly iconProvider: "anthropic";
1040
- };
1041
- readonly "claude-opus-4-6": {
1042
- readonly displayName: "Claude Opus 4.6";
1043
- readonly iconProvider: "anthropic";
1044
- };
1045
- readonly "claude-haiku-4-5-20251001": {
1046
- readonly displayName: "Claude Haiku 4.5";
1047
- readonly iconProvider: "anthropic";
1048
- };
1049
- readonly "gpt-6.1-sol": {
1050
- readonly displayName: "GPT-6.1 Sol";
1051
- readonly iconProvider: "openai";
1052
- };
1053
- readonly "gpt-6-astra": {
1054
- readonly displayName: "GPT-6 Astra";
1055
- readonly iconProvider: "openai";
1056
- };
1057
- readonly "gpt-6-sol": {
1058
- readonly displayName: "GPT-6 Sol";
1059
- readonly iconProvider: "openai";
1060
- };
1061
- readonly "gpt-6-luna": {
1062
- readonly displayName: "GPT-6 Luna";
1063
- readonly iconProvider: "openai";
1064
- };
1065
- readonly "gpt-5.6": {
1066
- readonly displayName: "GPT-5.6 Sol";
1067
- readonly iconProvider: "openai";
1068
- };
1069
- readonly "gpt-5.6-terra": {
1070
- readonly displayName: "GPT-5.6 Terra";
1071
- readonly iconProvider: "openai";
1072
- };
1073
- readonly "gpt-5.6-luna": {
1074
- readonly displayName: "GPT-5.6 Luna";
1075
- readonly iconProvider: "openai";
1076
- };
1077
- readonly "gpt-5.5": {
1078
- readonly displayName: "GPT-5.5";
1079
- readonly iconProvider: "openai";
1080
- };
1081
- readonly "gpt-5.4": {
1082
- readonly displayName: "GPT-5.4";
1083
- readonly iconProvider: "openai";
1084
- };
1085
- readonly "gpt-5.4-mini": {
1086
- readonly displayName: "GPT-5.4 Mini";
1087
- readonly iconProvider: "openai";
1088
- };
1089
- readonly "gpt-5.4-nano": {
1090
- readonly displayName: "GPT-5.4 Nano";
1091
- readonly iconProvider: "openai";
1092
- };
1093
- readonly "gpt-5.2": {
1094
- readonly displayName: "GPT-5.2";
1095
- readonly iconProvider: "openai";
1096
- };
1097
- readonly "openai/gpt-6.1-sol": {
1098
- readonly displayName: "GPT-6.1 Sol";
1099
- readonly iconProvider: "openai";
1100
- };
1101
- readonly "openai/gpt-6-astra": {
1102
- readonly displayName: "GPT-6 Astra";
1103
- readonly iconProvider: "openai";
1104
- };
1105
- readonly "openai/gpt-6-sol": {
1106
- readonly displayName: "GPT-6 Sol";
1107
- readonly iconProvider: "openai";
1108
- };
1109
- readonly "openai/gpt-6-luna": {
1110
- readonly displayName: "GPT-6 Luna";
1111
- readonly iconProvider: "openai";
1112
- };
1113
- readonly "openai/gpt-5.6-sol": {
1114
- readonly displayName: "GPT-5.6 Sol";
1115
- readonly iconProvider: "openai";
1116
- };
1117
- readonly "openai/gpt-5.6-luna": {
1118
- readonly displayName: "GPT-5.6 Luna";
1119
- readonly iconProvider: "openai";
1120
- };
1121
- readonly "openai/gpt-5.6-terra": {
1122
- readonly displayName: "GPT-5.6 Terra";
1123
- readonly iconProvider: "openai";
1124
- };
1125
- readonly "google/gemini-3.8-flash": {
1126
- readonly displayName: "Gemini 3.8 Flash";
1127
- readonly iconProvider: "google";
1128
- };
1129
- readonly "google/gemini-3.7-flash": {
1130
- readonly displayName: "Gemini 3.7 Flash";
1131
- readonly iconProvider: "google";
1132
- };
1133
- readonly "google/gemini-3.6-flash": {
1134
- readonly displayName: "Gemini 3.6 Flash";
1135
- readonly iconProvider: "google";
1136
- };
1137
- readonly "google/gemini-3.5-flash-lite": {
1138
- readonly displayName: "Gemini 3.5 Flash Lite";
1139
- readonly iconProvider: "google";
1140
- };
1141
- readonly "google/gemini-3.1-pro-preview": {
1142
- readonly displayName: "Gemini 3.1 Pro Preview";
1143
- readonly iconProvider: "google";
1144
- };
1145
- readonly "google/gemini-3.5-flash": {
1146
- readonly displayName: "Gemini 3.5 Flash";
1147
- readonly iconProvider: "google";
1148
- };
1149
- readonly "google/gemini-3.1-flash-lite": {
1150
- readonly displayName: "Gemini 3.1 Flash Lite";
1151
- readonly iconProvider: "google";
1152
- };
1153
- readonly "anthropic/claude-sonnet-5.5": {
1154
- readonly displayName: "Claude Sonnet 5.5";
1155
- readonly iconProvider: "anthropic";
1156
- };
1157
- readonly "anthropic/claude-sonnet-5": {
1158
- readonly displayName: "Claude Sonnet 5";
1159
- readonly iconProvider: "anthropic";
1160
- };
1161
- readonly "anthropic/claude-opus-5": {
1162
- readonly displayName: "Claude Opus 5";
1163
- readonly iconProvider: "anthropic";
1164
- };
1165
- readonly "anthropic/claude-opus-4.8": {
1166
- readonly displayName: "Claude Opus 4.8";
1167
- readonly iconProvider: "anthropic";
1168
- };
1169
- readonly "anthropic/claude-sonnet-4.6": {
1170
- readonly displayName: "Claude Sonnet 4.6";
1171
- readonly iconProvider: "anthropic";
1172
- };
1173
- readonly "openai/gpt-5.5": {
1174
- readonly displayName: "GPT-5.5";
1175
- readonly iconProvider: "openai";
1176
- };
1177
- readonly "openai/gpt-5.4-mini": {
1178
- readonly displayName: "GPT-5.4 Mini";
1179
- readonly iconProvider: "openai";
1180
- };
1181
- readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": {
1182
- readonly displayName: "Claude Sonnet 4.5";
1183
- readonly iconProvider: "anthropic";
1184
- };
1185
- readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": {
1186
- readonly displayName: "Claude Haiku 4.5";
1187
- readonly iconProvider: "anthropic";
1188
- };
1189
- readonly "us.amazon.nova-pro-v1:0": {
1190
- readonly displayName: "Amazon Nova Pro";
1191
- readonly iconProvider: "bedrock";
1192
- };
1193
- readonly "us.amazon.nova-lite-v1:0": {
1194
- readonly displayName: "Amazon Nova Lite";
1195
- readonly iconProvider: "bedrock";
1196
- };
1197
- readonly "us.amazon.nova-micro-v1:0": {
1198
- readonly displayName: "Amazon Nova Micro";
1199
- readonly iconProvider: "bedrock";
1200
- };
1201
- readonly "openai.gpt-oss-120b-1:0": {
1202
- readonly displayName: "GPT OSS 120B";
1203
- readonly iconProvider: "openai";
1204
- };
1205
- readonly "openai.gpt-oss-20b-1:0": {
1206
- readonly displayName: "GPT OSS 20B";
1207
- readonly iconProvider: "openai";
1208
- };
1209
- readonly "mistral-large-latest": {
1210
- readonly displayName: "Mistral Large";
1211
- readonly iconProvider: "mistral";
1212
- };
1213
- readonly "mistral-medium-latest": {
1214
- readonly displayName: "Mistral Medium";
1215
- readonly iconProvider: "mistral";
1216
- };
1217
- readonly "mistral-small-latest": {
1218
- readonly displayName: "Mistral Small";
1219
- readonly iconProvider: "mistral";
1220
- };
1221
- };
1222
- export declare const getModelDisplayMetadata: (modelId: string) => ModelDisplayMetadata | null;
1223
- /**
1224
- * Offered models whose provider API accepts PDF/file content. Generated from
1225
- * live models.dev input modalities plus dated, reviewed source corrections;
1226
- * the nightly upstream check rejects drift.
1227
- */
1228
- export declare const BYOK_DOCUMENT_INPUT_MODEL_OPTIONS: {
1229
- readonly google: readonly ["gemini-3.8-flash", "gemini-3.7-flash", "gemini-3.6-flash", "gemini-3.5-flash-lite", "gemini-3.1-pro-preview", "gemini-3.5-flash", "gemini-3.1-flash-lite"];
1230
- readonly openrouter: readonly ["openai/gpt-6.1-sol", "openai/gpt-6-astra", "openai/gpt-6-sol", "openai/gpt-6-luna", "openai/gpt-5.6-sol", "openai/gpt-5.6-terra", "openai/gpt-5.6-luna", "google/gemini-3.8-flash", "google/gemini-3.7-flash", "google/gemini-3.6-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.1-pro-preview", "google/gemini-3.5-flash", "google/gemini-3.1-flash-lite", "anthropic/claude-sonnet-5.5", "anthropic/claude-sonnet-5", "anthropic/claude-opus-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6", "openai/gpt-5.5", "openai/gpt-5.4-mini"];
1231
- readonly openai: readonly ["gpt-6.1-sol", "gpt-6-astra", "gpt-6-sol", "gpt-6-luna", "gpt-5.6", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.2"];
1232
- readonly anthropic: readonly ["claude-sonnet-5-5", "claude-sonnet-5", "claude-fable-5-1", "claude-fable-5", "claude-opus-5-5", "claude-opus-5", "claude-opus-4-8", "claude-opus-4-7", "claude-sonnet-4-6", "claude-opus-4-6", "claude-haiku-4-5-20251001"];
1233
- readonly bedrock: readonly ["us.anthropic.claude-sonnet-4-5-20250929-v1:0", "us.anthropic.claude-haiku-4-5-20251001-v1:0", "us.amazon.nova-pro-v1:0", "us.amazon.nova-lite-v1:0"];
1234
- readonly mistral: readonly [];
1235
- };
1236
- export declare const isBYOKProviderRoleSupported: ({ provider, role }: {
1237
- provider: BYOKProvider;
1238
- role: ModelRole;
1239
- }) => boolean;
1240
- export declare const isBYOKModelRoleSupported: ({ provider, modelId, role }: {
1241
- provider: BYOKProvider;
1242
- modelId: string;
1243
- role: ModelRole;
1244
- }) => boolean;
1245
- /**
1246
- * Models whose provider adapter can receive a PDF `document` content part in a
1247
- * chat turn without throwing. This is a narrower, runtime question than the
1248
- * pdf ROLE (`BYOK_DOCUMENT_INPUT_MODEL_OPTIONS`, which curates model selection
1249
- * for PDF-processing flows): it only asks "will the chat stream survive this
1250
- * attachment." The Mistral text adapter maps PDF `document` parts to
1251
- * `document_url`, so its
1252
- * vision models accept PDF attachments even though Mistral is deliberately not
1253
- * offered as a pdf-role provider. Mistral's `document_url` takes PDF but NOT
1254
- * textual documents (docx/txt/csv/md), so those still gate on
1255
- * `BYOK_DOCUMENT_INPUT_MODEL_OPTIONS` (which excludes Mistral). Superset
1256
- * invariant: every pdf-role document model also accepts a PDF chat attachment.
1257
- */
1258
- export declare const CHAT_PDF_ATTACHMENT_MODEL_OPTIONS: {
1259
- readonly mistral: readonly ["mistral-medium-latest", "mistral-small-latest"];
1260
- readonly google: readonly ["gemini-3.8-flash", "gemini-3.7-flash", "gemini-3.6-flash", "gemini-3.5-flash-lite", "gemini-3.1-pro-preview", "gemini-3.5-flash", "gemini-3.1-flash-lite"];
1261
- readonly openrouter: readonly ["openai/gpt-6.1-sol", "openai/gpt-6-astra", "openai/gpt-6-sol", "openai/gpt-6-luna", "openai/gpt-5.6-sol", "openai/gpt-5.6-terra", "openai/gpt-5.6-luna", "google/gemini-3.8-flash", "google/gemini-3.7-flash", "google/gemini-3.6-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.1-pro-preview", "google/gemini-3.5-flash", "google/gemini-3.1-flash-lite", "anthropic/claude-sonnet-5.5", "anthropic/claude-sonnet-5", "anthropic/claude-opus-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6", "openai/gpt-5.5", "openai/gpt-5.4-mini"];
1262
- readonly openai: readonly ["gpt-6.1-sol", "gpt-6-astra", "gpt-6-sol", "gpt-6-luna", "gpt-5.6", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.2"];
1263
- readonly anthropic: readonly ["claude-sonnet-5-5", "claude-sonnet-5", "claude-fable-5-1", "claude-fable-5", "claude-opus-5-5", "claude-opus-5", "claude-opus-4-8", "claude-opus-4-7", "claude-sonnet-4-6", "claude-opus-4-6", "claude-haiku-4-5-20251001"];
1264
- readonly bedrock: readonly ["us.anthropic.claude-sonnet-4-5-20250929-v1:0", "us.anthropic.claude-haiku-4-5-20251001-v1:0", "us.amazon.nova-pro-v1:0", "us.amazon.nova-lite-v1:0"];
1265
- };
1266
- export declare const isChatPdfAttachmentModelSupported: ({ provider, modelId }: {
1267
- provider: BYOKProvider;
1268
- modelId: string;
1269
- }) => boolean;
1270
- /**
1271
- * Resolve a model id that will actually work for this provider+role,
1272
- * keeping the SAME provider. Returns the caller's model unchanged when
1273
- * it is still offered; otherwise falls back to the provider's per-role
1274
- * default (`BYOK_DEFAULT_MODELS`). Returns `null` only when the
1275
- * provider has no valid model for the role at all — the sole case
1276
- * today is `mistral` + `pdf`, because the TanStack Mistral adapter
1277
- * exposes no `document` input modality, so no Mistral model (not even
1278
- * the default) can serve the PDF role.
1279
- *
1280
- * Used to auto-heal org AI configs whose pinned model was removed by a
1281
- * catalog bump, so generation resolves to a supported model instead of
1282
- * 400-ing (or forwarding a retired id to the provider).
1283
- */
1284
- export declare const resolveWorkingBYOKModelForRole: ({ provider, modelId, role }: {
1285
- provider: BYOKProvider;
1286
- modelId: string;
1287
- role: ModelRole;
1288
- }) => string | null;
1289
- /**
1290
- * Anthropic models that use the adaptive-thinking request shape
1291
- * (`thinking: { type: "adaptive" }`). Newer Claude models reject the
1292
- * legacy budget-based form, so every Opus 4.6+/Sonnet 4.6/Fable entry
1293
- * offered above must appear here or it will 400 on the reasoning role.
1294
- */
1295
- export declare const ANTHROPIC_ADAPTIVE_THINKING_MODELS: readonly ["claude-sonnet-5-5", "claude-sonnet-5", "claude-opus-5", "claude-sonnet-4-6", "claude-opus-4-6", "claude-opus-4-7", "claude-opus-4-8", "claude-fable-5", "claude-fable-5-1", "claude-opus-5-5"];
1296
- /**
1297
- * Canonical reasoning-effort ladder, ordered weakest to strongest.
1298
- * Union of every effort keyword the offered providers accept; no
1299
- * single model accepts all of them, which is exactly why the
1300
- * generated per-model `MODEL_REASONING_EFFORTS` exists.
1301
- */
1302
- export declare const REASONING_EFFORTS: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
1303
- export type ReasoningEffort = (typeof REASONING_EFFORTS)[number];
1304
- declare const resolvedReasoningEffortSchema: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"], undefined>, v.BrandAction<"none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", "ResolvedReasoningEffort">]>;
1305
- /**
1306
- * A reasoning effort proven to be accepted by the model it targets.
1307
- * Only `resolveReasoningEffort` can produce this type, so option
1308
- * builders cannot hand a provider a literal effort the model rejects
1309
- * (e.g. `"none"` to a model whose reasoning cannot be disabled) —
1310
- * that mistake now fails typecheck instead of 502-ing at runtime.
1311
- */
1312
- export type ResolvedReasoningEffort = v.InferOutput<typeof resolvedReasoningEffortSchema>;
1313
- /**
1314
- * Per-provider model served when a user's included budget is exhausted
1315
- * and no explicit selection overrides it. Falls back to each
1316
- * provider's fast-role default; providers without a first-class
1317
- * adapter path cannot serve the lane. Total over providers so a new
1318
- * provider lands with an explicit decision.
1319
- */
1320
- export declare const FALLBACK_CHAT_MODEL_BY_PROVIDER: {
1321
- readonly google: "gemini-3.8-flash";
1322
- readonly openrouter: "openai/gpt-6-luna";
1323
- readonly openai: "gpt-6-luna";
1324
- readonly anthropic: "claude-opus-5-5";
1325
- readonly bedrock: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
1326
- readonly mistral: "mistral-small-latest";
1327
- readonly azure_foundry: null;
1328
- readonly openai_compatible: null;
1329
- readonly huggingface: null;
1330
- };
1331
- /**
1332
- * Provider-native IDs that are exact aliases of an offered catalog ID.
1333
- * Every metadata lookup normalizes here, so instance/dev overrides cannot
1334
- * bypass rates or capabilities and duplicated alias rows cannot drift apart.
1335
- */
1336
- export declare const MODEL_CATALOG_ID_ALIASES: {
1337
- readonly "gpt-5.6-sol": "gpt-5.6";
1338
- readonly "claude-opus-4.8": "claude-opus-4-8";
1339
- readonly "claude-sonnet-5.5": "claude-sonnet-5-5";
1340
- readonly "claude-sonnet-4.6": "claude-sonnet-4-6";
1341
- };
1342
- export declare const normalizeModelCatalogId: (modelId: string) => string;
1343
- /**
1344
- * Whether stella should emit a `temperature` override for this model.
1345
- * This is deliberately stricter than provider acceptance: deprecated
1346
- * parameters that are accepted but ignored resolve to `false`. Unknown ids
1347
- * also resolve to `false` (send nothing; provider default). Callers must
1348
- * never index `MODEL_TEMPERATURE_POLICIES` directly with
1349
- * a runtime string.
1350
- */
1351
- export declare const shouldEmitTemperature: (modelId: string) => boolean;
1352
- /**
1353
- * The most output tokens one response of `modelId` may carry, from the
1354
- * catalog. `undefined` for an id the catalog does not list (a deployment
1355
- * override, a dev model): the catalog knows nothing about it, so callers leave
1356
- * the allowance to the provider rather than guess one. Callers must never
1357
- * index `MODEL_OUTPUT_TOKEN_LIMITS` directly with a runtime string.
1358
- */
1359
- export declare const getOutputTokenLimit: (modelId: string) => number | undefined;
1360
- /**
1361
- * Whether a model accepts tool use on a streaming request.
1362
- *
1363
- * Every tool-carrying request stella sends is a stream, and structured
1364
- * output is a forced tool call, so `"unsupported"` withdraws both: the
1365
- * provider answers such a request with a fatal stream error rather than a
1366
- * degraded result. models.dev does not publish this, so the map is
1367
- * hand-declared here rather than in the generated `capabilities.gen.ts`,
1368
- * and it is total over the offered catalog: a new model forces a decision.
1369
- *
1370
- * Consumers must go through `supportsStreamingToolUse`.
1371
- */
1372
- export declare const MODEL_STREAMING_TOOL_USE: {
1373
- readonly "gemini-3.8-flash": "supported";
1374
- readonly "gemini-3.7-flash": "supported";
1375
- readonly "gemini-3.6-flash": "supported";
1376
- readonly "gemini-3.5-flash-lite": "supported";
1377
- readonly "gemini-3.1-pro-preview": "supported";
1378
- readonly "gemini-3.5-flash": "supported";
1379
- readonly "gemini-3.1-flash-lite": "supported";
1380
- readonly "openai/gpt-6.1-sol": "supported";
1381
- readonly "openai/gpt-6-astra": "supported";
1382
- readonly "openai/gpt-6-sol": "supported";
1383
- readonly "openai/gpt-6-luna": "supported";
1384
- readonly "openai/gpt-5.6-sol": "supported";
1385
- readonly "openai/gpt-5.6-terra": "supported";
1386
- readonly "openai/gpt-5.6-luna": "supported";
1387
- readonly "google/gemini-3.8-flash": "supported";
1388
- readonly "google/gemini-3.7-flash": "supported";
1389
- readonly "google/gemini-3.6-flash": "supported";
1390
- readonly "google/gemini-3.5-flash-lite": "supported";
1391
- readonly "google/gemini-3.1-pro-preview": "supported";
1392
- readonly "google/gemini-3.5-flash": "supported";
1393
- readonly "google/gemini-3.1-flash-lite": "supported";
1394
- readonly "anthropic/claude-sonnet-5.5": "supported";
1395
- readonly "anthropic/claude-sonnet-5": "supported";
1396
- readonly "anthropic/claude-opus-5": "supported";
1397
- readonly "anthropic/claude-opus-4.8": "supported";
1398
- readonly "anthropic/claude-sonnet-4.6": "supported";
1399
- readonly "openai/gpt-5.5": "supported";
1400
- readonly "openai/gpt-5.4-mini": "supported";
1401
- readonly "gpt-6.1-sol": "supported";
1402
- readonly "gpt-6-astra": "supported";
1403
- readonly "gpt-6-sol": "supported";
1404
- readonly "gpt-6-luna": "supported";
1405
- readonly "gpt-5.6": "supported";
1406
- readonly "gpt-5.6-terra": "supported";
1407
- readonly "gpt-5.6-luna": "supported";
1408
- readonly "gpt-5.5": "supported";
1409
- readonly "gpt-5.4": "supported";
1410
- readonly "gpt-5.4-mini": "supported";
1411
- readonly "gpt-5.4-nano": "supported";
1412
- readonly "gpt-5.2": "supported";
1413
- readonly "claude-sonnet-5-5": "supported";
1414
- readonly "claude-sonnet-5": "supported";
1415
- readonly "claude-fable-5-1": "supported";
1416
- readonly "claude-fable-5": "supported";
1417
- readonly "claude-opus-5-5": "supported";
1418
- readonly "claude-opus-5": "supported";
1419
- readonly "claude-opus-4-8": "supported";
1420
- readonly "claude-opus-4-7": "supported";
1421
- readonly "claude-sonnet-4-6": "supported";
1422
- readonly "claude-opus-4-6": "supported";
1423
- readonly "claude-haiku-4-5-20251001": "supported";
1424
- readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": "supported";
1425
- readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": "supported";
1426
- readonly "us.amazon.nova-pro-v1:0": "supported";
1427
- readonly "us.amazon.nova-lite-v1:0": "supported";
1428
- readonly "us.amazon.nova-micro-v1:0": "supported";
1429
- readonly "openai.gpt-oss-120b-1:0": "supported";
1430
- readonly "openai.gpt-oss-20b-1:0": "supported";
1431
- readonly "mistral-large-latest": "supported";
1432
- readonly "mistral-medium-latest": "supported";
1433
- readonly "mistral-small-latest": "supported";
1434
- };
1435
- /**
1436
- * Whether stella may send tools (or a structured-output schema) to this
1437
- * model on a streaming request. Unlisted ids resolve to `true`: custom
1438
- * deployments and env overrides are overwhelmingly tool-capable, and
1439
- * withdrawing tools from an uncatalogued model would silently strip the
1440
- * agent loop rather than fail where it can be seen.
1441
- */
1442
- export declare const supportsStreamingToolUse: (modelId: string) => boolean;
1443
- /**
1444
- * Declared reasoning-effort values for a model ID, or `null` when the
1445
- * model has no effort control or is not catalogued (custom deployments,
1446
- * env overrides). Callers must never index `MODEL_REASONING_EFFORTS`
1447
- * directly with a runtime string.
1448
- */
1449
- export declare const getModelReasoningEfforts: (modelId: string) => readonly ReasoningEffort[] | null;
1450
- /**
1451
- * Concrete provider-default effort published for a model, or null when the
1452
- * provider exposes no named default. Unknown ids also resolve to null.
1453
- */
1454
- export declare const getModelDefaultReasoningEffort: (modelId: string) => ReasoningEffort | null;
1455
- export type ResolveReasoningEffortOptions = {
1456
- modelId: string;
1457
- requested: ReasoningEffort;
1458
- };
1459
- /**
1460
- * Clamp a requested reasoning effort into the target model's declared
1461
- * capability.
1462
- *
1463
- * - Unknown model or no effort control → `null` (send no effort at
1464
- * all; the provider default is the only universally safe choice).
1465
- * - Requested value supported → returned unchanged.
1466
- * - Otherwise → the supported value nearest on `REASONING_EFFORTS`,
1467
- * preferring the weaker side on ties, so a "none" request against a
1468
- * reasoning-mandatory model degrades to its weakest tier instead of
1469
- * erroring, and requests above the model's ceiling clamp down to it.
1470
- */
1471
- export declare const resolveReasoningEffort: ({ modelId, requested }: ResolveReasoningEffortOptions) => ResolvedReasoningEffort | null;
1472
- export declare const getModelRate: (modelId: string) => ModelRate | undefined;
1473
- /**
1474
- * Documented input context-window sizes (in tokens) per model ID.
1475
- *
1476
- * Keys are the canonical model IDs stella resolves for the provider
1477
- * adapters (the same forms used in `MODEL_RATES`, `BYOK_MODEL_OPTIONS`,
1478
- * and `DEFAULT_MODELS`, including OpenRouter provider-prefixed slugs and
1479
- * AWS Bedrock IDs). Values are the providers' publicly documented input
1480
- * windows; where a provider offers a larger beta window we intentionally
1481
- * take the conservative default (e.g. Claude's standard 200K rather than
1482
- * the 1M beta) so context budgeting never overpromises.
1483
- *
1484
- * Consumers must go through `getContextWindowTokens`, which falls back to
1485
- * `DEFAULT_CONTEXT_WINDOW_TOKENS` for any unlisted ID. Unlike
1486
- * `MODEL_RATES`, the nightly `model-catalog-upstream` check does not
1487
- * validate this map, so an unknown model degrades to the conservative
1488
- * default rather than failing CI.
1489
- */
1490
- export declare const CONTEXT_WINDOW_TOKENS: {
1491
- readonly "gemini-2.5-flash": 1048576;
1492
- readonly "gemini-2.5-pro": 1048576;
1493
- readonly "gemini-3.1-flash-lite": 1048576;
1494
- readonly "gemini-3.5-flash": 1048576;
1495
- readonly "gemini-3.5-flash-lite": 1048576;
1496
- readonly "gemini-3.6-flash": 1048576;
1497
- readonly "gemini-3.7-flash": 1048576;
1498
- readonly "gemini-3.8-flash": 1048576;
1499
- readonly "gemini-3.1-pro-preview": 1048576;
1500
- readonly "gpt-4o-mini": 128000;
1501
- readonly "gpt-4o": 128000;
1502
- readonly "gpt-5.2": 400000;
1503
- readonly "gpt-5.4-nano": 400000;
1504
- readonly "gpt-5.4-mini": 400000;
1505
- readonly "gpt-5.4": 400000;
1506
- readonly "gpt-5.5": 400000;
1507
- readonly "gpt-6.1-sol": 922000;
1508
- readonly "gpt-6-astra": 922000;
1509
- readonly "gpt-6-sol": 922000;
1510
- readonly "gpt-6-luna": 922000;
1511
- readonly "gpt-5.6": 922000;
1512
- readonly "gpt-5.6-luna": 922000;
1513
- readonly "gpt-5.6-terra": 922000;
1514
- readonly "claude-haiku-4-5-20251001": 200000;
1515
- readonly "claude-sonnet-4-6": 200000;
1516
- readonly "claude-sonnet-5": 1000000;
1517
- readonly "claude-sonnet-5-5": 1000000;
1518
- readonly "claude-opus-4-6": 200000;
1519
- readonly "claude-opus-4-7": 200000;
1520
- readonly "claude-opus-4-8": 200000;
1521
- readonly "claude-opus-5": 1000000;
1522
- readonly "claude-opus-5-5": 1000000;
1523
- readonly "claude-fable-5": 200000;
1524
- readonly "claude-fable-5-1": 1000000;
1525
- readonly "mistral-small-latest": 128000;
1526
- readonly "mistral-large-latest": 128000;
1527
- readonly "mistral-medium-latest": 128000;
1528
- readonly "mistral-medium-3-5": 128000;
1529
- readonly "magistral-small-latest": 128000;
1530
- readonly "google/gemini-3.8-flash": 1048576;
1531
- readonly "google/gemini-3.7-flash": 1048576;
1532
- readonly "google/gemini-3.6-flash": 1048576;
1533
- readonly "google/gemini-3.5-flash-lite": 1048576;
1534
- readonly "google/gemini-3.1-pro-preview": 1048576;
1535
- readonly "google/gemini-3.5-flash": 1048576;
1536
- readonly "google/gemini-3.1-flash-lite": 1048576;
1537
- readonly "anthropic/claude-sonnet-5.5": 1000000;
1538
- readonly "anthropic/claude-sonnet-5": 1000000;
1539
- readonly "anthropic/claude-opus-5": 1000000;
1540
- readonly "anthropic/claude-opus-4.8": 200000;
1541
- readonly "anthropic/claude-sonnet-4.6": 200000;
1542
- readonly "openai/gpt-6.1-sol": 922000;
1543
- readonly "openai/gpt-6-astra": 922000;
1544
- readonly "openai/gpt-6-sol": 922000;
1545
- readonly "openai/gpt-6-luna": 922000;
1546
- readonly "openai/gpt-5.6-sol": 922000;
1547
- readonly "openai/gpt-5.6-luna": 922000;
1548
- readonly "openai/gpt-5.6-terra": 922000;
1549
- readonly "openai/gpt-5.5": 400000;
1550
- readonly "openai/gpt-5.4-mini": 400000;
1551
- readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": 200000;
1552
- readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": 200000;
1553
- readonly "us.amazon.nova-pro-v1:0": 300000;
1554
- readonly "us.amazon.nova-lite-v1:0": 300000;
1555
- readonly "us.amazon.nova-micro-v1:0": 128000;
1556
- readonly "openai.gpt-oss-120b-1:0": 128000;
1557
- readonly "openai.gpt-oss-20b-1:0": 128000;
1558
- readonly "us.deepseek.r1-v1:0": 128000;
1559
- };
1560
- /**
1561
- * Conservative window assumed for any model ID absent from
1562
- * `CONTEXT_WINDOW_TOKENS` (custom deployments, OpenAI-compatible
1563
- * endpoints, brand-new IDs not yet catalogued).
1564
- */
1565
- export declare const DEFAULT_CONTEXT_WINDOW_TOKENS = 128000;
1566
- /**
1567
- * Documented input context window for a model ID, or the conservative
1568
- * default for unlisted IDs. Callers must never index
1569
- * `CONTEXT_WINDOW_TOKENS` directly.
1570
- */
1571
- export declare const getContextWindowTokens: (modelId: string) => number;
1572
- //#endregion
1573
- export type { CapabilityOverride, DocumentInputOverride, ModelRate, ModelRateAmounts, ModelsDevRateProvider };
1
+ import { $ as MODEL_OUTPUT_TOKEN_LIMITS, A as STREAMING_TOOL_USE_SUPPORTS, B as getModelRate, C as ModelDisplayMetadata, D as ReasoningEffort, E as REASONING_EFFORTS, F as TemperaturePolicy, G as isChatPdfAttachmentModelSupported, H as getOutputTokenLimit, I as getContextWindowTokens, J as resolveWorkingBYOKModelForRole, K as normalizeModelCatalogId, L as getModelDefaultReasoningEffort, M as TANSTACK_AI_PROVIDERS, N as TEMPERATURE_POLICIES, O as ResolveReasoningEffortOptions, P as TanStackAIProvider, Q as MODEL_IMAGE_INPUT_CAPABILITIES, R as getModelDisplayMetadata, S as MODEL_STREAMING_TOOL_USE, T as OfferedBYOKModelId, U as isBYOKModelRoleSupported, V as getModelReasoningEfforts, W as isBYOKProviderRoleSupported, X as supportsStreamingToolUse, Y as shouldEmitTemperature, Z as MODEL_DEFAULT_REASONING_EFFORTS, _ as ImageInputCapability, _t as getStandardModelRate, a as BYOKProvider, at as CapabilityOverride, b as MODEL_DISPLAY_METADATA, c as BYOK_MODEL_OPTIONS, ct as ImageInputOverrides, d as DEFAULT_CONTEXT_WINDOW_TOKENS, dt as ModelsDevRateProvider, et as MODEL_REASONING_EFFORTS, f as DEFAULT_MODELS, ft as RETAINED_MODELS_DEV_RATE_ENTRIES, g as IMAGE_INPUT_CAPABILITIES, gt as ModelRateAmounts, h as FirstPartyModelProvider, ht as ModelRate, i as BYOKModelIdByProvider, it as CAPABILITY_OVERRIDES, j as StreamingToolUseSupport, k as ResolvedReasoningEffort, l as CHAT_PDF_ATTACHMENT_MODEL_OPTIONS, lt as MODELS_DEV_RATE_PROVIDER_BY_CATALOG_PROVIDER, m as FIRST_PARTY_MODEL_PROVIDERS, mt as MODEL_RATE_UNITS_PER_USD, n as AI_PROVIDERS, nt as DOCUMENT_INPUT_OVERRIDES, o as BYOK_DEFAULT_MODELS, ot as IMAGE_INPUT_OVERRIDES, p as FALLBACK_CHAT_MODEL_BY_PROVIDER, pt as MODEL_RATES, q as resolveReasoningEffort, r as ANTHROPIC_ADAPTIVE_THINKING_MODELS, rt as DocumentInputOverride, s as BYOK_DOCUMENT_INPUT_MODEL_OPTIONS, st as ImageInputOverride, t as AIProvider, tt as MODEL_TEMPERATURE_POLICIES, u as CONTEXT_WINDOW_TOKENS, ut as MODELS_DEV_RATE_SOURCE_ALIASES, v as MODEL_CATALOG_ID_ALIASES, vt as resolveModelRate, w as ModelRole, x as MODEL_ROLES, y as MODEL_CATALOG_PROVIDER_KIND, z as getModelImageInputCapability } from "./index-D5gnRT1S.js";
2
+ export { AIProvider, AI_PROVIDERS, ANTHROPIC_ADAPTIVE_THINKING_MODELS, BYOKModelIdByProvider, BYOKProvider, BYOK_DEFAULT_MODELS, BYOK_DOCUMENT_INPUT_MODEL_OPTIONS, BYOK_MODEL_OPTIONS, CAPABILITY_OVERRIDES, CHAT_PDF_ATTACHMENT_MODEL_OPTIONS, CONTEXT_WINDOW_TOKENS, type CapabilityOverride, DEFAULT_CONTEXT_WINDOW_TOKENS, DEFAULT_MODELS, DOCUMENT_INPUT_OVERRIDES, type DocumentInputOverride, FALLBACK_CHAT_MODEL_BY_PROVIDER, FIRST_PARTY_MODEL_PROVIDERS, FirstPartyModelProvider, IMAGE_INPUT_CAPABILITIES, IMAGE_INPUT_OVERRIDES, ImageInputCapability, type ImageInputOverride, type ImageInputOverrides, MODELS_DEV_RATE_PROVIDER_BY_CATALOG_PROVIDER, MODELS_DEV_RATE_SOURCE_ALIASES, MODEL_CATALOG_ID_ALIASES, MODEL_CATALOG_PROVIDER_KIND, MODEL_DEFAULT_REASONING_EFFORTS, MODEL_DISPLAY_METADATA, MODEL_IMAGE_INPUT_CAPABILITIES, MODEL_OUTPUT_TOKEN_LIMITS, MODEL_RATES, MODEL_RATE_UNITS_PER_USD, MODEL_REASONING_EFFORTS, MODEL_ROLES, MODEL_STREAMING_TOOL_USE, MODEL_TEMPERATURE_POLICIES, ModelDisplayMetadata, type ModelRate, type ModelRateAmounts, ModelRole, type ModelsDevRateProvider, OfferedBYOKModelId, REASONING_EFFORTS, RETAINED_MODELS_DEV_RATE_ENTRIES, ReasoningEffort, ResolveReasoningEffortOptions, ResolvedReasoningEffort, STREAMING_TOOL_USE_SUPPORTS, StreamingToolUseSupport, TANSTACK_AI_PROVIDERS, TEMPERATURE_POLICIES, TanStackAIProvider, TemperaturePolicy, getContextWindowTokens, getModelDefaultReasoningEffort, getModelDisplayMetadata, getModelImageInputCapability, getModelRate, getModelReasoningEfforts, getOutputTokenLimit, getStandardModelRate, isBYOKModelRoleSupported, isBYOKProviderRoleSupported, isChatPdfAttachmentModelSupported, normalizeModelCatalogId, resolveModelRate, resolveReasoningEffort, resolveWorkingBYOKModelForRole, shouldEmitTemperature, supportsStreamingToolUse };