@stll/ai-catalog 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/index.d.ts +1040 -946
- package/dist/index.js +952 -839
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,1102 +1,1194 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
//#region src/
|
|
3
|
-
/**
|
|
4
|
-
* Hand-declared capabilities for offered models that models.dev does
|
|
5
|
-
* not cover. The capability generator
|
|
6
|
-
* (`packages/scripts/src/model-catalog-capabilities-gen.ts`) refuses
|
|
7
|
-
* an override for any model the upstream source covers, so manual
|
|
8
|
-
* data cannot shadow sourced data — this file can only ever fill
|
|
9
|
-
* genuine gaps, each with a dated justification.
|
|
10
|
-
*/
|
|
11
|
-
type CapabilityOverride = {
|
|
12
|
-
documentInput: boolean;
|
|
13
|
-
documentInputReason: string;
|
|
14
|
-
reasoningEfforts: readonly ReasoningEffort[] | null;
|
|
15
|
-
temperatureSupported: boolean;
|
|
16
|
-
/** Why the upstream source cannot answer for this model. Dated. */
|
|
17
|
-
reason: string;
|
|
18
|
-
};
|
|
19
|
-
declare const CAPABILITY_OVERRIDES: Partial<Record<OfferedBYOKModelId, CapabilityOverride>>;
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/document-input-overrides.d.ts
|
|
22
|
-
type DocumentInputOverride = {
|
|
23
|
-
/** Whether the model accepts a PDF/file content part. */
|
|
24
|
-
supported: boolean;
|
|
25
|
-
/** Why the live catalogue cannot answer correctly. Dated. */
|
|
26
|
-
reason: string;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Reviewed document-input corrections for models.dev records that exist but
|
|
30
|
-
* under-report the provider API's file-input support. The generator rejects an
|
|
31
|
-
* override once upstream agrees, so sourced data takes ownership automatically.
|
|
32
|
-
*/
|
|
33
|
-
declare const DOCUMENT_INPUT_OVERRIDES: Partial<Record<OfferedBYOKModelId, DocumentInputOverride>>;
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region src/capabilities.gen.d.ts
|
|
36
|
-
/**
|
|
37
|
-
* Reasoning-effort values each offered model accepts, `null` when the
|
|
38
|
-
* model exposes no effort-style reasoning control. A missing `"none"`
|
|
39
|
-
* means the model's reasoning cannot be disabled; consumers must go
|
|
40
|
-
* through `resolveReasoningEffort`.
|
|
41
|
-
*/
|
|
42
|
-
declare const MODEL_REASONING_EFFORTS: {
|
|
43
|
-
readonly "gemini-3.7-flash": readonly ["low", "medium", "high"];
|
|
44
|
-
readonly "gemini-3.6-flash": readonly ["minimal", "low", "medium", "high"];
|
|
45
|
-
readonly "gemini-3.5-flash-lite": readonly ["minimal", "low", "medium", "high"];
|
|
46
|
-
readonly "gemini-3.1-pro-preview": readonly ["low", "medium", "high"];
|
|
47
|
-
readonly "gemini-3.5-flash": readonly ["minimal", "low", "medium", "high"];
|
|
48
|
-
readonly "gemini-3.1-flash-lite": readonly ["minimal", "low", "medium", "high"];
|
|
49
|
-
readonly "openai/gpt-5.6-luna": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
50
|
-
readonly "openai/gpt-5.6-terra": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
51
|
-
readonly "google/gemini-3.7-flash": readonly ["low", "medium", "high"];
|
|
52
|
-
readonly "google/gemini-3.6-flash": readonly ["minimal", "low", "medium", "high"];
|
|
53
|
-
readonly "google/gemini-3.5-flash-lite": readonly ["minimal", "low", "medium", "high"];
|
|
54
|
-
readonly "google/gemini-3.1-pro-preview": readonly ["low", "medium", "high"];
|
|
55
|
-
readonly "google/gemini-3.5-flash": readonly ["minimal", "low", "medium", "high"];
|
|
56
|
-
readonly "google/gemini-3.1-flash-lite": readonly ["none", "minimal", "low", "medium", "high"];
|
|
57
|
-
readonly "anthropic/claude-sonnet-5": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
58
|
-
readonly "anthropic/claude-opus-5": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
59
|
-
readonly "anthropic/claude-opus-4.8": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
60
|
-
readonly "anthropic/claude-sonnet-4.6": readonly ["none", "low", "medium", "high", "max"];
|
|
61
|
-
readonly "openai/gpt-5.5": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
62
|
-
readonly "openai/gpt-5.4-mini": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
63
|
-
readonly "gpt-5.6": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
64
|
-
readonly "gpt-5.6-terra": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
65
|
-
readonly "gpt-5.6-luna": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
66
|
-
readonly "gpt-5.5": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
67
|
-
readonly "gpt-5.4": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
68
|
-
readonly "gpt-5.4-mini": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
69
|
-
readonly "gpt-5.4-nano": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
70
|
-
readonly "gpt-5.2": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
71
|
-
readonly "claude-sonnet-5": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
72
|
-
readonly "claude-fable-5-1": readonly ["low", "medium", "high", "xhigh", "max"];
|
|
73
|
-
readonly "claude-fable-5": readonly ["low", "medium", "high", "xhigh", "max"];
|
|
74
|
-
readonly "claude-opus-5": readonly ["low", "medium", "high", "xhigh", "max"];
|
|
75
|
-
readonly "claude-opus-4-8": readonly ["low", "medium", "high", "xhigh", "max"];
|
|
76
|
-
readonly "claude-opus-4-7": readonly ["low", "medium", "high", "xhigh", "max"];
|
|
77
|
-
readonly "claude-sonnet-4-6": readonly ["low", "medium", "high", "max"];
|
|
78
|
-
readonly "claude-opus-4-6": readonly ["low", "medium", "high", "max"];
|
|
79
|
-
readonly "claude-haiku-4-5-20251001": null;
|
|
80
|
-
readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": null;
|
|
81
|
-
readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": null;
|
|
82
|
-
readonly "us.amazon.nova-pro-v1:0": null;
|
|
83
|
-
readonly "us.amazon.nova-lite-v1:0": null;
|
|
84
|
-
readonly "us.amazon.nova-micro-v1:0": null;
|
|
85
|
-
readonly "openai.gpt-oss-120b-1:0": readonly ["low", "medium", "high"];
|
|
86
|
-
readonly "openai.gpt-oss-20b-1:0": readonly ["low", "medium", "high"];
|
|
87
|
-
readonly "us.deepseek.r1-v1:0": null;
|
|
88
|
-
readonly "mistral-large-latest": null;
|
|
89
|
-
readonly "mistral-medium-latest": readonly ["none", "high"];
|
|
90
|
-
readonly "mistral-small-latest": readonly ["none", "high"];
|
|
91
|
-
readonly "magistral-medium-latest": null;
|
|
92
|
-
readonly "magistral-small": null;
|
|
93
|
-
readonly "pixtral-large-latest": null;
|
|
94
|
-
};
|
|
95
|
-
/**
|
|
96
|
-
* Concrete provider-default effort where the upstream catalogue publishes
|
|
97
|
-
* one. OpenRouter is the source today; null means the provider does not expose
|
|
98
|
-
* a truthful named default, so clients must retain a separate Default choice.
|
|
99
|
-
*/
|
|
100
|
-
declare const MODEL_DEFAULT_REASONING_EFFORTS: {
|
|
101
|
-
readonly "gemini-3.7-flash": null;
|
|
102
|
-
readonly "gemini-3.6-flash": null;
|
|
103
|
-
readonly "gemini-3.5-flash-lite": null;
|
|
104
|
-
readonly "gemini-3.1-pro-preview": null;
|
|
105
|
-
readonly "gemini-3.5-flash": null;
|
|
106
|
-
readonly "gemini-3.1-flash-lite": null;
|
|
107
|
-
readonly "openai/gpt-5.6-luna": "medium";
|
|
108
|
-
readonly "openai/gpt-5.6-terra": "medium";
|
|
109
|
-
readonly "google/gemini-3.7-flash": "medium";
|
|
110
|
-
readonly "google/gemini-3.6-flash": "medium";
|
|
111
|
-
readonly "google/gemini-3.5-flash-lite": "minimal";
|
|
112
|
-
readonly "google/gemini-3.1-pro-preview": "medium";
|
|
113
|
-
readonly "google/gemini-3.5-flash": "medium";
|
|
114
|
-
readonly "google/gemini-3.1-flash-lite": "minimal";
|
|
115
|
-
readonly "anthropic/claude-sonnet-5": "high";
|
|
116
|
-
readonly "anthropic/claude-opus-5": "high";
|
|
117
|
-
readonly "anthropic/claude-opus-4.8": "high";
|
|
118
|
-
readonly "anthropic/claude-sonnet-4.6": "medium";
|
|
119
|
-
readonly "openai/gpt-5.5": "medium";
|
|
120
|
-
readonly "openai/gpt-5.4-mini": "medium";
|
|
121
|
-
readonly "gpt-5.6": null;
|
|
122
|
-
readonly "gpt-5.6-terra": null;
|
|
123
|
-
readonly "gpt-5.6-luna": null;
|
|
124
|
-
readonly "gpt-5.5": null;
|
|
125
|
-
readonly "gpt-5.4": null;
|
|
126
|
-
readonly "gpt-5.4-mini": null;
|
|
127
|
-
readonly "gpt-5.4-nano": null;
|
|
128
|
-
readonly "gpt-5.2": null;
|
|
129
|
-
readonly "claude-sonnet-5": null;
|
|
130
|
-
readonly "claude-fable-5-1": null;
|
|
131
|
-
readonly "claude-fable-5": null;
|
|
132
|
-
readonly "claude-opus-5": null;
|
|
133
|
-
readonly "claude-opus-4-8": null;
|
|
134
|
-
readonly "claude-opus-4-7": null;
|
|
135
|
-
readonly "claude-sonnet-4-6": null;
|
|
136
|
-
readonly "claude-opus-4-6": null;
|
|
137
|
-
readonly "claude-haiku-4-5-20251001": null;
|
|
138
|
-
readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": null;
|
|
139
|
-
readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": null;
|
|
140
|
-
readonly "us.amazon.nova-pro-v1:0": null;
|
|
141
|
-
readonly "us.amazon.nova-lite-v1:0": null;
|
|
142
|
-
readonly "us.amazon.nova-micro-v1:0": null;
|
|
143
|
-
readonly "openai.gpt-oss-120b-1:0": null;
|
|
144
|
-
readonly "openai.gpt-oss-20b-1:0": null;
|
|
145
|
-
readonly "us.deepseek.r1-v1:0": null;
|
|
146
|
-
readonly "mistral-large-latest": null;
|
|
147
|
-
readonly "mistral-medium-latest": null;
|
|
148
|
-
readonly "mistral-small-latest": null;
|
|
149
|
-
readonly "magistral-medium-latest": null;
|
|
150
|
-
readonly "magistral-small": null;
|
|
151
|
-
readonly "pixtral-large-latest": null;
|
|
152
|
-
};
|
|
153
|
-
/**
|
|
154
|
-
* Whether stella should emit a `temperature` sampling override.
|
|
155
|
-
* `"omit"` covers rejected, deprecated, and accepted-but-ignored
|
|
156
|
-
* parameters. Consumers must go through `shouldEmitTemperature`.
|
|
157
|
-
*/
|
|
158
|
-
declare const MODEL_TEMPERATURE_POLICIES: {
|
|
159
|
-
readonly "gemini-3.7-flash": "omit";
|
|
160
|
-
readonly "gemini-3.6-flash": "omit";
|
|
161
|
-
readonly "gemini-3.5-flash-lite": "omit";
|
|
162
|
-
readonly "gemini-3.1-pro-preview": "emit";
|
|
163
|
-
readonly "gemini-3.5-flash": "emit";
|
|
164
|
-
readonly "gemini-3.1-flash-lite": "emit";
|
|
165
|
-
readonly "openai/gpt-5.6-luna": "omit";
|
|
166
|
-
readonly "openai/gpt-5.6-terra": "omit";
|
|
167
|
-
readonly "google/gemini-3.7-flash": "omit";
|
|
168
|
-
readonly "google/gemini-3.6-flash": "omit";
|
|
169
|
-
readonly "google/gemini-3.5-flash-lite": "omit";
|
|
170
|
-
readonly "google/gemini-3.1-pro-preview": "emit";
|
|
171
|
-
readonly "google/gemini-3.5-flash": "emit";
|
|
172
|
-
readonly "google/gemini-3.1-flash-lite": "emit";
|
|
173
|
-
readonly "anthropic/claude-sonnet-5": "omit";
|
|
174
|
-
readonly "anthropic/claude-opus-5": "emit";
|
|
175
|
-
readonly "anthropic/claude-opus-4.8": "emit";
|
|
176
|
-
readonly "anthropic/claude-sonnet-4.6": "emit";
|
|
177
|
-
readonly "openai/gpt-5.5": "omit";
|
|
178
|
-
readonly "openai/gpt-5.4-mini": "omit";
|
|
179
|
-
readonly "gpt-5.6": "omit";
|
|
180
|
-
readonly "gpt-5.6-terra": "omit";
|
|
181
|
-
readonly "gpt-5.6-luna": "omit";
|
|
182
|
-
readonly "gpt-5.5": "omit";
|
|
183
|
-
readonly "gpt-5.4": "emit";
|
|
184
|
-
readonly "gpt-5.4-mini": "emit";
|
|
185
|
-
readonly "gpt-5.4-nano": "emit";
|
|
186
|
-
readonly "gpt-5.2": "emit";
|
|
187
|
-
readonly "claude-sonnet-5": "omit";
|
|
188
|
-
readonly "claude-fable-5-1": "omit";
|
|
189
|
-
readonly "claude-fable-5": "omit";
|
|
190
|
-
readonly "claude-opus-5": "omit";
|
|
191
|
-
readonly "claude-opus-4-8": "omit";
|
|
192
|
-
readonly "claude-opus-4-7": "omit";
|
|
193
|
-
readonly "claude-sonnet-4-6": "emit";
|
|
194
|
-
readonly "claude-opus-4-6": "emit";
|
|
195
|
-
readonly "claude-haiku-4-5-20251001": "emit";
|
|
196
|
-
readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": "emit";
|
|
197
|
-
readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": "emit";
|
|
198
|
-
readonly "us.amazon.nova-pro-v1:0": "emit";
|
|
199
|
-
readonly "us.amazon.nova-lite-v1:0": "emit";
|
|
200
|
-
readonly "us.amazon.nova-micro-v1:0": "emit";
|
|
201
|
-
readonly "openai.gpt-oss-120b-1:0": "emit";
|
|
202
|
-
readonly "openai.gpt-oss-20b-1:0": "emit";
|
|
203
|
-
readonly "us.deepseek.r1-v1:0": "emit";
|
|
204
|
-
readonly "mistral-large-latest": "emit";
|
|
205
|
-
readonly "mistral-medium-latest": "emit";
|
|
206
|
-
readonly "mistral-small-latest": "emit";
|
|
207
|
-
readonly "magistral-medium-latest": "emit";
|
|
208
|
-
readonly "magistral-small": "emit";
|
|
209
|
-
readonly "pixtral-large-latest": "emit";
|
|
210
|
-
};
|
|
211
|
-
//#endregion
|
|
212
|
-
//#region src/index.d.ts
|
|
213
|
-
/**
|
|
214
|
-
* Logical model roles. Call sites declare *what* they need, not
|
|
215
|
-
* *which* model to use.
|
|
216
|
-
*
|
|
217
|
-
* - fast: classification, extraction, short generation
|
|
218
|
-
* - chat: conversational with tool use and streaming
|
|
219
|
-
* - reasoning: complex multi-step legal analysis
|
|
220
|
-
* - pdf: native PDF/image understanding
|
|
221
|
-
*/
|
|
222
|
-
declare const MODEL_ROLES: readonly ["fast", "chat", "reasoning", "pdf"];
|
|
223
|
-
type ModelRole = (typeof MODEL_ROLES)[number];
|
|
224
|
-
declare const TEMPERATURE_POLICIES: readonly ["emit", "omit"];
|
|
225
|
-
type TemperaturePolicy = (typeof TEMPERATURE_POLICIES)[number];
|
|
226
|
-
declare const AI_PROVIDERS: readonly ["google", "openrouter", "openai", "azure_foundry", "anthropic", "bedrock", "mistral", "openai_compatible", "huggingface"];
|
|
227
|
-
type AIProvider = (typeof AI_PROVIDERS)[number];
|
|
228
|
-
declare const AI_PROVIDER_ADAPTER_KIND: {
|
|
229
|
-
readonly google: "tanstack";
|
|
230
|
-
readonly openrouter: "tanstack";
|
|
231
|
-
readonly openai: "tanstack";
|
|
232
|
-
readonly azure_foundry: "custom";
|
|
233
|
-
readonly anthropic: "tanstack";
|
|
234
|
-
readonly bedrock: "tanstack";
|
|
235
|
-
readonly mistral: "tanstack";
|
|
236
|
-
readonly openai_compatible: "custom";
|
|
237
|
-
readonly huggingface: "custom";
|
|
238
|
-
};
|
|
239
|
-
type TanStackAIProvider = { [TProvider in AIProvider]: (typeof AI_PROVIDER_ADAPTER_KIND)[TProvider] extends "tanstack" ? TProvider : never; }[AIProvider];
|
|
240
|
-
declare const TANSTACK_AI_PROVIDERS: readonly ["google", "openrouter", "openai", "anthropic", "bedrock", "mistral"];
|
|
241
|
-
declare const MODEL_CATALOG_PROVIDER_KIND: {
|
|
242
|
-
readonly google: "first-party";
|
|
243
|
-
readonly openrouter: "aggregator";
|
|
244
|
-
readonly openai: "first-party";
|
|
245
|
-
readonly anthropic: "first-party";
|
|
246
|
-
readonly bedrock: "platform";
|
|
247
|
-
readonly mistral: "first-party";
|
|
248
|
-
};
|
|
249
|
-
/** Providers whose picker IDs map directly to public first-party catalogs. */
|
|
250
|
-
type FirstPartyModelProvider = { [TProvider in TanStackAIProvider]: (typeof MODEL_CATALOG_PROVIDER_KIND)[TProvider] extends "first-party" ? TProvider : never; }[TanStackAIProvider];
|
|
251
|
-
declare const FIRST_PARTY_MODEL_PROVIDER_VALUES: readonly ["google", "openai", "anthropic", "mistral"];
|
|
252
|
-
/**
|
|
253
|
-
* Runtime form of the first-party provider union. The conditional annotation
|
|
254
|
-
* makes adding a first-party policy without adding its discovery implementation
|
|
255
|
-
* a compile error.
|
|
256
|
-
*/
|
|
257
|
-
declare const FIRST_PARTY_MODEL_PROVIDERS: Exclude<FirstPartyModelProvider, (typeof FIRST_PARTY_MODEL_PROVIDER_VALUES)[number]> extends never ? typeof FIRST_PARTY_MODEL_PROVIDER_VALUES : never;
|
|
258
|
-
/**
|
|
259
|
-
* Per-role default model IDs for the BYOK-capable cloud providers.
|
|
260
|
-
* Shared between the instance default table (`DEFAULT_MODELS`) and the
|
|
261
|
-
* settings-UI default selection, so a default is defined exactly once.
|
|
262
|
-
*/
|
|
263
|
-
declare const BYOK_DEFAULT_MODELS: {
|
|
264
|
-
readonly google: {
|
|
265
|
-
readonly fast: "gemini-3.7-flash";
|
|
266
|
-
readonly chat: "gemini-3.7-flash";
|
|
267
|
-
readonly reasoning: "gemini-3.7-flash";
|
|
268
|
-
readonly pdf: "gemini-3.7-flash";
|
|
269
|
-
};
|
|
270
|
-
readonly openrouter: {
|
|
271
|
-
readonly fast: "openai/gpt-5.6-luna";
|
|
272
|
-
readonly chat: "openai/gpt-5.6-terra";
|
|
273
|
-
readonly reasoning: "openai/gpt-5.6-terra";
|
|
274
|
-
readonly pdf: "openai/gpt-5.6-terra";
|
|
275
|
-
};
|
|
276
|
-
readonly openai: {
|
|
277
|
-
readonly fast: "gpt-5.4-nano";
|
|
278
|
-
readonly chat: "gpt-5.4-mini";
|
|
279
|
-
readonly reasoning: "gpt-5.4";
|
|
280
|
-
readonly pdf: "gpt-5.4";
|
|
281
|
-
};
|
|
282
|
-
readonly anthropic: {
|
|
283
|
-
readonly fast: "claude-opus-5";
|
|
284
|
-
readonly chat: "claude-opus-5";
|
|
285
|
-
readonly reasoning: "claude-opus-5";
|
|
286
|
-
readonly pdf: "claude-opus-5";
|
|
287
|
-
};
|
|
288
|
-
readonly bedrock: {
|
|
289
|
-
readonly fast: "us.amazon.nova-micro-v1:0";
|
|
290
|
-
readonly chat: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
291
|
-
readonly reasoning: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
292
|
-
readonly pdf: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
293
|
-
};
|
|
294
|
-
readonly mistral: {
|
|
295
|
-
readonly fast: "mistral-small-latest";
|
|
296
|
-
readonly chat: "mistral-medium-latest";
|
|
297
|
-
readonly reasoning: "magistral-medium-latest";
|
|
298
|
-
readonly pdf: "mistral-large-latest";
|
|
299
|
-
};
|
|
300
|
-
};
|
|
301
|
-
/**
|
|
302
|
-
* Instance-level default model IDs per provider. Extends the BYOK
|
|
303
|
-
* defaults with the providers that only the instance path uses
|
|
304
|
-
* (custom deployments and OpenAI-compatible endpoints).
|
|
305
|
-
*/
|
|
306
|
-
declare const DEFAULT_MODELS: {
|
|
307
|
-
readonly azure_foundry: {
|
|
308
|
-
readonly fast: "gpt-5.4-nano";
|
|
309
|
-
readonly chat: "gpt-5.4-mini";
|
|
310
|
-
readonly reasoning: "gpt-5.4";
|
|
311
|
-
readonly pdf: "gpt-5.4";
|
|
312
|
-
};
|
|
313
|
-
readonly openai_compatible: {
|
|
314
|
-
readonly fast: "default";
|
|
315
|
-
readonly chat: "default";
|
|
316
|
-
readonly reasoning: "default";
|
|
317
|
-
readonly pdf: "default";
|
|
318
|
-
};
|
|
319
|
-
readonly huggingface: {
|
|
320
|
-
readonly fast: "speakleash/Bielik-1.5B-v3.0-Instruct";
|
|
321
|
-
readonly chat: "speakleash/Bielik-11B-v2.3-Instruct";
|
|
322
|
-
readonly reasoning: "speakleash/Bielik-11B-v2.3-Instruct";
|
|
323
|
-
readonly pdf: "speakleash/Bielik-11B-v2.3-Instruct";
|
|
324
|
-
};
|
|
325
|
-
readonly google: {
|
|
326
|
-
readonly fast: "gemini-3.7-flash";
|
|
327
|
-
readonly chat: "gemini-3.7-flash";
|
|
328
|
-
readonly reasoning: "gemini-3.7-flash";
|
|
329
|
-
readonly pdf: "gemini-3.7-flash";
|
|
330
|
-
};
|
|
331
|
-
readonly openrouter: {
|
|
332
|
-
readonly fast: "openai/gpt-5.6-luna";
|
|
333
|
-
readonly chat: "openai/gpt-5.6-terra";
|
|
334
|
-
readonly reasoning: "openai/gpt-5.6-terra";
|
|
335
|
-
readonly pdf: "openai/gpt-5.6-terra";
|
|
336
|
-
};
|
|
337
|
-
readonly openai: {
|
|
338
|
-
readonly fast: "gpt-5.4-nano";
|
|
339
|
-
readonly chat: "gpt-5.4-mini";
|
|
340
|
-
readonly reasoning: "gpt-5.4";
|
|
341
|
-
readonly pdf: "gpt-5.4";
|
|
342
|
-
};
|
|
343
|
-
readonly anthropic: {
|
|
344
|
-
readonly fast: "claude-opus-5";
|
|
345
|
-
readonly chat: "claude-opus-5";
|
|
346
|
-
readonly reasoning: "claude-opus-5";
|
|
347
|
-
readonly pdf: "claude-opus-5";
|
|
348
|
-
};
|
|
349
|
-
readonly bedrock: {
|
|
350
|
-
readonly fast: "us.amazon.nova-micro-v1:0";
|
|
351
|
-
readonly chat: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
352
|
-
readonly reasoning: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
353
|
-
readonly pdf: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
354
|
-
};
|
|
355
|
-
readonly mistral: {
|
|
356
|
-
readonly fast: "mistral-small-latest";
|
|
357
|
-
readonly chat: "mistral-medium-latest";
|
|
358
|
-
readonly reasoning: "magistral-medium-latest";
|
|
359
|
-
readonly pdf: "mistral-large-latest";
|
|
360
|
-
};
|
|
361
|
-
};
|
|
2
|
+
//#region src/model-rate.d.ts
|
|
362
3
|
/**
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
* accepts.
|
|
367
|
-
*
|
|
368
|
-
* Limited to providers the TanStack AI integration supports for BYOK.
|
|
369
|
-
* Providers without a first-class TanStack adapter path are intentionally
|
|
370
|
-
* not accepted at this boundary.
|
|
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.
|
|
371
7
|
*/
|
|
372
|
-
declare const
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
8
|
+
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;
|
|
388
24
|
};
|
|
389
25
|
/**
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
* creator's icon while their routing provider remains available separately.
|
|
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.
|
|
394
29
|
*/
|
|
395
|
-
|
|
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
|
+
declare const getStandardModelRate: (rate: ModelRate) => ModelRateAmounts;
|
|
41
|
+
declare const resolveModelRate: (rate: ModelRate, inputTokens: number) => ModelRateAmounts;
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/model-rates.gen.d.ts
|
|
44
|
+
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
|
+
};
|
|
396
51
|
readonly "gemini-3.7-flash": {
|
|
397
|
-
readonly
|
|
398
|
-
readonly
|
|
52
|
+
readonly kind: "flat";
|
|
53
|
+
readonly inputPerMTok: 75000;
|
|
54
|
+
readonly outputPerMTok: 375000;
|
|
55
|
+
readonly cachedInputPerMTok: 7500;
|
|
399
56
|
};
|
|
400
57
|
readonly "gemini-3.6-flash": {
|
|
401
|
-
readonly
|
|
402
|
-
readonly
|
|
58
|
+
readonly kind: "flat";
|
|
59
|
+
readonly inputPerMTok: 75000;
|
|
60
|
+
readonly outputPerMTok: 375000;
|
|
61
|
+
readonly cachedInputPerMTok: 7500;
|
|
403
62
|
};
|
|
404
63
|
readonly "gemini-3.5-flash-lite": {
|
|
405
|
-
readonly
|
|
406
|
-
readonly
|
|
64
|
+
readonly kind: "flat";
|
|
65
|
+
readonly inputPerMTok: 30000;
|
|
66
|
+
readonly outputPerMTok: 250000;
|
|
67
|
+
readonly cachedInputPerMTok: 3000;
|
|
407
68
|
};
|
|
408
69
|
readonly "gemini-3.1-pro-preview": {
|
|
409
|
-
readonly
|
|
410
|
-
readonly
|
|
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
|
+
};
|
|
411
82
|
};
|
|
412
83
|
readonly "gemini-3.5-flash": {
|
|
413
|
-
readonly
|
|
414
|
-
readonly
|
|
84
|
+
readonly kind: "flat";
|
|
85
|
+
readonly inputPerMTok: 150000;
|
|
86
|
+
readonly outputPerMTok: 900000;
|
|
87
|
+
readonly cachedInputPerMTok: 15000;
|
|
415
88
|
};
|
|
416
89
|
readonly "gemini-3.1-flash-lite": {
|
|
417
|
-
readonly
|
|
418
|
-
readonly
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
readonly displayName: "Claude Sonnet 5";
|
|
422
|
-
readonly iconProvider: "anthropic";
|
|
423
|
-
};
|
|
424
|
-
readonly "claude-fable-5-1": {
|
|
425
|
-
readonly displayName: "Claude Fable 5.1";
|
|
426
|
-
readonly iconProvider: "anthropic";
|
|
427
|
-
};
|
|
428
|
-
readonly "claude-fable-5": {
|
|
429
|
-
readonly displayName: "Claude Fable 5";
|
|
430
|
-
readonly iconProvider: "anthropic";
|
|
431
|
-
};
|
|
432
|
-
readonly "claude-opus-5": {
|
|
433
|
-
readonly displayName: "Claude Opus 5";
|
|
434
|
-
readonly iconProvider: "anthropic";
|
|
435
|
-
};
|
|
436
|
-
readonly "claude-opus-4-8": {
|
|
437
|
-
readonly displayName: "Claude Opus 4.8";
|
|
438
|
-
readonly iconProvider: "anthropic";
|
|
439
|
-
};
|
|
440
|
-
readonly "claude-opus-4-7": {
|
|
441
|
-
readonly displayName: "Claude Opus 4.7";
|
|
442
|
-
readonly iconProvider: "anthropic";
|
|
443
|
-
};
|
|
444
|
-
readonly "claude-sonnet-4-6": {
|
|
445
|
-
readonly displayName: "Claude Sonnet 4.6";
|
|
446
|
-
readonly iconProvider: "anthropic";
|
|
447
|
-
};
|
|
448
|
-
readonly "claude-opus-4-6": {
|
|
449
|
-
readonly displayName: "Claude Opus 4.6";
|
|
450
|
-
readonly iconProvider: "anthropic";
|
|
451
|
-
};
|
|
452
|
-
readonly "claude-haiku-4-5-20251001": {
|
|
453
|
-
readonly displayName: "Claude Haiku 4.5";
|
|
454
|
-
readonly iconProvider: "anthropic";
|
|
90
|
+
readonly kind: "flat";
|
|
91
|
+
readonly inputPerMTok: 25000;
|
|
92
|
+
readonly outputPerMTok: 150000;
|
|
93
|
+
readonly cachedInputPerMTok: 2500;
|
|
455
94
|
};
|
|
456
95
|
readonly "gpt-5.6": {
|
|
457
|
-
readonly
|
|
458
|
-
readonly
|
|
96
|
+
readonly kind: "input-token-tiered";
|
|
97
|
+
readonly inputTokenThreshold: 272000;
|
|
98
|
+
readonly standard: {
|
|
99
|
+
readonly inputPerMTok: 400000;
|
|
100
|
+
readonly outputPerMTok: 2000000;
|
|
101
|
+
readonly cachedInputPerMTok: 40000;
|
|
102
|
+
readonly cachedWriteInputPerMTok: 500000;
|
|
103
|
+
};
|
|
104
|
+
readonly aboveThreshold: {
|
|
105
|
+
readonly inputPerMTok: 800000;
|
|
106
|
+
readonly outputPerMTok: 3000000;
|
|
107
|
+
readonly cachedInputPerMTok: 80000;
|
|
108
|
+
readonly cachedWriteInputPerMTok: 1000000;
|
|
109
|
+
};
|
|
459
110
|
};
|
|
460
111
|
readonly "gpt-5.6-terra": {
|
|
461
|
-
readonly
|
|
462
|
-
readonly
|
|
112
|
+
readonly kind: "input-token-tiered";
|
|
113
|
+
readonly inputTokenThreshold: 272000;
|
|
114
|
+
readonly standard: {
|
|
115
|
+
readonly inputPerMTok: 200000;
|
|
116
|
+
readonly outputPerMTok: 1200000;
|
|
117
|
+
readonly cachedInputPerMTok: 20000;
|
|
118
|
+
readonly cachedWriteInputPerMTok: 250000;
|
|
119
|
+
};
|
|
120
|
+
readonly aboveThreshold: {
|
|
121
|
+
readonly inputPerMTok: 400000;
|
|
122
|
+
readonly outputPerMTok: 1800000;
|
|
123
|
+
readonly cachedInputPerMTok: 40000;
|
|
124
|
+
readonly cachedWriteInputPerMTok: 500000;
|
|
125
|
+
};
|
|
463
126
|
};
|
|
464
127
|
readonly "gpt-5.6-luna": {
|
|
465
|
-
readonly
|
|
466
|
-
readonly
|
|
128
|
+
readonly kind: "input-token-tiered";
|
|
129
|
+
readonly inputTokenThreshold: 272000;
|
|
130
|
+
readonly standard: {
|
|
131
|
+
readonly inputPerMTok: 20000;
|
|
132
|
+
readonly outputPerMTok: 120000;
|
|
133
|
+
readonly cachedInputPerMTok: 2000;
|
|
134
|
+
readonly cachedWriteInputPerMTok: 25000;
|
|
135
|
+
};
|
|
136
|
+
readonly aboveThreshold: {
|
|
137
|
+
readonly inputPerMTok: 40000;
|
|
138
|
+
readonly outputPerMTok: 180000;
|
|
139
|
+
readonly cachedInputPerMTok: 4000;
|
|
140
|
+
readonly cachedWriteInputPerMTok: 50000;
|
|
141
|
+
};
|
|
467
142
|
};
|
|
468
143
|
readonly "gpt-5.5": {
|
|
469
|
-
readonly
|
|
470
|
-
readonly
|
|
144
|
+
readonly kind: "input-token-tiered";
|
|
145
|
+
readonly inputTokenThreshold: 272000;
|
|
146
|
+
readonly standard: {
|
|
147
|
+
readonly inputPerMTok: 500000;
|
|
148
|
+
readonly outputPerMTok: 3000000;
|
|
149
|
+
readonly cachedInputPerMTok: 50000;
|
|
150
|
+
};
|
|
151
|
+
readonly aboveThreshold: {
|
|
152
|
+
readonly inputPerMTok: 1000000;
|
|
153
|
+
readonly outputPerMTok: 4500000;
|
|
154
|
+
readonly cachedInputPerMTok: 100000;
|
|
155
|
+
};
|
|
471
156
|
};
|
|
472
157
|
readonly "gpt-5.4": {
|
|
473
|
-
readonly
|
|
474
|
-
readonly
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
readonly displayName: "GPT-5.2";
|
|
486
|
-
readonly iconProvider: "openai";
|
|
487
|
-
};
|
|
488
|
-
readonly "openai/gpt-5.6-luna": {
|
|
489
|
-
readonly displayName: "GPT-5.6 Luna";
|
|
490
|
-
readonly iconProvider: "openai";
|
|
491
|
-
};
|
|
492
|
-
readonly "openai/gpt-5.6-terra": {
|
|
493
|
-
readonly displayName: "GPT-5.6 Terra";
|
|
494
|
-
readonly iconProvider: "openai";
|
|
158
|
+
readonly kind: "input-token-tiered";
|
|
159
|
+
readonly inputTokenThreshold: 272000;
|
|
160
|
+
readonly standard: {
|
|
161
|
+
readonly inputPerMTok: 250000;
|
|
162
|
+
readonly outputPerMTok: 1500000;
|
|
163
|
+
readonly cachedInputPerMTok: 25000;
|
|
164
|
+
};
|
|
165
|
+
readonly aboveThreshold: {
|
|
166
|
+
readonly inputPerMTok: 500000;
|
|
167
|
+
readonly outputPerMTok: 2250000;
|
|
168
|
+
readonly cachedInputPerMTok: 50000;
|
|
169
|
+
};
|
|
495
170
|
};
|
|
496
|
-
readonly "
|
|
497
|
-
readonly
|
|
498
|
-
readonly
|
|
171
|
+
readonly "gpt-5.4-mini": {
|
|
172
|
+
readonly kind: "flat";
|
|
173
|
+
readonly inputPerMTok: 75000;
|
|
174
|
+
readonly outputPerMTok: 450000;
|
|
175
|
+
readonly cachedInputPerMTok: 7500;
|
|
499
176
|
};
|
|
500
|
-
readonly "
|
|
501
|
-
readonly
|
|
502
|
-
readonly
|
|
177
|
+
readonly "gpt-5.4-nano": {
|
|
178
|
+
readonly kind: "flat";
|
|
179
|
+
readonly inputPerMTok: 20000;
|
|
180
|
+
readonly outputPerMTok: 125000;
|
|
181
|
+
readonly cachedInputPerMTok: 2000;
|
|
503
182
|
};
|
|
504
|
-
readonly "
|
|
505
|
-
readonly
|
|
506
|
-
readonly
|
|
183
|
+
readonly "gpt-5.2": {
|
|
184
|
+
readonly kind: "flat";
|
|
185
|
+
readonly inputPerMTok: 175000;
|
|
186
|
+
readonly outputPerMTok: 1400000;
|
|
187
|
+
readonly cachedInputPerMTok: 17500;
|
|
507
188
|
};
|
|
508
|
-
readonly "
|
|
509
|
-
readonly
|
|
510
|
-
readonly
|
|
189
|
+
readonly "claude-sonnet-5": {
|
|
190
|
+
readonly kind: "flat";
|
|
191
|
+
readonly inputPerMTok: 200000;
|
|
192
|
+
readonly outputPerMTok: 1000000;
|
|
193
|
+
readonly cachedInputPerMTok: 20000;
|
|
194
|
+
readonly cachedWriteInputPerMTok: 250000;
|
|
511
195
|
};
|
|
512
|
-
readonly "
|
|
513
|
-
readonly
|
|
514
|
-
readonly
|
|
196
|
+
readonly "claude-fable-5-1": {
|
|
197
|
+
readonly kind: "flat";
|
|
198
|
+
readonly inputPerMTok: 1000000;
|
|
199
|
+
readonly outputPerMTok: 5000000;
|
|
200
|
+
readonly cachedInputPerMTok: 25000;
|
|
201
|
+
readonly cachedWriteInputPerMTok: 1250000;
|
|
515
202
|
};
|
|
516
|
-
readonly "
|
|
517
|
-
readonly
|
|
518
|
-
readonly
|
|
203
|
+
readonly "claude-fable-5": {
|
|
204
|
+
readonly kind: "flat";
|
|
205
|
+
readonly inputPerMTok: 1000000;
|
|
206
|
+
readonly outputPerMTok: 5000000;
|
|
207
|
+
readonly cachedInputPerMTok: 100000;
|
|
208
|
+
readonly cachedWriteInputPerMTok: 1250000;
|
|
519
209
|
};
|
|
520
|
-
readonly "
|
|
521
|
-
readonly
|
|
522
|
-
readonly
|
|
210
|
+
readonly "claude-opus-5": {
|
|
211
|
+
readonly kind: "flat";
|
|
212
|
+
readonly inputPerMTok: 500000;
|
|
213
|
+
readonly outputPerMTok: 2500000;
|
|
214
|
+
readonly cachedInputPerMTok: 50000;
|
|
215
|
+
readonly cachedWriteInputPerMTok: 625000;
|
|
523
216
|
};
|
|
524
|
-
readonly "
|
|
525
|
-
readonly
|
|
526
|
-
readonly
|
|
217
|
+
readonly "claude-opus-4-8": {
|
|
218
|
+
readonly kind: "flat";
|
|
219
|
+
readonly inputPerMTok: 500000;
|
|
220
|
+
readonly outputPerMTok: 2500000;
|
|
221
|
+
readonly cachedInputPerMTok: 50000;
|
|
222
|
+
readonly cachedWriteInputPerMTok: 625000;
|
|
527
223
|
};
|
|
528
|
-
readonly "
|
|
529
|
-
readonly
|
|
530
|
-
readonly
|
|
224
|
+
readonly "claude-opus-4-7": {
|
|
225
|
+
readonly kind: "flat";
|
|
226
|
+
readonly inputPerMTok: 500000;
|
|
227
|
+
readonly outputPerMTok: 2500000;
|
|
228
|
+
readonly cachedInputPerMTok: 50000;
|
|
229
|
+
readonly cachedWriteInputPerMTok: 625000;
|
|
531
230
|
};
|
|
532
|
-
readonly "
|
|
533
|
-
readonly
|
|
534
|
-
readonly
|
|
231
|
+
readonly "claude-sonnet-4-6": {
|
|
232
|
+
readonly kind: "flat";
|
|
233
|
+
readonly inputPerMTok: 300000;
|
|
234
|
+
readonly outputPerMTok: 1500000;
|
|
235
|
+
readonly cachedInputPerMTok: 30000;
|
|
236
|
+
readonly cachedWriteInputPerMTok: 375000;
|
|
535
237
|
};
|
|
536
|
-
readonly "
|
|
537
|
-
readonly
|
|
538
|
-
readonly
|
|
238
|
+
readonly "claude-opus-4-6": {
|
|
239
|
+
readonly kind: "flat";
|
|
240
|
+
readonly inputPerMTok: 500000;
|
|
241
|
+
readonly outputPerMTok: 2500000;
|
|
242
|
+
readonly cachedInputPerMTok: 50000;
|
|
243
|
+
readonly cachedWriteInputPerMTok: 625000;
|
|
539
244
|
};
|
|
540
|
-
readonly "
|
|
541
|
-
readonly
|
|
542
|
-
readonly
|
|
245
|
+
readonly "claude-haiku-4-5-20251001": {
|
|
246
|
+
readonly kind: "flat";
|
|
247
|
+
readonly inputPerMTok: 100000;
|
|
248
|
+
readonly outputPerMTok: 500000;
|
|
249
|
+
readonly cachedInputPerMTok: 10000;
|
|
250
|
+
readonly cachedWriteInputPerMTok: 125000;
|
|
543
251
|
};
|
|
544
252
|
readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": {
|
|
545
|
-
readonly
|
|
546
|
-
readonly
|
|
253
|
+
readonly kind: "flat";
|
|
254
|
+
readonly inputPerMTok: 300000;
|
|
255
|
+
readonly outputPerMTok: 1500000;
|
|
256
|
+
readonly cachedInputPerMTok: 30000;
|
|
257
|
+
readonly cachedWriteInputPerMTok: 375000;
|
|
547
258
|
};
|
|
548
259
|
readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": {
|
|
549
|
-
readonly
|
|
550
|
-
readonly
|
|
260
|
+
readonly kind: "flat";
|
|
261
|
+
readonly inputPerMTok: 100000;
|
|
262
|
+
readonly outputPerMTok: 500000;
|
|
263
|
+
readonly cachedInputPerMTok: 10000;
|
|
264
|
+
readonly cachedWriteInputPerMTok: 125000;
|
|
551
265
|
};
|
|
552
266
|
readonly "us.amazon.nova-pro-v1:0": {
|
|
553
|
-
readonly
|
|
554
|
-
readonly
|
|
267
|
+
readonly kind: "flat";
|
|
268
|
+
readonly inputPerMTok: 80000;
|
|
269
|
+
readonly outputPerMTok: 320000;
|
|
270
|
+
readonly cachedInputPerMTok: 20000;
|
|
555
271
|
};
|
|
556
272
|
readonly "us.amazon.nova-lite-v1:0": {
|
|
557
|
-
readonly
|
|
558
|
-
readonly
|
|
273
|
+
readonly kind: "flat";
|
|
274
|
+
readonly inputPerMTok: 6000;
|
|
275
|
+
readonly outputPerMTok: 24000;
|
|
276
|
+
readonly cachedInputPerMTok: 1500;
|
|
559
277
|
};
|
|
560
278
|
readonly "us.amazon.nova-micro-v1:0": {
|
|
561
|
-
readonly
|
|
562
|
-
readonly
|
|
279
|
+
readonly kind: "flat";
|
|
280
|
+
readonly inputPerMTok: 3500;
|
|
281
|
+
readonly outputPerMTok: 14000;
|
|
282
|
+
readonly cachedInputPerMTok: 875;
|
|
563
283
|
};
|
|
564
284
|
readonly "openai.gpt-oss-120b-1:0": {
|
|
565
|
-
readonly
|
|
566
|
-
readonly
|
|
285
|
+
readonly kind: "flat";
|
|
286
|
+
readonly inputPerMTok: 15000;
|
|
287
|
+
readonly outputPerMTok: 60000;
|
|
567
288
|
};
|
|
568
289
|
readonly "openai.gpt-oss-20b-1:0": {
|
|
569
|
-
readonly
|
|
570
|
-
readonly
|
|
290
|
+
readonly kind: "flat";
|
|
291
|
+
readonly inputPerMTok: 7000;
|
|
292
|
+
readonly outputPerMTok: 30000;
|
|
571
293
|
};
|
|
572
294
|
readonly "us.deepseek.r1-v1:0": {
|
|
573
|
-
readonly
|
|
574
|
-
readonly
|
|
295
|
+
readonly kind: "flat";
|
|
296
|
+
readonly inputPerMTok: 135000;
|
|
297
|
+
readonly outputPerMTok: 540000;
|
|
575
298
|
};
|
|
576
299
|
readonly "mistral-large-latest": {
|
|
577
|
-
readonly
|
|
578
|
-
readonly
|
|
300
|
+
readonly kind: "flat";
|
|
301
|
+
readonly inputPerMTok: 50000;
|
|
302
|
+
readonly outputPerMTok: 150000;
|
|
579
303
|
};
|
|
580
304
|
readonly "mistral-medium-latest": {
|
|
581
|
-
readonly
|
|
582
|
-
readonly
|
|
305
|
+
readonly kind: "flat";
|
|
306
|
+
readonly inputPerMTok: 150000;
|
|
307
|
+
readonly outputPerMTok: 750000;
|
|
583
308
|
};
|
|
584
309
|
readonly "mistral-small-latest": {
|
|
585
|
-
readonly
|
|
586
|
-
readonly
|
|
310
|
+
readonly kind: "flat";
|
|
311
|
+
readonly inputPerMTok: 15000;
|
|
312
|
+
readonly outputPerMTok: 60000;
|
|
587
313
|
};
|
|
588
314
|
readonly "magistral-medium-latest": {
|
|
589
|
-
readonly
|
|
590
|
-
readonly
|
|
315
|
+
readonly kind: "flat";
|
|
316
|
+
readonly inputPerMTok: 200000;
|
|
317
|
+
readonly outputPerMTok: 500000;
|
|
591
318
|
};
|
|
592
319
|
readonly "magistral-small": {
|
|
593
|
-
readonly
|
|
594
|
-
readonly
|
|
320
|
+
readonly kind: "flat";
|
|
321
|
+
readonly inputPerMTok: 50000;
|
|
322
|
+
readonly outputPerMTok: 150000;
|
|
595
323
|
};
|
|
596
324
|
readonly "pixtral-large-latest": {
|
|
597
|
-
readonly
|
|
598
|
-
readonly
|
|
325
|
+
readonly kind: "flat";
|
|
326
|
+
readonly inputPerMTok: 200000;
|
|
327
|
+
readonly outputPerMTok: 600000;
|
|
328
|
+
};
|
|
329
|
+
readonly "gemini-2.5-flash": {
|
|
330
|
+
readonly kind: "flat";
|
|
331
|
+
readonly inputPerMTok: 30000;
|
|
332
|
+
readonly outputPerMTok: 250000;
|
|
333
|
+
readonly cachedInputPerMTok: 3000;
|
|
334
|
+
};
|
|
335
|
+
readonly "gemini-2.5-pro": {
|
|
336
|
+
readonly kind: "input-token-tiered";
|
|
337
|
+
readonly inputTokenThreshold: 200000;
|
|
338
|
+
readonly standard: {
|
|
339
|
+
readonly inputPerMTok: 125000;
|
|
340
|
+
readonly outputPerMTok: 1000000;
|
|
341
|
+
readonly cachedInputPerMTok: 12500;
|
|
342
|
+
};
|
|
343
|
+
readonly aboveThreshold: {
|
|
344
|
+
readonly inputPerMTok: 250000;
|
|
345
|
+
readonly outputPerMTok: 1500000;
|
|
346
|
+
readonly cachedInputPerMTok: 25000;
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
readonly "gpt-4o-mini": {
|
|
350
|
+
readonly kind: "flat";
|
|
351
|
+
readonly inputPerMTok: 15000;
|
|
352
|
+
readonly outputPerMTok: 60000;
|
|
353
|
+
readonly cachedInputPerMTok: 7500;
|
|
354
|
+
};
|
|
355
|
+
readonly "gpt-4o": {
|
|
356
|
+
readonly kind: "flat";
|
|
357
|
+
readonly inputPerMTok: 250000;
|
|
358
|
+
readonly outputPerMTok: 1000000;
|
|
359
|
+
readonly cachedInputPerMTok: 125000;
|
|
599
360
|
};
|
|
600
361
|
};
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
readonly
|
|
609
|
-
readonly openrouter: readonly ["openai/gpt-5.6-luna", "openai/gpt-5.6-terra", "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", "anthropic/claude-opus-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6", "openai/gpt-5.5", "openai/gpt-5.4-mini"];
|
|
610
|
-
readonly openai: readonly ["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"];
|
|
611
|
-
readonly anthropic: readonly ["claude-sonnet-5", "claude-fable-5-1", "claude-fable-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"];
|
|
612
|
-
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"];
|
|
613
|
-
readonly mistral: readonly [];
|
|
614
|
-
};
|
|
615
|
-
declare const isBYOKProviderRoleSupported: ({ provider, role }: {
|
|
616
|
-
provider: BYOKProvider;
|
|
617
|
-
role: ModelRole;
|
|
618
|
-
}) => boolean;
|
|
619
|
-
declare const isBYOKModelRoleSupported: ({ provider, modelId, role }: {
|
|
620
|
-
provider: BYOKProvider;
|
|
621
|
-
modelId: string;
|
|
622
|
-
role: ModelRole;
|
|
623
|
-
}) => boolean;
|
|
624
|
-
/**
|
|
625
|
-
* Models whose provider adapter can receive a PDF `document` content part in a
|
|
626
|
-
* chat turn without throwing. This is a narrower, runtime question than the
|
|
627
|
-
* pdf ROLE (`BYOK_DOCUMENT_INPUT_MODEL_OPTIONS`, which curates model selection
|
|
628
|
-
* for PDF-processing flows): it only asks "will the chat stream survive this
|
|
629
|
-
* attachment." The Mistral text adapter maps PDF `document` parts to
|
|
630
|
-
* `document_url`, so its
|
|
631
|
-
* vision models accept PDF attachments even though Mistral is deliberately not
|
|
632
|
-
* offered as a pdf-role provider. Mistral's `document_url` takes PDF but NOT
|
|
633
|
-
* textual documents (docx/txt/csv/md), so those still gate on
|
|
634
|
-
* `BYOK_DOCUMENT_INPUT_MODEL_OPTIONS` (which excludes Mistral). Superset
|
|
635
|
-
* invariant: every pdf-role document model also accepts a PDF chat attachment.
|
|
636
|
-
*/
|
|
637
|
-
declare const CHAT_PDF_ATTACHMENT_MODEL_OPTIONS: {
|
|
638
|
-
readonly mistral: readonly ["mistral-medium-latest", "mistral-small-latest", "pixtral-large-latest"];
|
|
639
|
-
readonly google: readonly ["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"];
|
|
640
|
-
readonly openrouter: readonly ["openai/gpt-5.6-luna", "openai/gpt-5.6-terra", "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", "anthropic/claude-opus-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6", "openai/gpt-5.5", "openai/gpt-5.4-mini"];
|
|
641
|
-
readonly openai: readonly ["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"];
|
|
642
|
-
readonly anthropic: readonly ["claude-sonnet-5", "claude-fable-5-1", "claude-fable-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"];
|
|
643
|
-
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"];
|
|
362
|
+
//#endregion
|
|
363
|
+
//#region src/model-rate-policy.d.ts
|
|
364
|
+
declare const MODELS_DEV_RATE_PROVIDER_BY_CATALOG_PROVIDER: {
|
|
365
|
+
readonly google: "google";
|
|
366
|
+
readonly openai: "openai";
|
|
367
|
+
readonly anthropic: "anthropic";
|
|
368
|
+
readonly bedrock: "amazon-bedrock";
|
|
369
|
+
readonly mistral: "mistral";
|
|
644
370
|
};
|
|
645
|
-
|
|
646
|
-
provider: BYOKProvider;
|
|
647
|
-
modelId: string;
|
|
648
|
-
}) => boolean;
|
|
371
|
+
type ModelsDevRateProvider = (typeof MODELS_DEV_RATE_PROVIDER_BY_CATALOG_PROVIDER)[keyof typeof MODELS_DEV_RATE_PROVIDER_BY_CATALOG_PROVIDER];
|
|
649
372
|
/**
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
* default (`BYOK_DEFAULT_MODELS`). Returns `null` only when the
|
|
654
|
-
* provider has no valid model for the role at all — the sole case
|
|
655
|
-
* today is `mistral` + `pdf`, because the TanStack Mistral adapter
|
|
656
|
-
* exposes no `document` input modality, so no Mistral model (not even
|
|
657
|
-
* the default) can serve the PDF role.
|
|
658
|
-
*
|
|
659
|
-
* Used to auto-heal org AI configs whose pinned model was removed by a
|
|
660
|
-
* catalog bump, so generation resolves to a supported model instead of
|
|
661
|
-
* 400-ing (or forwarding a retired id to the provider).
|
|
373
|
+
* Explicit source coordinates for non-offered model IDs that remain valid in
|
|
374
|
+
* deployment overrides and usage attribution. Their numeric rates still come
|
|
375
|
+
* exclusively from models.dev.
|
|
662
376
|
*/
|
|
663
|
-
declare const
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
}
|
|
377
|
+
declare const RETAINED_MODELS_DEV_RATE_ENTRIES: {
|
|
378
|
+
readonly "gemini-2.5-flash": {
|
|
379
|
+
readonly modelId: "gemini-2.5-flash";
|
|
380
|
+
readonly provider: "google";
|
|
381
|
+
};
|
|
382
|
+
readonly "gemini-2.5-pro": {
|
|
383
|
+
readonly modelId: "gemini-2.5-pro";
|
|
384
|
+
readonly provider: "google";
|
|
385
|
+
};
|
|
386
|
+
readonly "gpt-4o-mini": {
|
|
387
|
+
readonly modelId: "gpt-4o-mini";
|
|
388
|
+
readonly provider: "openai";
|
|
389
|
+
};
|
|
390
|
+
readonly "gpt-4o": {
|
|
391
|
+
readonly modelId: "gpt-4o";
|
|
392
|
+
readonly provider: "openai";
|
|
393
|
+
};
|
|
394
|
+
};
|
|
668
395
|
/**
|
|
669
|
-
*
|
|
670
|
-
*
|
|
671
|
-
*
|
|
672
|
-
* offered above must appear here or it will 400 on the reasoning role.
|
|
396
|
+
* Exact mappings where Stella uses a provider routing ID while models.dev
|
|
397
|
+
* publishes pricing under the corresponding base model ID. Generation rejects
|
|
398
|
+
* a mapping once models.dev begins publishing the Stella ID directly.
|
|
673
399
|
*/
|
|
674
|
-
declare const
|
|
400
|
+
declare const MODELS_DEV_RATE_SOURCE_ALIASES: {
|
|
401
|
+
readonly "us.amazon.nova-pro-v1:0": {
|
|
402
|
+
readonly modelId: "amazon.nova-pro-v1:0";
|
|
403
|
+
readonly provider: "amazon-bedrock";
|
|
404
|
+
readonly reason: string;
|
|
405
|
+
readonly sourceUrl: "https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html";
|
|
406
|
+
};
|
|
407
|
+
readonly "us.amazon.nova-lite-v1:0": {
|
|
408
|
+
readonly modelId: "amazon.nova-lite-v1:0";
|
|
409
|
+
readonly provider: "amazon-bedrock";
|
|
410
|
+
readonly reason: string;
|
|
411
|
+
readonly sourceUrl: "https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html";
|
|
412
|
+
};
|
|
413
|
+
readonly "us.amazon.nova-micro-v1:0": {
|
|
414
|
+
readonly modelId: "amazon.nova-micro-v1:0";
|
|
415
|
+
readonly provider: "amazon-bedrock";
|
|
416
|
+
readonly reason: string;
|
|
417
|
+
readonly sourceUrl: "https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html";
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/capabilities-overrides.d.ts
|
|
675
422
|
/**
|
|
676
|
-
*
|
|
677
|
-
*
|
|
678
|
-
*
|
|
679
|
-
*
|
|
423
|
+
* Hand-declared capabilities for offered models that models.dev does
|
|
424
|
+
* not cover. The capability generator
|
|
425
|
+
* (`packages/scripts/src/model-catalog-capabilities-gen.ts`) refuses
|
|
426
|
+
* an override for any model the upstream source covers, so manual
|
|
427
|
+
* data cannot shadow sourced data — this file can only ever fill
|
|
428
|
+
* genuine gaps, each with a dated justification.
|
|
680
429
|
*/
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
430
|
+
type CapabilityOverride = {
|
|
431
|
+
documentInput: boolean;
|
|
432
|
+
documentInputReason: string;
|
|
433
|
+
reasoningEfforts: readonly ReasoningEffort[] | null;
|
|
434
|
+
temperatureSupported: boolean;
|
|
435
|
+
/** Why the upstream source cannot answer for this model. Dated. */
|
|
436
|
+
reason: string;
|
|
437
|
+
};
|
|
438
|
+
declare const CAPABILITY_OVERRIDES: Partial<Record<OfferedBYOKModelId, CapabilityOverride>>;
|
|
439
|
+
//#endregion
|
|
440
|
+
//#region src/document-input-overrides.d.ts
|
|
441
|
+
type DocumentInputOverride = {
|
|
442
|
+
/** Whether the model accepts a PDF/file content part. */
|
|
443
|
+
supported: boolean;
|
|
444
|
+
/** Why the live catalogue cannot answer correctly. Dated. */
|
|
445
|
+
reason: string;
|
|
446
|
+
};
|
|
684
447
|
/**
|
|
685
|
-
*
|
|
686
|
-
*
|
|
687
|
-
*
|
|
688
|
-
* (e.g. `"none"` to a model whose reasoning cannot be disabled) —
|
|
689
|
-
* that mistake now fails typecheck instead of 502-ing at runtime.
|
|
448
|
+
* Reviewed document-input corrections for models.dev records that exist but
|
|
449
|
+
* under-report the provider API's file-input support. The generator rejects an
|
|
450
|
+
* override once upstream agrees, so sourced data takes ownership automatically.
|
|
690
451
|
*/
|
|
691
|
-
|
|
452
|
+
declare const DOCUMENT_INPUT_OVERRIDES: Partial<Record<OfferedBYOKModelId, DocumentInputOverride>>;
|
|
453
|
+
//#endregion
|
|
454
|
+
//#region src/capabilities.gen.d.ts
|
|
692
455
|
/**
|
|
693
|
-
*
|
|
694
|
-
*
|
|
695
|
-
*
|
|
456
|
+
* Reasoning-effort values each offered model accepts, `null` when the
|
|
457
|
+
* model exposes no effort-style reasoning control. A missing `"none"`
|
|
458
|
+
* means the model's reasoning cannot be disabled; consumers must go
|
|
459
|
+
* through `resolveReasoningEffort`.
|
|
696
460
|
*/
|
|
461
|
+
declare const MODEL_REASONING_EFFORTS: {
|
|
462
|
+
readonly "gemini-3.8-flash": readonly ["low", "medium", "high"];
|
|
463
|
+
readonly "gemini-3.7-flash": readonly ["low", "medium", "high"];
|
|
464
|
+
readonly "gemini-3.6-flash": readonly ["minimal", "low", "medium", "high"];
|
|
465
|
+
readonly "gemini-3.5-flash-lite": readonly ["minimal", "low", "medium", "high"];
|
|
466
|
+
readonly "gemini-3.1-pro-preview": readonly ["low", "medium", "high"];
|
|
467
|
+
readonly "gemini-3.5-flash": readonly ["minimal", "low", "medium", "high"];
|
|
468
|
+
readonly "gemini-3.1-flash-lite": readonly ["minimal", "low", "medium", "high"];
|
|
469
|
+
readonly "openai/gpt-5.6-luna": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
470
|
+
readonly "openai/gpt-5.6-terra": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
471
|
+
readonly "google/gemini-3.8-flash": readonly ["low", "medium", "high"];
|
|
472
|
+
readonly "google/gemini-3.7-flash": readonly ["low", "medium", "high"];
|
|
473
|
+
readonly "google/gemini-3.6-flash": readonly ["minimal", "low", "medium", "high"];
|
|
474
|
+
readonly "google/gemini-3.5-flash-lite": readonly ["minimal", "low", "medium", "high"];
|
|
475
|
+
readonly "google/gemini-3.1-pro-preview": readonly ["low", "medium", "high"];
|
|
476
|
+
readonly "google/gemini-3.5-flash": readonly ["minimal", "low", "medium", "high"];
|
|
477
|
+
readonly "google/gemini-3.1-flash-lite": readonly ["none", "minimal", "low", "medium", "high"];
|
|
478
|
+
readonly "anthropic/claude-sonnet-5": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
479
|
+
readonly "anthropic/claude-opus-5": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
480
|
+
readonly "anthropic/claude-opus-4.8": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
481
|
+
readonly "anthropic/claude-sonnet-4.6": readonly ["none", "low", "medium", "high", "max"];
|
|
482
|
+
readonly "openai/gpt-5.5": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
483
|
+
readonly "openai/gpt-5.4-mini": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
484
|
+
readonly "gpt-5.6": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
485
|
+
readonly "gpt-5.6-terra": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
486
|
+
readonly "gpt-5.6-luna": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
487
|
+
readonly "gpt-5.5": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
488
|
+
readonly "gpt-5.4": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
489
|
+
readonly "gpt-5.4-mini": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
490
|
+
readonly "gpt-5.4-nano": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
491
|
+
readonly "gpt-5.2": readonly ["none", "low", "medium", "high", "xhigh"];
|
|
492
|
+
readonly "claude-sonnet-5": readonly ["none", "low", "medium", "high", "xhigh", "max"];
|
|
493
|
+
readonly "claude-fable-5-1": readonly ["low", "medium", "high", "xhigh", "max"];
|
|
494
|
+
readonly "claude-fable-5": readonly ["low", "medium", "high", "xhigh", "max"];
|
|
495
|
+
readonly "claude-opus-5": readonly ["low", "medium", "high", "xhigh", "max"];
|
|
496
|
+
readonly "claude-opus-4-8": readonly ["low", "medium", "high", "xhigh", "max"];
|
|
497
|
+
readonly "claude-opus-4-7": readonly ["low", "medium", "high", "xhigh", "max"];
|
|
498
|
+
readonly "claude-sonnet-4-6": readonly ["low", "medium", "high", "max"];
|
|
499
|
+
readonly "claude-opus-4-6": readonly ["low", "medium", "high", "max"];
|
|
500
|
+
readonly "claude-haiku-4-5-20251001": null;
|
|
501
|
+
readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": null;
|
|
502
|
+
readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": null;
|
|
503
|
+
readonly "us.amazon.nova-pro-v1:0": null;
|
|
504
|
+
readonly "us.amazon.nova-lite-v1:0": null;
|
|
505
|
+
readonly "us.amazon.nova-micro-v1:0": null;
|
|
506
|
+
readonly "openai.gpt-oss-120b-1:0": readonly ["low", "medium", "high"];
|
|
507
|
+
readonly "openai.gpt-oss-20b-1:0": readonly ["low", "medium", "high"];
|
|
508
|
+
readonly "us.deepseek.r1-v1:0": null;
|
|
509
|
+
readonly "mistral-large-latest": null;
|
|
510
|
+
readonly "mistral-medium-latest": readonly ["none", "high"];
|
|
511
|
+
readonly "mistral-small-latest": readonly ["none", "high"];
|
|
512
|
+
readonly "magistral-medium-latest": null;
|
|
513
|
+
readonly "magistral-small": null;
|
|
514
|
+
readonly "pixtral-large-latest": null;
|
|
515
|
+
};
|
|
697
516
|
/**
|
|
698
|
-
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
701
|
-
* adapter path cannot serve the lane. Total over providers so a new
|
|
702
|
-
* provider lands with an explicit decision.
|
|
517
|
+
* Concrete provider-default effort where the upstream catalogue publishes
|
|
518
|
+
* one. OpenRouter is the source today; null means the provider does not expose
|
|
519
|
+
* a truthful named default, so clients must retain a separate Default choice.
|
|
703
520
|
*/
|
|
704
|
-
declare const
|
|
705
|
-
readonly
|
|
706
|
-
readonly
|
|
707
|
-
readonly
|
|
708
|
-
readonly
|
|
709
|
-
readonly
|
|
710
|
-
readonly
|
|
711
|
-
readonly
|
|
712
|
-
readonly
|
|
713
|
-
readonly
|
|
521
|
+
declare const MODEL_DEFAULT_REASONING_EFFORTS: {
|
|
522
|
+
readonly "gemini-3.8-flash": null;
|
|
523
|
+
readonly "gemini-3.7-flash": null;
|
|
524
|
+
readonly "gemini-3.6-flash": null;
|
|
525
|
+
readonly "gemini-3.5-flash-lite": null;
|
|
526
|
+
readonly "gemini-3.1-pro-preview": null;
|
|
527
|
+
readonly "gemini-3.5-flash": null;
|
|
528
|
+
readonly "gemini-3.1-flash-lite": null;
|
|
529
|
+
readonly "openai/gpt-5.6-luna": "medium";
|
|
530
|
+
readonly "openai/gpt-5.6-terra": "medium";
|
|
531
|
+
readonly "google/gemini-3.8-flash": "medium";
|
|
532
|
+
readonly "google/gemini-3.7-flash": "medium";
|
|
533
|
+
readonly "google/gemini-3.6-flash": "medium";
|
|
534
|
+
readonly "google/gemini-3.5-flash-lite": "minimal";
|
|
535
|
+
readonly "google/gemini-3.1-pro-preview": "medium";
|
|
536
|
+
readonly "google/gemini-3.5-flash": "medium";
|
|
537
|
+
readonly "google/gemini-3.1-flash-lite": "minimal";
|
|
538
|
+
readonly "anthropic/claude-sonnet-5": "high";
|
|
539
|
+
readonly "anthropic/claude-opus-5": "high";
|
|
540
|
+
readonly "anthropic/claude-opus-4.8": "high";
|
|
541
|
+
readonly "anthropic/claude-sonnet-4.6": "medium";
|
|
542
|
+
readonly "openai/gpt-5.5": "medium";
|
|
543
|
+
readonly "openai/gpt-5.4-mini": "medium";
|
|
544
|
+
readonly "gpt-5.6": null;
|
|
545
|
+
readonly "gpt-5.6-terra": null;
|
|
546
|
+
readonly "gpt-5.6-luna": null;
|
|
547
|
+
readonly "gpt-5.5": null;
|
|
548
|
+
readonly "gpt-5.4": null;
|
|
549
|
+
readonly "gpt-5.4-mini": null;
|
|
550
|
+
readonly "gpt-5.4-nano": null;
|
|
551
|
+
readonly "gpt-5.2": null;
|
|
552
|
+
readonly "claude-sonnet-5": null;
|
|
553
|
+
readonly "claude-fable-5-1": null;
|
|
554
|
+
readonly "claude-fable-5": null;
|
|
555
|
+
readonly "claude-opus-5": null;
|
|
556
|
+
readonly "claude-opus-4-8": null;
|
|
557
|
+
readonly "claude-opus-4-7": null;
|
|
558
|
+
readonly "claude-sonnet-4-6": null;
|
|
559
|
+
readonly "claude-opus-4-6": null;
|
|
560
|
+
readonly "claude-haiku-4-5-20251001": null;
|
|
561
|
+
readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": null;
|
|
562
|
+
readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": null;
|
|
563
|
+
readonly "us.amazon.nova-pro-v1:0": null;
|
|
564
|
+
readonly "us.amazon.nova-lite-v1:0": null;
|
|
565
|
+
readonly "us.amazon.nova-micro-v1:0": null;
|
|
566
|
+
readonly "openai.gpt-oss-120b-1:0": null;
|
|
567
|
+
readonly "openai.gpt-oss-20b-1:0": null;
|
|
568
|
+
readonly "us.deepseek.r1-v1:0": null;
|
|
569
|
+
readonly "mistral-large-latest": null;
|
|
570
|
+
readonly "mistral-medium-latest": null;
|
|
571
|
+
readonly "mistral-small-latest": null;
|
|
572
|
+
readonly "magistral-medium-latest": null;
|
|
573
|
+
readonly "magistral-small": null;
|
|
574
|
+
readonly "pixtral-large-latest": null;
|
|
714
575
|
};
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
576
|
+
/**
|
|
577
|
+
* Whether stella should emit a `temperature` sampling override.
|
|
578
|
+
* `"omit"` covers rejected, deprecated, and accepted-but-ignored
|
|
579
|
+
* parameters. Consumers must go through `shouldEmitTemperature`.
|
|
580
|
+
*/
|
|
581
|
+
declare const MODEL_TEMPERATURE_POLICIES: {
|
|
582
|
+
readonly "gemini-3.8-flash": "omit";
|
|
583
|
+
readonly "gemini-3.7-flash": "omit";
|
|
584
|
+
readonly "gemini-3.6-flash": "omit";
|
|
585
|
+
readonly "gemini-3.5-flash-lite": "omit";
|
|
586
|
+
readonly "gemini-3.1-pro-preview": "emit";
|
|
587
|
+
readonly "gemini-3.5-flash": "emit";
|
|
588
|
+
readonly "gemini-3.1-flash-lite": "emit";
|
|
589
|
+
readonly "openai/gpt-5.6-luna": "omit";
|
|
590
|
+
readonly "openai/gpt-5.6-terra": "omit";
|
|
591
|
+
readonly "google/gemini-3.8-flash": "omit";
|
|
592
|
+
readonly "google/gemini-3.7-flash": "omit";
|
|
593
|
+
readonly "google/gemini-3.6-flash": "omit";
|
|
594
|
+
readonly "google/gemini-3.5-flash-lite": "omit";
|
|
595
|
+
readonly "google/gemini-3.1-pro-preview": "emit";
|
|
596
|
+
readonly "google/gemini-3.5-flash": "emit";
|
|
597
|
+
readonly "google/gemini-3.1-flash-lite": "emit";
|
|
598
|
+
readonly "anthropic/claude-sonnet-5": "omit";
|
|
599
|
+
readonly "anthropic/claude-opus-5": "emit";
|
|
600
|
+
readonly "anthropic/claude-opus-4.8": "emit";
|
|
601
|
+
readonly "anthropic/claude-sonnet-4.6": "emit";
|
|
602
|
+
readonly "openai/gpt-5.5": "omit";
|
|
603
|
+
readonly "openai/gpt-5.4-mini": "omit";
|
|
604
|
+
readonly "gpt-5.6": "omit";
|
|
605
|
+
readonly "gpt-5.6-terra": "omit";
|
|
606
|
+
readonly "gpt-5.6-luna": "omit";
|
|
607
|
+
readonly "gpt-5.5": "omit";
|
|
608
|
+
readonly "gpt-5.4": "emit";
|
|
609
|
+
readonly "gpt-5.4-mini": "emit";
|
|
610
|
+
readonly "gpt-5.4-nano": "emit";
|
|
611
|
+
readonly "gpt-5.2": "emit";
|
|
612
|
+
readonly "claude-sonnet-5": "omit";
|
|
613
|
+
readonly "claude-fable-5-1": "omit";
|
|
614
|
+
readonly "claude-fable-5": "omit";
|
|
615
|
+
readonly "claude-opus-5": "omit";
|
|
616
|
+
readonly "claude-opus-4-8": "omit";
|
|
617
|
+
readonly "claude-opus-4-7": "omit";
|
|
618
|
+
readonly "claude-sonnet-4-6": "emit";
|
|
619
|
+
readonly "claude-opus-4-6": "emit";
|
|
620
|
+
readonly "claude-haiku-4-5-20251001": "emit";
|
|
621
|
+
readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": "emit";
|
|
622
|
+
readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": "emit";
|
|
623
|
+
readonly "us.amazon.nova-pro-v1:0": "emit";
|
|
624
|
+
readonly "us.amazon.nova-lite-v1:0": "emit";
|
|
625
|
+
readonly "us.amazon.nova-micro-v1:0": "emit";
|
|
626
|
+
readonly "openai.gpt-oss-120b-1:0": "emit";
|
|
627
|
+
readonly "openai.gpt-oss-20b-1:0": "emit";
|
|
628
|
+
readonly "us.deepseek.r1-v1:0": "emit";
|
|
629
|
+
readonly "mistral-large-latest": "emit";
|
|
630
|
+
readonly "mistral-medium-latest": "emit";
|
|
631
|
+
readonly "mistral-small-latest": "emit";
|
|
632
|
+
readonly "magistral-medium-latest": "emit";
|
|
633
|
+
readonly "magistral-small": "emit";
|
|
634
|
+
readonly "pixtral-large-latest": "emit";
|
|
719
635
|
};
|
|
720
|
-
|
|
636
|
+
//#endregion
|
|
637
|
+
//#region src/index.d.ts
|
|
721
638
|
/**
|
|
722
|
-
*
|
|
723
|
-
*
|
|
724
|
-
*
|
|
725
|
-
*
|
|
726
|
-
*
|
|
727
|
-
*
|
|
639
|
+
* Logical model roles. Call sites declare *what* they need, not
|
|
640
|
+
* *which* model to use.
|
|
641
|
+
*
|
|
642
|
+
* - fast: classification, extraction, short generation
|
|
643
|
+
* - chat: conversational with tool use and streaming
|
|
644
|
+
* - reasoning: complex multi-step legal analysis
|
|
645
|
+
* - pdf: native PDF/image understanding
|
|
728
646
|
*/
|
|
729
|
-
declare const
|
|
647
|
+
declare const MODEL_ROLES: readonly ["fast", "chat", "reasoning", "pdf"];
|
|
648
|
+
type ModelRole = (typeof MODEL_ROLES)[number];
|
|
649
|
+
declare const TEMPERATURE_POLICIES: readonly ["emit", "omit"];
|
|
650
|
+
type TemperaturePolicy = (typeof TEMPERATURE_POLICIES)[number];
|
|
651
|
+
declare const AI_PROVIDERS: readonly ["google", "openrouter", "openai", "azure_foundry", "anthropic", "bedrock", "mistral", "openai_compatible", "huggingface"];
|
|
652
|
+
type AIProvider = (typeof AI_PROVIDERS)[number];
|
|
653
|
+
declare const AI_PROVIDER_ADAPTER_KIND: {
|
|
654
|
+
readonly google: "tanstack";
|
|
655
|
+
readonly openrouter: "tanstack";
|
|
656
|
+
readonly openai: "tanstack";
|
|
657
|
+
readonly azure_foundry: "custom";
|
|
658
|
+
readonly anthropic: "tanstack";
|
|
659
|
+
readonly bedrock: "tanstack";
|
|
660
|
+
readonly mistral: "tanstack";
|
|
661
|
+
readonly openai_compatible: "custom";
|
|
662
|
+
readonly huggingface: "custom";
|
|
663
|
+
};
|
|
664
|
+
type TanStackAIProvider = { [TProvider in AIProvider]: (typeof AI_PROVIDER_ADAPTER_KIND)[TProvider] extends "tanstack" ? TProvider : never; }[AIProvider];
|
|
665
|
+
declare const TANSTACK_AI_PROVIDERS: readonly ["google", "openrouter", "openai", "anthropic", "bedrock", "mistral"];
|
|
666
|
+
declare const MODEL_CATALOG_PROVIDER_KIND: {
|
|
667
|
+
readonly google: "first-party";
|
|
668
|
+
readonly openrouter: "aggregator";
|
|
669
|
+
readonly openai: "first-party";
|
|
670
|
+
readonly anthropic: "first-party";
|
|
671
|
+
readonly bedrock: "platform";
|
|
672
|
+
readonly mistral: "first-party";
|
|
673
|
+
};
|
|
674
|
+
/** Providers whose picker IDs map directly to public first-party catalogs. */
|
|
675
|
+
type FirstPartyModelProvider = { [TProvider in TanStackAIProvider]: (typeof MODEL_CATALOG_PROVIDER_KIND)[TProvider] extends "first-party" ? TProvider : never; }[TanStackAIProvider];
|
|
676
|
+
declare const FIRST_PARTY_MODEL_PROVIDER_VALUES: readonly ["google", "openai", "anthropic", "mistral"];
|
|
730
677
|
/**
|
|
731
|
-
*
|
|
732
|
-
*
|
|
733
|
-
*
|
|
734
|
-
* directly with a runtime string.
|
|
678
|
+
* Runtime form of the first-party provider union. The conditional annotation
|
|
679
|
+
* makes adding a first-party policy without adding its discovery implementation
|
|
680
|
+
* a compile error.
|
|
735
681
|
*/
|
|
736
|
-
declare const
|
|
682
|
+
declare const FIRST_PARTY_MODEL_PROVIDERS: Exclude<FirstPartyModelProvider, (typeof FIRST_PARTY_MODEL_PROVIDER_VALUES)[number]> extends never ? typeof FIRST_PARTY_MODEL_PROVIDER_VALUES : never;
|
|
737
683
|
/**
|
|
738
|
-
*
|
|
739
|
-
*
|
|
684
|
+
* Per-role default model IDs for the BYOK-capable cloud providers.
|
|
685
|
+
* Shared between the instance default table (`DEFAULT_MODELS`) and the
|
|
686
|
+
* settings-UI default selection, so a default is defined exactly once.
|
|
740
687
|
*/
|
|
741
|
-
declare const
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
688
|
+
declare const BYOK_DEFAULT_MODELS: {
|
|
689
|
+
readonly google: {
|
|
690
|
+
readonly fast: "gemini-3.7-flash";
|
|
691
|
+
readonly chat: "gemini-3.7-flash";
|
|
692
|
+
readonly reasoning: "gemini-3.7-flash";
|
|
693
|
+
readonly pdf: "gemini-3.7-flash";
|
|
694
|
+
};
|
|
695
|
+
readonly openrouter: {
|
|
696
|
+
readonly fast: "openai/gpt-5.6-luna";
|
|
697
|
+
readonly chat: "openai/gpt-5.6-terra";
|
|
698
|
+
readonly reasoning: "openai/gpt-5.6-terra";
|
|
699
|
+
readonly pdf: "openai/gpt-5.6-terra";
|
|
700
|
+
};
|
|
701
|
+
readonly openai: {
|
|
702
|
+
readonly fast: "gpt-5.4-nano";
|
|
703
|
+
readonly chat: "gpt-5.4-mini";
|
|
704
|
+
readonly reasoning: "gpt-5.4";
|
|
705
|
+
readonly pdf: "gpt-5.4";
|
|
706
|
+
};
|
|
707
|
+
readonly anthropic: {
|
|
708
|
+
readonly fast: "claude-opus-5";
|
|
709
|
+
readonly chat: "claude-opus-5";
|
|
710
|
+
readonly reasoning: "claude-opus-5";
|
|
711
|
+
readonly pdf: "claude-opus-5";
|
|
712
|
+
};
|
|
713
|
+
readonly bedrock: {
|
|
714
|
+
readonly fast: "us.amazon.nova-micro-v1:0";
|
|
715
|
+
readonly chat: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
716
|
+
readonly reasoning: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
717
|
+
readonly pdf: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
718
|
+
};
|
|
719
|
+
readonly mistral: {
|
|
720
|
+
readonly fast: "mistral-small-latest";
|
|
721
|
+
readonly chat: "mistral-medium-latest";
|
|
722
|
+
readonly reasoning: "magistral-medium-latest";
|
|
723
|
+
readonly pdf: "mistral-large-latest";
|
|
724
|
+
};
|
|
745
725
|
};
|
|
746
726
|
/**
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
* - Unknown model or no effort control → `null` (send no effort at
|
|
751
|
-
* all; the provider default is the only universally safe choice).
|
|
752
|
-
* - Requested value supported → returned unchanged.
|
|
753
|
-
* - Otherwise → the supported value nearest on `REASONING_EFFORTS`,
|
|
754
|
-
* preferring the weaker side on ties, so a "none" request against a
|
|
755
|
-
* reasoning-mandatory model degrades to its weakest tier instead of
|
|
756
|
-
* erroring, and requests above the model's ceiling clamp down to it.
|
|
727
|
+
* Instance-level default model IDs per provider. Extends the BYOK
|
|
728
|
+
* defaults with the providers that only the instance path uses
|
|
729
|
+
* (custom deployments and OpenAI-compatible endpoints).
|
|
757
730
|
*/
|
|
758
|
-
declare const
|
|
731
|
+
declare const DEFAULT_MODELS: {
|
|
732
|
+
readonly azure_foundry: {
|
|
733
|
+
readonly fast: "gpt-5.4-nano";
|
|
734
|
+
readonly chat: "gpt-5.4-mini";
|
|
735
|
+
readonly reasoning: "gpt-5.4";
|
|
736
|
+
readonly pdf: "gpt-5.4";
|
|
737
|
+
};
|
|
738
|
+
readonly openai_compatible: {
|
|
739
|
+
readonly fast: "default";
|
|
740
|
+
readonly chat: "default";
|
|
741
|
+
readonly reasoning: "default";
|
|
742
|
+
readonly pdf: "default";
|
|
743
|
+
};
|
|
744
|
+
readonly huggingface: {
|
|
745
|
+
readonly fast: "speakleash/Bielik-1.5B-v3.0-Instruct";
|
|
746
|
+
readonly chat: "speakleash/Bielik-11B-v2.3-Instruct";
|
|
747
|
+
readonly reasoning: "speakleash/Bielik-11B-v2.3-Instruct";
|
|
748
|
+
readonly pdf: "speakleash/Bielik-11B-v2.3-Instruct";
|
|
749
|
+
};
|
|
750
|
+
readonly google: {
|
|
751
|
+
readonly fast: "gemini-3.7-flash";
|
|
752
|
+
readonly chat: "gemini-3.7-flash";
|
|
753
|
+
readonly reasoning: "gemini-3.7-flash";
|
|
754
|
+
readonly pdf: "gemini-3.7-flash";
|
|
755
|
+
};
|
|
756
|
+
readonly openrouter: {
|
|
757
|
+
readonly fast: "openai/gpt-5.6-luna";
|
|
758
|
+
readonly chat: "openai/gpt-5.6-terra";
|
|
759
|
+
readonly reasoning: "openai/gpt-5.6-terra";
|
|
760
|
+
readonly pdf: "openai/gpt-5.6-terra";
|
|
761
|
+
};
|
|
762
|
+
readonly openai: {
|
|
763
|
+
readonly fast: "gpt-5.4-nano";
|
|
764
|
+
readonly chat: "gpt-5.4-mini";
|
|
765
|
+
readonly reasoning: "gpt-5.4";
|
|
766
|
+
readonly pdf: "gpt-5.4";
|
|
767
|
+
};
|
|
768
|
+
readonly anthropic: {
|
|
769
|
+
readonly fast: "claude-opus-5";
|
|
770
|
+
readonly chat: "claude-opus-5";
|
|
771
|
+
readonly reasoning: "claude-opus-5";
|
|
772
|
+
readonly pdf: "claude-opus-5";
|
|
773
|
+
};
|
|
774
|
+
readonly bedrock: {
|
|
775
|
+
readonly fast: "us.amazon.nova-micro-v1:0";
|
|
776
|
+
readonly chat: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
777
|
+
readonly reasoning: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
778
|
+
readonly pdf: "us.anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
779
|
+
};
|
|
780
|
+
readonly mistral: {
|
|
781
|
+
readonly fast: "mistral-small-latest";
|
|
782
|
+
readonly chat: "mistral-medium-latest";
|
|
783
|
+
readonly reasoning: "magistral-medium-latest";
|
|
784
|
+
readonly pdf: "mistral-large-latest";
|
|
785
|
+
};
|
|
786
|
+
};
|
|
759
787
|
/**
|
|
760
|
-
*
|
|
788
|
+
* BYOK-offered model IDs per provider — the curated catalog users pick
|
|
789
|
+
* from in org settings, and the server-side allowlist the API enforces.
|
|
790
|
+
* The frontend list is not a security boundary; this is what the API
|
|
791
|
+
* accepts.
|
|
761
792
|
*
|
|
762
|
-
*
|
|
763
|
-
*
|
|
764
|
-
*
|
|
765
|
-
* `model-catalog-upstream` check validates that every offered
|
|
766
|
-
* first-party model has an entry and that entries stay mutually
|
|
767
|
-
* consistent with upstream catalog cost metadata, so a stale entry
|
|
768
|
-
* fails CI instead of silently mis-attributing usage.
|
|
793
|
+
* Limited to providers the TanStack AI integration supports for BYOK.
|
|
794
|
+
* Providers without a first-class TanStack adapter path are intentionally
|
|
795
|
+
* not accepted at this boundary.
|
|
769
796
|
*/
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
* provider offers a cache-read adjustment. Falls back to
|
|
778
|
-
* `inputPerMTok` when undefined.
|
|
779
|
-
*/
|
|
780
|
-
cachedInputPerMTok?: number;
|
|
797
|
+
declare const BYOK_MODEL_OPTIONS: {
|
|
798
|
+
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"];
|
|
799
|
+
readonly anthropic: readonly ["claude-sonnet-5", "claude-fable-5-1", "claude-fable-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"];
|
|
800
|
+
readonly openai: readonly ["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"];
|
|
801
|
+
readonly openrouter: readonly ["openai/gpt-5.6-luna", "openai/gpt-5.6-terra", "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", "anthropic/claude-opus-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6", "openai/gpt-5.5", "openai/gpt-5.4-mini"];
|
|
802
|
+
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", "us.deepseek.r1-v1:0"];
|
|
803
|
+
readonly mistral: readonly ["mistral-large-latest", "mistral-medium-latest", "mistral-small-latest", "magistral-medium-latest", "magistral-small", "pixtral-large-latest"];
|
|
781
804
|
};
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
*/
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
kind: "input-token-tiered";
|
|
791
|
-
/** The base tier applies at or below this total input-token count. */
|
|
792
|
-
inputTokenThreshold: number;
|
|
793
|
-
standard: ModelRateAmounts;
|
|
794
|
-
/** Applies to the entire request once input exceeds the threshold. */
|
|
795
|
-
aboveThreshold: ModelRateAmounts;
|
|
805
|
+
type BYOKProvider = keyof typeof BYOK_MODEL_OPTIONS;
|
|
806
|
+
type BYOKModelIdByProvider = { [TProvider in BYOKProvider]: (typeof BYOK_MODEL_OPTIONS)[TProvider][number]; };
|
|
807
|
+
type OfferedBYOKModelId = BYOKModelIdByProvider[BYOKProvider];
|
|
808
|
+
type ModelDisplayMetadata = {
|
|
809
|
+
/** Human-readable product name; model names are trademarks and stay untranslated. */
|
|
810
|
+
displayName: string;
|
|
811
|
+
/** Brand mark to show. This may differ from the routing provider. */
|
|
812
|
+
iconProvider: BYOKProvider;
|
|
796
813
|
};
|
|
797
|
-
declare const getStandardModelRate: (rate: ModelRate) => ModelRateAmounts;
|
|
798
|
-
declare const resolveModelRate: (rate: ModelRate, inputTokens: number) => ModelRateAmounts;
|
|
799
814
|
/**
|
|
800
|
-
*
|
|
801
|
-
*
|
|
802
|
-
*
|
|
803
|
-
*
|
|
804
|
-
* model IDs or the fallback rate.
|
|
815
|
+
* Presentation metadata for every offered model. Keeping this exhaustive beside
|
|
816
|
+
* the allowlist prevents a newly offered model from leaking a raw provider ID
|
|
817
|
+
* into user-facing pickers. OpenRouter entries deliberately carry their model
|
|
818
|
+
* creator's icon while their routing provider remains available separately.
|
|
805
819
|
*/
|
|
806
|
-
declare const
|
|
807
|
-
readonly "gemini-
|
|
808
|
-
readonly
|
|
809
|
-
readonly
|
|
810
|
-
readonly outputPerMTok: 250000;
|
|
811
|
-
readonly cachedInputPerMTok: 7500;
|
|
820
|
+
declare const MODEL_DISPLAY_METADATA: {
|
|
821
|
+
readonly "gemini-3.8-flash": {
|
|
822
|
+
readonly displayName: "Gemini 3.8 Flash";
|
|
823
|
+
readonly iconProvider: "google";
|
|
812
824
|
};
|
|
813
|
-
readonly "gemini-
|
|
814
|
-
readonly
|
|
815
|
-
readonly
|
|
816
|
-
readonly outputPerMTok: 1000000;
|
|
817
|
-
readonly cachedInputPerMTok: 31250;
|
|
825
|
+
readonly "gemini-3.7-flash": {
|
|
826
|
+
readonly displayName: "Gemini 3.7 Flash";
|
|
827
|
+
readonly iconProvider: "google";
|
|
818
828
|
};
|
|
819
|
-
readonly "gemini-3.
|
|
820
|
-
readonly
|
|
821
|
-
readonly
|
|
822
|
-
readonly outputPerMTok: 150000;
|
|
823
|
-
readonly cachedInputPerMTok: 2500;
|
|
829
|
+
readonly "gemini-3.6-flash": {
|
|
830
|
+
readonly displayName: "Gemini 3.6 Flash";
|
|
831
|
+
readonly iconProvider: "google";
|
|
824
832
|
};
|
|
825
|
-
readonly "gemini-3.5-flash": {
|
|
826
|
-
readonly
|
|
827
|
-
readonly
|
|
828
|
-
|
|
829
|
-
|
|
833
|
+
readonly "gemini-3.5-flash-lite": {
|
|
834
|
+
readonly displayName: "Gemini 3.5 Flash Lite";
|
|
835
|
+
readonly iconProvider: "google";
|
|
836
|
+
};
|
|
837
|
+
readonly "gemini-3.1-pro-preview": {
|
|
838
|
+
readonly displayName: "Gemini 3.1 Pro Preview";
|
|
839
|
+
readonly iconProvider: "google";
|
|
830
840
|
};
|
|
831
|
-
readonly "gemini-3.5-flash
|
|
832
|
-
readonly
|
|
833
|
-
readonly
|
|
834
|
-
readonly outputPerMTok: 250000;
|
|
835
|
-
readonly cachedInputPerMTok: 3000;
|
|
841
|
+
readonly "gemini-3.5-flash": {
|
|
842
|
+
readonly displayName: "Gemini 3.5 Flash";
|
|
843
|
+
readonly iconProvider: "google";
|
|
836
844
|
};
|
|
837
|
-
readonly "gemini-3.
|
|
838
|
-
readonly
|
|
839
|
-
readonly
|
|
840
|
-
readonly outputPerMTok: 375000;
|
|
841
|
-
readonly cachedInputPerMTok: 7500;
|
|
845
|
+
readonly "gemini-3.1-flash-lite": {
|
|
846
|
+
readonly displayName: "Gemini 3.1 Flash Lite";
|
|
847
|
+
readonly iconProvider: "google";
|
|
842
848
|
};
|
|
843
|
-
readonly "
|
|
844
|
-
readonly
|
|
845
|
-
readonly
|
|
846
|
-
readonly outputPerMTok: 375000;
|
|
847
|
-
readonly cachedInputPerMTok: 7500;
|
|
849
|
+
readonly "claude-sonnet-5": {
|
|
850
|
+
readonly displayName: "Claude Sonnet 5";
|
|
851
|
+
readonly iconProvider: "anthropic";
|
|
848
852
|
};
|
|
849
|
-
readonly "
|
|
850
|
-
readonly
|
|
851
|
-
readonly
|
|
852
|
-
readonly standard: {
|
|
853
|
-
readonly inputPerMTok: 200000;
|
|
854
|
-
readonly outputPerMTok: 1200000;
|
|
855
|
-
readonly cachedInputPerMTok: 20000;
|
|
856
|
-
};
|
|
857
|
-
readonly aboveThreshold: {
|
|
858
|
-
readonly inputPerMTok: 400000;
|
|
859
|
-
readonly outputPerMTok: 1800000;
|
|
860
|
-
readonly cachedInputPerMTok: 40000;
|
|
861
|
-
};
|
|
853
|
+
readonly "claude-fable-5-1": {
|
|
854
|
+
readonly displayName: "Claude Fable 5.1";
|
|
855
|
+
readonly iconProvider: "anthropic";
|
|
862
856
|
};
|
|
863
|
-
readonly "
|
|
864
|
-
readonly
|
|
865
|
-
readonly
|
|
866
|
-
readonly outputPerMTok: 60000;
|
|
867
|
-
readonly cachedInputPerMTok: 7500;
|
|
857
|
+
readonly "claude-fable-5": {
|
|
858
|
+
readonly displayName: "Claude Fable 5";
|
|
859
|
+
readonly iconProvider: "anthropic";
|
|
868
860
|
};
|
|
869
|
-
readonly "
|
|
870
|
-
readonly
|
|
871
|
-
readonly
|
|
872
|
-
readonly outputPerMTok: 1000000;
|
|
873
|
-
readonly cachedInputPerMTok: 125000;
|
|
861
|
+
readonly "claude-opus-5": {
|
|
862
|
+
readonly displayName: "Claude Opus 5";
|
|
863
|
+
readonly iconProvider: "anthropic";
|
|
874
864
|
};
|
|
875
|
-
readonly "
|
|
876
|
-
readonly
|
|
877
|
-
readonly
|
|
878
|
-
readonly outputPerMTok: 1400000;
|
|
879
|
-
readonly cachedInputPerMTok: 17500;
|
|
865
|
+
readonly "claude-opus-4-8": {
|
|
866
|
+
readonly displayName: "Claude Opus 4.8";
|
|
867
|
+
readonly iconProvider: "anthropic";
|
|
880
868
|
};
|
|
881
|
-
readonly "
|
|
882
|
-
readonly
|
|
883
|
-
readonly
|
|
884
|
-
readonly outputPerMTok: 125000;
|
|
885
|
-
readonly cachedInputPerMTok: 2000;
|
|
869
|
+
readonly "claude-opus-4-7": {
|
|
870
|
+
readonly displayName: "Claude Opus 4.7";
|
|
871
|
+
readonly iconProvider: "anthropic";
|
|
886
872
|
};
|
|
887
|
-
readonly "
|
|
888
|
-
readonly
|
|
889
|
-
readonly
|
|
890
|
-
readonly outputPerMTok: 450000;
|
|
891
|
-
readonly cachedInputPerMTok: 7500;
|
|
873
|
+
readonly "claude-sonnet-4-6": {
|
|
874
|
+
readonly displayName: "Claude Sonnet 4.6";
|
|
875
|
+
readonly iconProvider: "anthropic";
|
|
892
876
|
};
|
|
893
|
-
readonly "
|
|
894
|
-
readonly
|
|
895
|
-
readonly
|
|
896
|
-
readonly standard: {
|
|
897
|
-
readonly inputPerMTok: 250000;
|
|
898
|
-
readonly outputPerMTok: 1500000;
|
|
899
|
-
readonly cachedInputPerMTok: 25000;
|
|
900
|
-
};
|
|
901
|
-
readonly aboveThreshold: {
|
|
902
|
-
readonly inputPerMTok: 500000;
|
|
903
|
-
readonly outputPerMTok: 2250000;
|
|
904
|
-
readonly cachedInputPerMTok: 50000;
|
|
905
|
-
};
|
|
877
|
+
readonly "claude-opus-4-6": {
|
|
878
|
+
readonly displayName: "Claude Opus 4.6";
|
|
879
|
+
readonly iconProvider: "anthropic";
|
|
906
880
|
};
|
|
907
|
-
readonly "
|
|
908
|
-
readonly
|
|
909
|
-
readonly
|
|
910
|
-
readonly standard: {
|
|
911
|
-
readonly inputPerMTok: 500000;
|
|
912
|
-
readonly outputPerMTok: 3000000;
|
|
913
|
-
readonly cachedInputPerMTok: 50000;
|
|
914
|
-
};
|
|
915
|
-
readonly aboveThreshold: {
|
|
916
|
-
readonly inputPerMTok: 1000000;
|
|
917
|
-
readonly outputPerMTok: 4500000;
|
|
918
|
-
readonly cachedInputPerMTok: 100000;
|
|
919
|
-
};
|
|
881
|
+
readonly "claude-haiku-4-5-20251001": {
|
|
882
|
+
readonly displayName: "Claude Haiku 4.5";
|
|
883
|
+
readonly iconProvider: "anthropic";
|
|
920
884
|
};
|
|
921
885
|
readonly "gpt-5.6": {
|
|
922
|
-
readonly
|
|
923
|
-
readonly
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
};
|
|
929
|
-
readonly aboveThreshold: {
|
|
930
|
-
readonly inputPerMTok: 800000;
|
|
931
|
-
readonly outputPerMTok: 3000000;
|
|
932
|
-
readonly cachedInputPerMTok: 80000;
|
|
933
|
-
};
|
|
886
|
+
readonly displayName: "GPT-5.6 Sol";
|
|
887
|
+
readonly iconProvider: "openai";
|
|
888
|
+
};
|
|
889
|
+
readonly "gpt-5.6-terra": {
|
|
890
|
+
readonly displayName: "GPT-5.6 Terra";
|
|
891
|
+
readonly iconProvider: "openai";
|
|
934
892
|
};
|
|
935
893
|
readonly "gpt-5.6-luna": {
|
|
936
|
-
readonly
|
|
937
|
-
readonly
|
|
938
|
-
readonly standard: {
|
|
939
|
-
readonly inputPerMTok: 20000;
|
|
940
|
-
readonly outputPerMTok: 120000;
|
|
941
|
-
readonly cachedInputPerMTok: 2000;
|
|
942
|
-
};
|
|
943
|
-
readonly aboveThreshold: {
|
|
944
|
-
readonly inputPerMTok: 40000;
|
|
945
|
-
readonly outputPerMTok: 180000;
|
|
946
|
-
readonly cachedInputPerMTok: 4000;
|
|
947
|
-
};
|
|
894
|
+
readonly displayName: "GPT-5.6 Luna";
|
|
895
|
+
readonly iconProvider: "openai";
|
|
948
896
|
};
|
|
949
|
-
readonly "gpt-5.
|
|
950
|
-
readonly
|
|
951
|
-
readonly
|
|
952
|
-
readonly standard: {
|
|
953
|
-
readonly inputPerMTok: 200000;
|
|
954
|
-
readonly outputPerMTok: 1200000;
|
|
955
|
-
readonly cachedInputPerMTok: 20000;
|
|
956
|
-
};
|
|
957
|
-
readonly aboveThreshold: {
|
|
958
|
-
readonly inputPerMTok: 400000;
|
|
959
|
-
readonly outputPerMTok: 1800000;
|
|
960
|
-
readonly cachedInputPerMTok: 40000;
|
|
961
|
-
};
|
|
897
|
+
readonly "gpt-5.5": {
|
|
898
|
+
readonly displayName: "GPT-5.5";
|
|
899
|
+
readonly iconProvider: "openai";
|
|
962
900
|
};
|
|
963
|
-
readonly "
|
|
964
|
-
readonly
|
|
965
|
-
readonly
|
|
966
|
-
readonly outputPerMTok: 500000;
|
|
967
|
-
readonly cachedInputPerMTok: 10000;
|
|
901
|
+
readonly "gpt-5.4": {
|
|
902
|
+
readonly displayName: "GPT-5.4";
|
|
903
|
+
readonly iconProvider: "openai";
|
|
968
904
|
};
|
|
969
|
-
readonly "
|
|
970
|
-
readonly
|
|
971
|
-
readonly
|
|
972
|
-
readonly outputPerMTok: 1500000;
|
|
973
|
-
readonly cachedInputPerMTok: 30000;
|
|
905
|
+
readonly "gpt-5.4-mini": {
|
|
906
|
+
readonly displayName: "GPT-5.4 Mini";
|
|
907
|
+
readonly iconProvider: "openai";
|
|
974
908
|
};
|
|
975
|
-
readonly "
|
|
976
|
-
readonly
|
|
977
|
-
readonly
|
|
978
|
-
readonly outputPerMTok: 1000000;
|
|
979
|
-
readonly cachedInputPerMTok: 20000;
|
|
909
|
+
readonly "gpt-5.4-nano": {
|
|
910
|
+
readonly displayName: "GPT-5.4 Nano";
|
|
911
|
+
readonly iconProvider: "openai";
|
|
980
912
|
};
|
|
981
|
-
readonly "
|
|
982
|
-
readonly
|
|
983
|
-
readonly
|
|
984
|
-
readonly outputPerMTok: 2500000;
|
|
985
|
-
readonly cachedInputPerMTok: 50000;
|
|
913
|
+
readonly "gpt-5.2": {
|
|
914
|
+
readonly displayName: "GPT-5.2";
|
|
915
|
+
readonly iconProvider: "openai";
|
|
986
916
|
};
|
|
987
|
-
readonly "
|
|
988
|
-
readonly
|
|
989
|
-
readonly
|
|
990
|
-
readonly outputPerMTok: 2500000;
|
|
991
|
-
readonly cachedInputPerMTok: 50000;
|
|
917
|
+
readonly "openai/gpt-5.6-luna": {
|
|
918
|
+
readonly displayName: "GPT-5.6 Luna";
|
|
919
|
+
readonly iconProvider: "openai";
|
|
992
920
|
};
|
|
993
|
-
readonly "
|
|
994
|
-
readonly
|
|
995
|
-
readonly
|
|
996
|
-
readonly outputPerMTok: 2500000;
|
|
997
|
-
readonly cachedInputPerMTok: 50000;
|
|
921
|
+
readonly "openai/gpt-5.6-terra": {
|
|
922
|
+
readonly displayName: "GPT-5.6 Terra";
|
|
923
|
+
readonly iconProvider: "openai";
|
|
998
924
|
};
|
|
999
|
-
readonly "
|
|
1000
|
-
readonly
|
|
1001
|
-
readonly
|
|
1002
|
-
readonly outputPerMTok: 2500000;
|
|
1003
|
-
readonly cachedInputPerMTok: 50000;
|
|
925
|
+
readonly "google/gemini-3.8-flash": {
|
|
926
|
+
readonly displayName: "Gemini 3.8 Flash";
|
|
927
|
+
readonly iconProvider: "google";
|
|
1004
928
|
};
|
|
1005
|
-
readonly "
|
|
1006
|
-
readonly
|
|
1007
|
-
readonly
|
|
1008
|
-
readonly outputPerMTok: 5000000;
|
|
1009
|
-
readonly cachedInputPerMTok: 100000;
|
|
929
|
+
readonly "google/gemini-3.7-flash": {
|
|
930
|
+
readonly displayName: "Gemini 3.7 Flash";
|
|
931
|
+
readonly iconProvider: "google";
|
|
1010
932
|
};
|
|
1011
|
-
readonly "
|
|
1012
|
-
readonly
|
|
1013
|
-
readonly
|
|
1014
|
-
readonly outputPerMTok: 5000000;
|
|
1015
|
-
readonly cachedInputPerMTok: 25000;
|
|
933
|
+
readonly "google/gemini-3.6-flash": {
|
|
934
|
+
readonly displayName: "Gemini 3.6 Flash";
|
|
935
|
+
readonly iconProvider: "google";
|
|
1016
936
|
};
|
|
1017
|
-
readonly "
|
|
1018
|
-
readonly
|
|
1019
|
-
readonly
|
|
1020
|
-
readonly outputPerMTok: 60000;
|
|
937
|
+
readonly "google/gemini-3.5-flash-lite": {
|
|
938
|
+
readonly displayName: "Gemini 3.5 Flash Lite";
|
|
939
|
+
readonly iconProvider: "google";
|
|
1021
940
|
};
|
|
1022
|
-
readonly "
|
|
1023
|
-
readonly
|
|
1024
|
-
readonly
|
|
1025
|
-
readonly outputPerMTok: 150000;
|
|
941
|
+
readonly "google/gemini-3.1-pro-preview": {
|
|
942
|
+
readonly displayName: "Gemini 3.1 Pro Preview";
|
|
943
|
+
readonly iconProvider: "google";
|
|
1026
944
|
};
|
|
1027
|
-
readonly "
|
|
1028
|
-
readonly
|
|
1029
|
-
readonly
|
|
1030
|
-
|
|
945
|
+
readonly "google/gemini-3.5-flash": {
|
|
946
|
+
readonly displayName: "Gemini 3.5 Flash";
|
|
947
|
+
readonly iconProvider: "google";
|
|
948
|
+
};
|
|
949
|
+
readonly "google/gemini-3.1-flash-lite": {
|
|
950
|
+
readonly displayName: "Gemini 3.1 Flash Lite";
|
|
951
|
+
readonly iconProvider: "google";
|
|
952
|
+
};
|
|
953
|
+
readonly "anthropic/claude-sonnet-5": {
|
|
954
|
+
readonly displayName: "Claude Sonnet 5";
|
|
955
|
+
readonly iconProvider: "anthropic";
|
|
1031
956
|
};
|
|
1032
|
-
readonly "
|
|
1033
|
-
readonly
|
|
1034
|
-
readonly
|
|
1035
|
-
readonly outputPerMTok: 750000;
|
|
957
|
+
readonly "anthropic/claude-opus-5": {
|
|
958
|
+
readonly displayName: "Claude Opus 5";
|
|
959
|
+
readonly iconProvider: "anthropic";
|
|
1036
960
|
};
|
|
1037
|
-
readonly "
|
|
1038
|
-
readonly
|
|
1039
|
-
readonly
|
|
1040
|
-
readonly outputPerMTok: 500000;
|
|
961
|
+
readonly "anthropic/claude-opus-4.8": {
|
|
962
|
+
readonly displayName: "Claude Opus 4.8";
|
|
963
|
+
readonly iconProvider: "anthropic";
|
|
1041
964
|
};
|
|
1042
|
-
readonly "
|
|
1043
|
-
readonly
|
|
1044
|
-
readonly
|
|
1045
|
-
readonly outputPerMTok: 150000;
|
|
965
|
+
readonly "anthropic/claude-sonnet-4.6": {
|
|
966
|
+
readonly displayName: "Claude Sonnet 4.6";
|
|
967
|
+
readonly iconProvider: "anthropic";
|
|
1046
968
|
};
|
|
1047
|
-
readonly "
|
|
1048
|
-
readonly
|
|
1049
|
-
readonly
|
|
1050
|
-
readonly outputPerMTok: 150000;
|
|
969
|
+
readonly "openai/gpt-5.5": {
|
|
970
|
+
readonly displayName: "GPT-5.5";
|
|
971
|
+
readonly iconProvider: "openai";
|
|
1051
972
|
};
|
|
1052
|
-
readonly "
|
|
1053
|
-
readonly
|
|
1054
|
-
readonly
|
|
1055
|
-
readonly outputPerMTok: 600000;
|
|
973
|
+
readonly "openai/gpt-5.4-mini": {
|
|
974
|
+
readonly displayName: "GPT-5.4 Mini";
|
|
975
|
+
readonly iconProvider: "openai";
|
|
1056
976
|
};
|
|
1057
977
|
readonly "us.anthropic.claude-sonnet-4-5-20250929-v1:0": {
|
|
1058
|
-
readonly
|
|
1059
|
-
readonly
|
|
1060
|
-
readonly outputPerMTok: 1500000;
|
|
1061
|
-
readonly cachedInputPerMTok: 30000;
|
|
978
|
+
readonly displayName: "Claude Sonnet 4.5";
|
|
979
|
+
readonly iconProvider: "anthropic";
|
|
1062
980
|
};
|
|
1063
981
|
readonly "us.anthropic.claude-haiku-4-5-20251001-v1:0": {
|
|
1064
|
-
readonly
|
|
1065
|
-
readonly
|
|
1066
|
-
readonly outputPerMTok: 500000;
|
|
1067
|
-
readonly cachedInputPerMTok: 10000;
|
|
982
|
+
readonly displayName: "Claude Haiku 4.5";
|
|
983
|
+
readonly iconProvider: "anthropic";
|
|
1068
984
|
};
|
|
1069
985
|
readonly "us.amazon.nova-pro-v1:0": {
|
|
1070
|
-
readonly
|
|
1071
|
-
readonly
|
|
1072
|
-
readonly outputPerMTok: 320000;
|
|
986
|
+
readonly displayName: "Amazon Nova Pro";
|
|
987
|
+
readonly iconProvider: "bedrock";
|
|
1073
988
|
};
|
|
1074
989
|
readonly "us.amazon.nova-lite-v1:0": {
|
|
1075
|
-
readonly
|
|
1076
|
-
readonly
|
|
1077
|
-
readonly outputPerMTok: 24000;
|
|
990
|
+
readonly displayName: "Amazon Nova Lite";
|
|
991
|
+
readonly iconProvider: "bedrock";
|
|
1078
992
|
};
|
|
1079
993
|
readonly "us.amazon.nova-micro-v1:0": {
|
|
1080
|
-
readonly
|
|
1081
|
-
readonly
|
|
1082
|
-
readonly outputPerMTok: 14000;
|
|
994
|
+
readonly displayName: "Amazon Nova Micro";
|
|
995
|
+
readonly iconProvider: "bedrock";
|
|
1083
996
|
};
|
|
1084
997
|
readonly "openai.gpt-oss-120b-1:0": {
|
|
1085
|
-
readonly
|
|
1086
|
-
readonly
|
|
1087
|
-
readonly outputPerMTok: 60000;
|
|
998
|
+
readonly displayName: "GPT OSS 120B";
|
|
999
|
+
readonly iconProvider: "openai";
|
|
1088
1000
|
};
|
|
1089
1001
|
readonly "openai.gpt-oss-20b-1:0": {
|
|
1090
|
-
readonly
|
|
1091
|
-
readonly
|
|
1092
|
-
readonly outputPerMTok: 30000;
|
|
1002
|
+
readonly displayName: "GPT OSS 20B";
|
|
1003
|
+
readonly iconProvider: "openai";
|
|
1093
1004
|
};
|
|
1094
1005
|
readonly "us.deepseek.r1-v1:0": {
|
|
1095
|
-
readonly
|
|
1096
|
-
readonly
|
|
1097
|
-
|
|
1006
|
+
readonly displayName: "DeepSeek R1";
|
|
1007
|
+
readonly iconProvider: "bedrock";
|
|
1008
|
+
};
|
|
1009
|
+
readonly "mistral-large-latest": {
|
|
1010
|
+
readonly displayName: "Mistral Large";
|
|
1011
|
+
readonly iconProvider: "mistral";
|
|
1012
|
+
};
|
|
1013
|
+
readonly "mistral-medium-latest": {
|
|
1014
|
+
readonly displayName: "Mistral Medium";
|
|
1015
|
+
readonly iconProvider: "mistral";
|
|
1016
|
+
};
|
|
1017
|
+
readonly "mistral-small-latest": {
|
|
1018
|
+
readonly displayName: "Mistral Small";
|
|
1019
|
+
readonly iconProvider: "mistral";
|
|
1020
|
+
};
|
|
1021
|
+
readonly "magistral-medium-latest": {
|
|
1022
|
+
readonly displayName: "Magistral Medium";
|
|
1023
|
+
readonly iconProvider: "mistral";
|
|
1024
|
+
};
|
|
1025
|
+
readonly "magistral-small": {
|
|
1026
|
+
readonly displayName: "Magistral Small";
|
|
1027
|
+
readonly iconProvider: "mistral";
|
|
1028
|
+
};
|
|
1029
|
+
readonly "pixtral-large-latest": {
|
|
1030
|
+
readonly displayName: "Pixtral Large";
|
|
1031
|
+
readonly iconProvider: "mistral";
|
|
1098
1032
|
};
|
|
1099
1033
|
};
|
|
1034
|
+
declare const getModelDisplayMetadata: (modelId: string) => ModelDisplayMetadata | null;
|
|
1035
|
+
/**
|
|
1036
|
+
* Offered models whose provider API accepts PDF/file content. Generated from
|
|
1037
|
+
* live models.dev input modalities plus dated, reviewed source corrections;
|
|
1038
|
+
* the nightly upstream check rejects drift.
|
|
1039
|
+
*/
|
|
1040
|
+
declare const BYOK_DOCUMENT_INPUT_MODEL_OPTIONS: {
|
|
1041
|
+
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"];
|
|
1042
|
+
readonly openrouter: readonly ["openai/gpt-5.6-luna", "openai/gpt-5.6-terra", "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", "anthropic/claude-opus-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6", "openai/gpt-5.5", "openai/gpt-5.4-mini"];
|
|
1043
|
+
readonly openai: readonly ["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"];
|
|
1044
|
+
readonly anthropic: readonly ["claude-sonnet-5", "claude-fable-5-1", "claude-fable-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"];
|
|
1045
|
+
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"];
|
|
1046
|
+
readonly mistral: readonly [];
|
|
1047
|
+
};
|
|
1048
|
+
declare const isBYOKProviderRoleSupported: ({ provider, role }: {
|
|
1049
|
+
provider: BYOKProvider;
|
|
1050
|
+
role: ModelRole;
|
|
1051
|
+
}) => boolean;
|
|
1052
|
+
declare const isBYOKModelRoleSupported: ({ provider, modelId, role }: {
|
|
1053
|
+
provider: BYOKProvider;
|
|
1054
|
+
modelId: string;
|
|
1055
|
+
role: ModelRole;
|
|
1056
|
+
}) => boolean;
|
|
1057
|
+
/**
|
|
1058
|
+
* Models whose provider adapter can receive a PDF `document` content part in a
|
|
1059
|
+
* chat turn without throwing. This is a narrower, runtime question than the
|
|
1060
|
+
* pdf ROLE (`BYOK_DOCUMENT_INPUT_MODEL_OPTIONS`, which curates model selection
|
|
1061
|
+
* for PDF-processing flows): it only asks "will the chat stream survive this
|
|
1062
|
+
* attachment." The Mistral text adapter maps PDF `document` parts to
|
|
1063
|
+
* `document_url`, so its
|
|
1064
|
+
* vision models accept PDF attachments even though Mistral is deliberately not
|
|
1065
|
+
* offered as a pdf-role provider. Mistral's `document_url` takes PDF but NOT
|
|
1066
|
+
* textual documents (docx/txt/csv/md), so those still gate on
|
|
1067
|
+
* `BYOK_DOCUMENT_INPUT_MODEL_OPTIONS` (which excludes Mistral). Superset
|
|
1068
|
+
* invariant: every pdf-role document model also accepts a PDF chat attachment.
|
|
1069
|
+
*/
|
|
1070
|
+
declare const CHAT_PDF_ATTACHMENT_MODEL_OPTIONS: {
|
|
1071
|
+
readonly mistral: readonly ["mistral-medium-latest", "mistral-small-latest", "pixtral-large-latest"];
|
|
1072
|
+
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"];
|
|
1073
|
+
readonly openrouter: readonly ["openai/gpt-5.6-luna", "openai/gpt-5.6-terra", "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", "anthropic/claude-opus-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6", "openai/gpt-5.5", "openai/gpt-5.4-mini"];
|
|
1074
|
+
readonly openai: readonly ["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"];
|
|
1075
|
+
readonly anthropic: readonly ["claude-sonnet-5", "claude-fable-5-1", "claude-fable-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"];
|
|
1076
|
+
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"];
|
|
1077
|
+
};
|
|
1078
|
+
declare const isChatPdfAttachmentModelSupported: ({ provider, modelId }: {
|
|
1079
|
+
provider: BYOKProvider;
|
|
1080
|
+
modelId: string;
|
|
1081
|
+
}) => boolean;
|
|
1082
|
+
/**
|
|
1083
|
+
* Resolve a model id that will actually work for this provider+role,
|
|
1084
|
+
* keeping the SAME provider. Returns the caller's model unchanged when
|
|
1085
|
+
* it is still offered; otherwise falls back to the provider's per-role
|
|
1086
|
+
* default (`BYOK_DEFAULT_MODELS`). Returns `null` only when the
|
|
1087
|
+
* provider has no valid model for the role at all — the sole case
|
|
1088
|
+
* today is `mistral` + `pdf`, because the TanStack Mistral adapter
|
|
1089
|
+
* exposes no `document` input modality, so no Mistral model (not even
|
|
1090
|
+
* the default) can serve the PDF role.
|
|
1091
|
+
*
|
|
1092
|
+
* Used to auto-heal org AI configs whose pinned model was removed by a
|
|
1093
|
+
* catalog bump, so generation resolves to a supported model instead of
|
|
1094
|
+
* 400-ing (or forwarding a retired id to the provider).
|
|
1095
|
+
*/
|
|
1096
|
+
declare const resolveWorkingBYOKModelForRole: ({ provider, modelId, role }: {
|
|
1097
|
+
provider: BYOKProvider;
|
|
1098
|
+
modelId: string;
|
|
1099
|
+
role: ModelRole;
|
|
1100
|
+
}) => string | null;
|
|
1101
|
+
/**
|
|
1102
|
+
* Anthropic models that use the adaptive-thinking request shape
|
|
1103
|
+
* (`thinking: { type: "adaptive" }`). Newer Claude models reject the
|
|
1104
|
+
* legacy budget-based form, so every Opus 4.6+/Sonnet 4.6/Fable entry
|
|
1105
|
+
* offered above must appear here or it will 400 on the reasoning role.
|
|
1106
|
+
*/
|
|
1107
|
+
declare const ANTHROPIC_ADAPTIVE_THINKING_MODELS: readonly ["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"];
|
|
1108
|
+
/**
|
|
1109
|
+
* Canonical reasoning-effort ladder, ordered weakest to strongest.
|
|
1110
|
+
* Union of every effort keyword the offered providers accept; no
|
|
1111
|
+
* single model accepts all of them, which is exactly why the
|
|
1112
|
+
* generated per-model `MODEL_REASONING_EFFORTS` exists.
|
|
1113
|
+
*/
|
|
1114
|
+
declare const REASONING_EFFORTS: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
1115
|
+
type ReasoningEffort = (typeof REASONING_EFFORTS)[number];
|
|
1116
|
+
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">]>;
|
|
1117
|
+
/**
|
|
1118
|
+
* A reasoning effort proven to be accepted by the model it targets.
|
|
1119
|
+
* Only `resolveReasoningEffort` can produce this type, so option
|
|
1120
|
+
* builders cannot hand a provider a literal effort the model rejects
|
|
1121
|
+
* (e.g. `"none"` to a model whose reasoning cannot be disabled) —
|
|
1122
|
+
* that mistake now fails typecheck instead of 502-ing at runtime.
|
|
1123
|
+
*/
|
|
1124
|
+
type ResolvedReasoningEffort = v.InferOutput<typeof resolvedReasoningEffortSchema>;
|
|
1125
|
+
/**
|
|
1126
|
+
* Per-provider model served when a user's included budget is exhausted
|
|
1127
|
+
* and no explicit selection overrides it. Falls back to each
|
|
1128
|
+
* provider's fast-role default; providers without a first-class
|
|
1129
|
+
* adapter path cannot serve the lane. Total over providers so a new
|
|
1130
|
+
* provider lands with an explicit decision.
|
|
1131
|
+
*/
|
|
1132
|
+
declare const FALLBACK_CHAT_MODEL_BY_PROVIDER: {
|
|
1133
|
+
readonly google: "gemini-3.7-flash";
|
|
1134
|
+
readonly openrouter: "openai/gpt-5.6-luna";
|
|
1135
|
+
readonly openai: "gpt-5.6-luna";
|
|
1136
|
+
readonly anthropic: "claude-opus-5";
|
|
1137
|
+
readonly bedrock: "us.amazon.nova-micro-v1:0";
|
|
1138
|
+
readonly mistral: "mistral-small-latest";
|
|
1139
|
+
readonly azure_foundry: null;
|
|
1140
|
+
readonly openai_compatible: null;
|
|
1141
|
+
readonly huggingface: null;
|
|
1142
|
+
};
|
|
1143
|
+
/**
|
|
1144
|
+
* Provider-native IDs that are exact aliases of an offered catalog ID.
|
|
1145
|
+
* Every metadata lookup normalizes here, so instance/dev overrides cannot
|
|
1146
|
+
* bypass rates or capabilities and duplicated alias rows cannot drift apart.
|
|
1147
|
+
*/
|
|
1148
|
+
declare const MODEL_CATALOG_ID_ALIASES: {
|
|
1149
|
+
readonly "gpt-5.6-sol": "gpt-5.6";
|
|
1150
|
+
readonly "claude-opus-4.8": "claude-opus-4-8";
|
|
1151
|
+
readonly "claude-sonnet-4.6": "claude-sonnet-4-6";
|
|
1152
|
+
};
|
|
1153
|
+
declare const normalizeModelCatalogId: (modelId: string) => string;
|
|
1154
|
+
/**
|
|
1155
|
+
* Whether stella should emit a `temperature` override for this model.
|
|
1156
|
+
* This is deliberately stricter than provider acceptance: deprecated
|
|
1157
|
+
* parameters that are accepted but ignored resolve to `false`. Unknown ids
|
|
1158
|
+
* also resolve to `false` (send nothing; provider default). Callers must
|
|
1159
|
+
* never index `MODEL_TEMPERATURE_POLICIES` directly with
|
|
1160
|
+
* a runtime string.
|
|
1161
|
+
*/
|
|
1162
|
+
declare const shouldEmitTemperature: (modelId: string) => boolean;
|
|
1163
|
+
/**
|
|
1164
|
+
* Declared reasoning-effort values for a model ID, or `null` when the
|
|
1165
|
+
* model has no effort control or is not catalogued (custom deployments,
|
|
1166
|
+
* env overrides). Callers must never index `MODEL_REASONING_EFFORTS`
|
|
1167
|
+
* directly with a runtime string.
|
|
1168
|
+
*/
|
|
1169
|
+
declare const getModelReasoningEfforts: (modelId: string) => readonly ReasoningEffort[] | null;
|
|
1170
|
+
/**
|
|
1171
|
+
* Concrete provider-default effort published for a model, or null when the
|
|
1172
|
+
* provider exposes no named default. Unknown ids also resolve to null.
|
|
1173
|
+
*/
|
|
1174
|
+
declare const getModelDefaultReasoningEffort: (modelId: string) => ReasoningEffort | null;
|
|
1175
|
+
type ResolveReasoningEffortOptions = {
|
|
1176
|
+
modelId: string;
|
|
1177
|
+
requested: ReasoningEffort;
|
|
1178
|
+
};
|
|
1179
|
+
/**
|
|
1180
|
+
* Clamp a requested reasoning effort into the target model's declared
|
|
1181
|
+
* capability.
|
|
1182
|
+
*
|
|
1183
|
+
* - Unknown model or no effort control → `null` (send no effort at
|
|
1184
|
+
* all; the provider default is the only universally safe choice).
|
|
1185
|
+
* - Requested value supported → returned unchanged.
|
|
1186
|
+
* - Otherwise → the supported value nearest on `REASONING_EFFORTS`,
|
|
1187
|
+
* preferring the weaker side on ties, so a "none" request against a
|
|
1188
|
+
* reasoning-mandatory model degrades to its weakest tier instead of
|
|
1189
|
+
* erroring, and requests above the model's ceiling clamp down to it.
|
|
1190
|
+
*/
|
|
1191
|
+
declare const resolveReasoningEffort: ({ modelId, requested }: ResolveReasoningEffortOptions) => ResolvedReasoningEffort | null;
|
|
1100
1192
|
declare const getModelRate: (modelId: string) => ModelRate | undefined;
|
|
1101
1193
|
/**
|
|
1102
1194
|
* Documented input context-window sizes (in tokens) per model ID.
|
|
@@ -1123,6 +1215,7 @@ declare const CONTEXT_WINDOW_TOKENS: {
|
|
|
1123
1215
|
readonly "gemini-3.5-flash-lite": 1048576;
|
|
1124
1216
|
readonly "gemini-3.6-flash": 1048576;
|
|
1125
1217
|
readonly "gemini-3.7-flash": 1048576;
|
|
1218
|
+
readonly "gemini-3.8-flash": 1048576;
|
|
1126
1219
|
readonly "gemini-3.1-pro-preview": 1048576;
|
|
1127
1220
|
readonly "gpt-4o-mini": 128000;
|
|
1128
1221
|
readonly "gpt-4o": 128000;
|
|
@@ -1151,6 +1244,7 @@ declare const CONTEXT_WINDOW_TOKENS: {
|
|
|
1151
1244
|
readonly "magistral-small-latest": 128000;
|
|
1152
1245
|
readonly "magistral-small": 128000;
|
|
1153
1246
|
readonly "pixtral-large-latest": 128000;
|
|
1247
|
+
readonly "google/gemini-3.8-flash": 1048576;
|
|
1154
1248
|
readonly "google/gemini-3.7-flash": 1048576;
|
|
1155
1249
|
readonly "google/gemini-3.6-flash": 1048576;
|
|
1156
1250
|
readonly "google/gemini-3.5-flash-lite": 1048576;
|
|
@@ -1187,4 +1281,4 @@ declare const DEFAULT_CONTEXT_WINDOW_TOKENS = 128000;
|
|
|
1187
1281
|
*/
|
|
1188
1282
|
declare const getContextWindowTokens: (modelId: string) => number;
|
|
1189
1283
|
//#endregion
|
|
1190
|
-
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, MODEL_CATALOG_ID_ALIASES, MODEL_CATALOG_PROVIDER_KIND, MODEL_DEFAULT_REASONING_EFFORTS, MODEL_DISPLAY_METADATA, MODEL_RATES, MODEL_REASONING_EFFORTS, MODEL_ROLES, MODEL_TEMPERATURE_POLICIES, ModelDisplayMetadata, ModelRate, ModelRateAmounts, ModelRole, OfferedBYOKModelId, REASONING_EFFORTS, ReasoningEffort, ResolveReasoningEffortOptions, ResolvedReasoningEffort, TANSTACK_AI_PROVIDERS, TEMPERATURE_POLICIES, TanStackAIProvider, TemperaturePolicy, getContextWindowTokens, getModelDefaultReasoningEffort, getModelDisplayMetadata, getModelRate, getModelReasoningEfforts, getStandardModelRate, isBYOKModelRoleSupported, isBYOKProviderRoleSupported, isChatPdfAttachmentModelSupported, normalizeModelCatalogId, resolveModelRate, resolveReasoningEffort, resolveWorkingBYOKModelForRole, shouldEmitTemperature };
|
|
1284
|
+
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, 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_RATES, MODEL_RATE_UNITS_PER_USD, MODEL_REASONING_EFFORTS, MODEL_ROLES, MODEL_TEMPERATURE_POLICIES, ModelDisplayMetadata, type ModelRate, type ModelRateAmounts, ModelRole, type ModelsDevRateProvider, OfferedBYOKModelId, REASONING_EFFORTS, RETAINED_MODELS_DEV_RATE_ENTRIES, ReasoningEffort, ResolveReasoningEffortOptions, ResolvedReasoningEffort, TANSTACK_AI_PROVIDERS, TEMPERATURE_POLICIES, TanStackAIProvider, TemperaturePolicy, getContextWindowTokens, getModelDefaultReasoningEffort, getModelDisplayMetadata, getModelRate, getModelReasoningEfforts, getStandardModelRate, isBYOKModelRoleSupported, isBYOKProviderRoleSupported, isChatPdfAttachmentModelSupported, normalizeModelCatalogId, resolveModelRate, resolveReasoningEffort, resolveWorkingBYOKModelForRole, shouldEmitTemperature };
|