@agentproto/model-catalog 0.8.3 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/access/index.d.ts +3 -3
  2. package/dist/access/index.mjs +5 -2
  3. package/dist/catalog-Cg0AJJZ7.d.ts +1608 -0
  4. package/dist/{chunk-2SKZUBMM.mjs → chunk-BR4ZEPA7.mjs} +21 -10
  5. package/dist/chunk-BR4ZEPA7.mjs.map +1 -0
  6. package/dist/{chunk-S4FSGGYM.mjs → chunk-CBP4SNOX.mjs} +1125 -1042
  7. package/dist/chunk-CBP4SNOX.mjs.map +1 -0
  8. package/dist/{chunk-5HQRMBGT.mjs → chunk-FTHTPPAY.mjs} +4 -4
  9. package/dist/{chunk-5HQRMBGT.mjs.map → chunk-FTHTPPAY.mjs.map} +1 -1
  10. package/dist/{chunk-BTH4CCPA.mjs → chunk-GEXPCKCK.mjs} +2063 -498
  11. package/dist/chunk-GEXPCKCK.mjs.map +1 -0
  12. package/dist/{chunk-HRRG2RZO.mjs → chunk-NSTJSCCC.mjs} +3 -3
  13. package/dist/{chunk-HRRG2RZO.mjs.map → chunk-NSTJSCCC.mjs.map} +1 -1
  14. package/dist/{chunk-QSNCRU56.mjs → chunk-RCQRQD3A.mjs} +4 -4
  15. package/dist/{chunk-QSNCRU56.mjs.map → chunk-RCQRQD3A.mjs.map} +1 -1
  16. package/dist/{chunk-WTHHXXIK.mjs → chunk-W7HLNKXV.mjs} +6 -4
  17. package/dist/chunk-W7HLNKXV.mjs.map +1 -0
  18. package/dist/{chunk-O7TXHU5W.mjs → chunk-ZTTWZ7PL.mjs} +19 -3
  19. package/dist/chunk-ZTTWZ7PL.mjs.map +1 -0
  20. package/dist/cost/index.mjs +6 -6
  21. package/dist/curation/index.d.ts +2 -2
  22. package/dist/curation/index.mjs +6 -6
  23. package/dist/{evaluate-B8acQr7z.d.ts → evaluate-D3gXrAg-.d.ts} +1 -1
  24. package/dist/{index-BWygVxw8.d.ts → index-BZfxAdXA.d.ts} +10 -2
  25. package/dist/{index-Czs4wISu.d.ts → index-DC8jecem.d.ts} +2 -2
  26. package/dist/index.d.ts +5 -5
  27. package/dist/index.mjs +10 -10
  28. package/dist/llm/index.d.ts +12 -2
  29. package/dist/llm/index.mjs +2 -2
  30. package/dist/overlay/index.d.ts +1 -1
  31. package/dist/picker/index.d.ts +4 -4
  32. package/dist/route-identity/index.d.ts +1 -1
  33. package/dist/route-identity/index.mjs +2 -2
  34. package/package.json +2 -2
  35. package/dist/catalog-BbfjJxKT.d.ts +0 -866
  36. package/dist/chunk-2SKZUBMM.mjs.map +0 -1
  37. package/dist/chunk-BTH4CCPA.mjs.map +0 -1
  38. package/dist/chunk-O7TXHU5W.mjs.map +0 -1
  39. package/dist/chunk-S4FSGGYM.mjs.map +0 -1
  40. package/dist/chunk-WTHHXXIK.mjs.map +0 -1
@@ -0,0 +1,1608 @@
1
+ import { b as CatalogProvider } from './base-B8IIoaqg.js';
2
+
3
+ declare const OPENROUTER_ROUTES: Record<string, LLMPricing>;
4
+
5
+ interface ContextWindowEntry {
6
+ contextWindow: number;
7
+ maxOutput?: number;
8
+ displayName?: string;
9
+ provider: "anthropic" | "groq" | "xai" | "moonshot" | "mistral" | "google";
10
+ }
11
+ declare const CONTEXT_WINDOWS: Record<string, ContextWindowEntry>;
12
+
13
+ /**
14
+ * LLM Pricing Catalog — per-token costs for all LLM models.
15
+ *
16
+ * Migrated from `packages/core/src/config/llm-pricing.ts` (commit `eeb1acdc`
17
+ * era). The original location now re-exports from here so every existing
18
+ * consumer (orchestrator dynamic imports, agent-analytics) keeps working.
19
+ *
20
+ * Prices in USD per 1M tokens (input and output separated).
21
+ * Credit costs are what we charge users (includes margin).
22
+ */
23
+
24
+ interface LLMPricing {
25
+ /** Provider cost: $ per 1M input tokens */
26
+ inputPer1M: number;
27
+ /** Provider cost: $ per 1M output tokens */
28
+ outputPer1M: number;
29
+ /**
30
+ * Strategic per-model centicredit override for input. Bypasses the
31
+ * default `inputPer1M × text-markup / CC_USD_RATE` formula. Use only
32
+ * for explicit loss-leader / promo models — formula path is
33
+ * cost-plus-margin by construction and self-heals when providers
34
+ * change rates.
35
+ *
36
+ * Unit: **centicredits per 1M input tokens** (1 displayed credit =
37
+ * 100 cc). Example: `overrideCreditInputPer1M: 1000` charges 10
38
+ * displayed credits per 1M input tokens.
39
+ */
40
+ overrideCreditInputPer1M?: number;
41
+ /** Same as `overrideCreditInputPer1M`, for output tokens. Unit: cc/1M. */
42
+ overrideCreditOutputPer1M?: number;
43
+ /**
44
+ * Provider-side discount for cache-read tokens (Anthropic prompt
45
+ * caching: ~10% of base input). Default 1.0 — no cache discount —
46
+ * for providers without prompt caching. Applies to BOTH the
47
+ * provider-cost calculation AND the derived credit cost so the
48
+ * margin holds for cached vs uncached tokens.
49
+ */
50
+ cacheReadMultiplier?: number;
51
+ /**
52
+ * Provider-side premium for cache-creation tokens (Anthropic prompt
53
+ * caching: ~125% of base input — slightly more than uncached, but
54
+ * the savings come from subsequent reads). Default 1.0. Applies to
55
+ * BOTH sides like `cacheReadMultiplier`.
56
+ */
57
+ cacheWriteMultiplier?: number;
58
+ /**
59
+ * Router / SDK used to call the model. Same model can be reachable via
60
+ * multiple providers — `claude-sonnet-4-5` is `provider: "anthropic"`
61
+ * when called through the Anthropic SDK and `provider: "openrouter"`
62
+ * when routed through OpenRouter. Distinct from `vendor`: this is HOW
63
+ * we reach the model, not WHO made it.
64
+ * - bare ids (`claude-sonnet-4-5`, `gpt-4o`, `gemini-2.5-flash`)
65
+ * → `"anthropic" | "openai" | "google"` (direct providers)
66
+ * - slash ids (`anthropic/claude-sonnet-4-5`, `qwen/qwen3-coder`)
67
+ * → `"openrouter"` (always — the slash is the OpenRouter route
68
+ * convention and the OpenRouter SDK is what runs them)
69
+ *
70
+ * The runtime can still pass an explicit `connectorUsed` to
71
+ * `emitUsageEvent` — that wins over this default and covers the
72
+ * edge case where a guild has multiple connectors and the
73
+ * dispatcher routed to a non-default one.
74
+ */
75
+ provider?: CatalogProvider;
76
+ /**
77
+ * Who authored / built the model. Permanent attribute, independent of
78
+ * the router: `claude-sonnet-4-5` is always `vendor: "anthropic"`
79
+ * regardless of whether `provider` is `"anthropic"` (direct) or
80
+ * `"openrouter"` (proxied). Used for display labels, BYOK gating, and
81
+ * analytics grouping. Examples: `anthropic`, `openai`, `google`,
82
+ * `moonshot`, `mistralai`, `minimax`, `meta`, `qwen`, `deepseek`.
83
+ */
84
+ vendor?: string;
85
+ /**
86
+ * ISO date (`YYYY-MM-DD`) this id was first seen by a catalog-sync run.
87
+ * Generator-owned (currently emitted by `llm:openrouter` / `llm:requesty`;
88
+ * hand-maintained catalog rows below leave it unset) — backfilled from the
89
+ * provider's own creation timestamp when the source has one, else the
90
+ * sync run's date, and NEVER mutated once stamped. See
91
+ * `packages/catalog-sync/src/added-at.ts` and
92
+ * `packages/catalog-sync/README.md` for the full convention.
93
+ */
94
+ addedAt?: string;
95
+ }
96
+
97
+ declare const LLM_PRICING_CATALOG: {
98
+ "grok-4.20": {
99
+ readonly inputPer1M: 1.25;
100
+ readonly outputPer1M: 2.5;
101
+ readonly cachedInputPer1M: 0.2;
102
+ readonly longContext: {
103
+ readonly inputPer1M: 2.5;
104
+ readonly outputPer1M: 5;
105
+ readonly cachedInputPer1M: 0.4;
106
+ readonly thresholdTokens: 200000;
107
+ };
108
+ readonly vendor: "xai";
109
+ readonly provider: "xai";
110
+ };
111
+ "grok-4.20-0309": {
112
+ readonly inputPer1M: 1.25;
113
+ readonly outputPer1M: 2.5;
114
+ readonly cachedInputPer1M: 0.2;
115
+ readonly longContext: {
116
+ readonly inputPer1M: 2.5;
117
+ readonly outputPer1M: 5;
118
+ readonly cachedInputPer1M: 0.4;
119
+ readonly thresholdTokens: 200000;
120
+ };
121
+ readonly vendor: "xai";
122
+ readonly provider: "xai";
123
+ };
124
+ "grok-4.20-0309-non-reasoning": {
125
+ readonly inputPer1M: 1.25;
126
+ readonly outputPer1M: 2.5;
127
+ readonly cachedInputPer1M: 0.2;
128
+ readonly longContext: {
129
+ readonly inputPer1M: 2.5;
130
+ readonly outputPer1M: 5;
131
+ readonly cachedInputPer1M: 0.4;
132
+ readonly thresholdTokens: 200000;
133
+ };
134
+ readonly vendor: "xai";
135
+ readonly provider: "xai";
136
+ };
137
+ "grok-4.20-0309-reasoning": {
138
+ readonly inputPer1M: 1.25;
139
+ readonly outputPer1M: 2.5;
140
+ readonly cachedInputPer1M: 0.2;
141
+ readonly longContext: {
142
+ readonly inputPer1M: 2.5;
143
+ readonly outputPer1M: 5;
144
+ readonly cachedInputPer1M: 0.4;
145
+ readonly thresholdTokens: 200000;
146
+ };
147
+ readonly vendor: "xai";
148
+ readonly provider: "xai";
149
+ };
150
+ "grok-4.20-beta": {
151
+ readonly inputPer1M: 1.25;
152
+ readonly outputPer1M: 2.5;
153
+ readonly cachedInputPer1M: 0.2;
154
+ readonly longContext: {
155
+ readonly inputPer1M: 2.5;
156
+ readonly outputPer1M: 5;
157
+ readonly cachedInputPer1M: 0.4;
158
+ readonly thresholdTokens: 200000;
159
+ };
160
+ readonly vendor: "xai";
161
+ readonly provider: "xai";
162
+ };
163
+ "grok-4.20-beta-0309": {
164
+ readonly inputPer1M: 1.25;
165
+ readonly outputPer1M: 2.5;
166
+ readonly cachedInputPer1M: 0.2;
167
+ readonly longContext: {
168
+ readonly inputPer1M: 2.5;
169
+ readonly outputPer1M: 5;
170
+ readonly cachedInputPer1M: 0.4;
171
+ readonly thresholdTokens: 200000;
172
+ };
173
+ readonly vendor: "xai";
174
+ readonly provider: "xai";
175
+ };
176
+ "grok-4.20-beta-0309-non-reasoning": {
177
+ readonly inputPer1M: 1.25;
178
+ readonly outputPer1M: 2.5;
179
+ readonly cachedInputPer1M: 0.2;
180
+ readonly longContext: {
181
+ readonly inputPer1M: 2.5;
182
+ readonly outputPer1M: 5;
183
+ readonly cachedInputPer1M: 0.4;
184
+ readonly thresholdTokens: 200000;
185
+ };
186
+ readonly vendor: "xai";
187
+ readonly provider: "xai";
188
+ };
189
+ "grok-4.20-beta-0309-reasoning": {
190
+ readonly inputPer1M: 1.25;
191
+ readonly outputPer1M: 2.5;
192
+ readonly cachedInputPer1M: 0.2;
193
+ readonly longContext: {
194
+ readonly inputPer1M: 2.5;
195
+ readonly outputPer1M: 5;
196
+ readonly cachedInputPer1M: 0.4;
197
+ readonly thresholdTokens: 200000;
198
+ };
199
+ readonly vendor: "xai";
200
+ readonly provider: "xai";
201
+ };
202
+ "grok-4.20-beta-latest": {
203
+ readonly inputPer1M: 1.25;
204
+ readonly outputPer1M: 2.5;
205
+ readonly cachedInputPer1M: 0.2;
206
+ readonly longContext: {
207
+ readonly inputPer1M: 2.5;
208
+ readonly outputPer1M: 5;
209
+ readonly cachedInputPer1M: 0.4;
210
+ readonly thresholdTokens: 200000;
211
+ };
212
+ readonly vendor: "xai";
213
+ readonly provider: "xai";
214
+ };
215
+ "grok-4.20-beta-latest-non-reasoning": {
216
+ readonly inputPer1M: 1.25;
217
+ readonly outputPer1M: 2.5;
218
+ readonly cachedInputPer1M: 0.2;
219
+ readonly longContext: {
220
+ readonly inputPer1M: 2.5;
221
+ readonly outputPer1M: 5;
222
+ readonly cachedInputPer1M: 0.4;
223
+ readonly thresholdTokens: 200000;
224
+ };
225
+ readonly vendor: "xai";
226
+ readonly provider: "xai";
227
+ };
228
+ "grok-4.20-beta-latest-reasoning": {
229
+ readonly inputPer1M: 1.25;
230
+ readonly outputPer1M: 2.5;
231
+ readonly cachedInputPer1M: 0.2;
232
+ readonly longContext: {
233
+ readonly inputPer1M: 2.5;
234
+ readonly outputPer1M: 5;
235
+ readonly cachedInputPer1M: 0.4;
236
+ readonly thresholdTokens: 200000;
237
+ };
238
+ readonly vendor: "xai";
239
+ readonly provider: "xai";
240
+ };
241
+ "grok-4.20-beta-non-reasoning": {
242
+ readonly inputPer1M: 1.25;
243
+ readonly outputPer1M: 2.5;
244
+ readonly cachedInputPer1M: 0.2;
245
+ readonly longContext: {
246
+ readonly inputPer1M: 2.5;
247
+ readonly outputPer1M: 5;
248
+ readonly cachedInputPer1M: 0.4;
249
+ readonly thresholdTokens: 200000;
250
+ };
251
+ readonly vendor: "xai";
252
+ readonly provider: "xai";
253
+ };
254
+ "grok-4.20-beta-reasoning": {
255
+ readonly inputPer1M: 1.25;
256
+ readonly outputPer1M: 2.5;
257
+ readonly cachedInputPer1M: 0.2;
258
+ readonly longContext: {
259
+ readonly inputPer1M: 2.5;
260
+ readonly outputPer1M: 5;
261
+ readonly cachedInputPer1M: 0.4;
262
+ readonly thresholdTokens: 200000;
263
+ };
264
+ readonly vendor: "xai";
265
+ readonly provider: "xai";
266
+ };
267
+ "grok-4.20-experimental-beta-0304": {
268
+ readonly inputPer1M: 1.25;
269
+ readonly outputPer1M: 2.5;
270
+ readonly cachedInputPer1M: 0.2;
271
+ readonly longContext: {
272
+ readonly inputPer1M: 2.5;
273
+ readonly outputPer1M: 5;
274
+ readonly cachedInputPer1M: 0.4;
275
+ readonly thresholdTokens: 200000;
276
+ };
277
+ readonly vendor: "xai";
278
+ readonly provider: "xai";
279
+ };
280
+ "grok-4.20-experimental-beta-0304-non-reasoning": {
281
+ readonly inputPer1M: 1.25;
282
+ readonly outputPer1M: 2.5;
283
+ readonly cachedInputPer1M: 0.2;
284
+ readonly longContext: {
285
+ readonly inputPer1M: 2.5;
286
+ readonly outputPer1M: 5;
287
+ readonly cachedInputPer1M: 0.4;
288
+ readonly thresholdTokens: 200000;
289
+ };
290
+ readonly vendor: "xai";
291
+ readonly provider: "xai";
292
+ };
293
+ "grok-4.20-experimental-beta-0304-reasoning": {
294
+ readonly inputPer1M: 1.25;
295
+ readonly outputPer1M: 2.5;
296
+ readonly cachedInputPer1M: 0.2;
297
+ readonly longContext: {
298
+ readonly inputPer1M: 2.5;
299
+ readonly outputPer1M: 5;
300
+ readonly cachedInputPer1M: 0.4;
301
+ readonly thresholdTokens: 200000;
302
+ };
303
+ readonly vendor: "xai";
304
+ readonly provider: "xai";
305
+ };
306
+ "grok-4.20-experimental-beta-latest": {
307
+ readonly inputPer1M: 1.25;
308
+ readonly outputPer1M: 2.5;
309
+ readonly cachedInputPer1M: 0.2;
310
+ readonly longContext: {
311
+ readonly inputPer1M: 2.5;
312
+ readonly outputPer1M: 5;
313
+ readonly cachedInputPer1M: 0.4;
314
+ readonly thresholdTokens: 200000;
315
+ };
316
+ readonly vendor: "xai";
317
+ readonly provider: "xai";
318
+ };
319
+ "grok-4.20-experimental-beta-non-reasoning-latest": {
320
+ readonly inputPer1M: 1.25;
321
+ readonly outputPer1M: 2.5;
322
+ readonly cachedInputPer1M: 0.2;
323
+ readonly longContext: {
324
+ readonly inputPer1M: 2.5;
325
+ readonly outputPer1M: 5;
326
+ readonly cachedInputPer1M: 0.4;
327
+ readonly thresholdTokens: 200000;
328
+ };
329
+ readonly vendor: "xai";
330
+ readonly provider: "xai";
331
+ };
332
+ "grok-4.20-experimental-beta-reasoning-latest": {
333
+ readonly inputPer1M: 1.25;
334
+ readonly outputPer1M: 2.5;
335
+ readonly cachedInputPer1M: 0.2;
336
+ readonly longContext: {
337
+ readonly inputPer1M: 2.5;
338
+ readonly outputPer1M: 5;
339
+ readonly cachedInputPer1M: 0.4;
340
+ readonly thresholdTokens: 200000;
341
+ };
342
+ readonly vendor: "xai";
343
+ readonly provider: "xai";
344
+ };
345
+ "grok-4.20-multi-agent": {
346
+ readonly inputPer1M: 1.25;
347
+ readonly outputPer1M: 2.5;
348
+ readonly cachedInputPer1M: 0.2;
349
+ readonly longContext: {
350
+ readonly inputPer1M: 2.5;
351
+ readonly outputPer1M: 5;
352
+ readonly cachedInputPer1M: 0.4;
353
+ readonly thresholdTokens: 200000;
354
+ };
355
+ readonly vendor: "xai";
356
+ readonly provider: "xai";
357
+ };
358
+ "grok-4.20-multi-agent-0309": {
359
+ readonly inputPer1M: 1.25;
360
+ readonly outputPer1M: 2.5;
361
+ readonly cachedInputPer1M: 0.2;
362
+ readonly longContext: {
363
+ readonly inputPer1M: 2.5;
364
+ readonly outputPer1M: 5;
365
+ readonly cachedInputPer1M: 0.4;
366
+ readonly thresholdTokens: 200000;
367
+ };
368
+ readonly vendor: "xai";
369
+ readonly provider: "xai";
370
+ };
371
+ "grok-4.20-multi-agent-beta-0309": {
372
+ readonly inputPer1M: 1.25;
373
+ readonly outputPer1M: 2.5;
374
+ readonly cachedInputPer1M: 0.2;
375
+ readonly longContext: {
376
+ readonly inputPer1M: 2.5;
377
+ readonly outputPer1M: 5;
378
+ readonly cachedInputPer1M: 0.4;
379
+ readonly thresholdTokens: 200000;
380
+ };
381
+ readonly vendor: "xai";
382
+ readonly provider: "xai";
383
+ };
384
+ "grok-4.20-multi-agent-beta-latest": {
385
+ readonly inputPer1M: 1.25;
386
+ readonly outputPer1M: 2.5;
387
+ readonly cachedInputPer1M: 0.2;
388
+ readonly longContext: {
389
+ readonly inputPer1M: 2.5;
390
+ readonly outputPer1M: 5;
391
+ readonly cachedInputPer1M: 0.4;
392
+ readonly thresholdTokens: 200000;
393
+ };
394
+ readonly vendor: "xai";
395
+ readonly provider: "xai";
396
+ };
397
+ "grok-4.20-multi-agent-experimental-beta-0304": {
398
+ readonly inputPer1M: 1.25;
399
+ readonly outputPer1M: 2.5;
400
+ readonly cachedInputPer1M: 0.2;
401
+ readonly longContext: {
402
+ readonly inputPer1M: 2.5;
403
+ readonly outputPer1M: 5;
404
+ readonly cachedInputPer1M: 0.4;
405
+ readonly thresholdTokens: 200000;
406
+ };
407
+ readonly vendor: "xai";
408
+ readonly provider: "xai";
409
+ };
410
+ "grok-4.20-multi-agent-experimental-beta-latest": {
411
+ readonly inputPer1M: 1.25;
412
+ readonly outputPer1M: 2.5;
413
+ readonly cachedInputPer1M: 0.2;
414
+ readonly longContext: {
415
+ readonly inputPer1M: 2.5;
416
+ readonly outputPer1M: 5;
417
+ readonly cachedInputPer1M: 0.4;
418
+ readonly thresholdTokens: 200000;
419
+ };
420
+ readonly vendor: "xai";
421
+ readonly provider: "xai";
422
+ };
423
+ "grok-4.20-multi-agent-latest": {
424
+ readonly inputPer1M: 1.25;
425
+ readonly outputPer1M: 2.5;
426
+ readonly cachedInputPer1M: 0.2;
427
+ readonly longContext: {
428
+ readonly inputPer1M: 2.5;
429
+ readonly outputPer1M: 5;
430
+ readonly cachedInputPer1M: 0.4;
431
+ readonly thresholdTokens: 200000;
432
+ };
433
+ readonly vendor: "xai";
434
+ readonly provider: "xai";
435
+ };
436
+ "grok-4.20-non-reasoning": {
437
+ readonly inputPer1M: 1.25;
438
+ readonly outputPer1M: 2.5;
439
+ readonly cachedInputPer1M: 0.2;
440
+ readonly longContext: {
441
+ readonly inputPer1M: 2.5;
442
+ readonly outputPer1M: 5;
443
+ readonly cachedInputPer1M: 0.4;
444
+ readonly thresholdTokens: 200000;
445
+ };
446
+ readonly vendor: "xai";
447
+ readonly provider: "xai";
448
+ };
449
+ "grok-4.20-non-reasoning-gv2": {
450
+ readonly inputPer1M: 1.25;
451
+ readonly outputPer1M: 2.5;
452
+ readonly cachedInputPer1M: 0.2;
453
+ readonly longContext: {
454
+ readonly inputPer1M: 2.5;
455
+ readonly outputPer1M: 5;
456
+ readonly cachedInputPer1M: 0.4;
457
+ readonly thresholdTokens: 200000;
458
+ };
459
+ readonly vendor: "xai";
460
+ readonly provider: "xai";
461
+ };
462
+ "grok-4.20-non-reasoning-latest": {
463
+ readonly inputPer1M: 1.25;
464
+ readonly outputPer1M: 2.5;
465
+ readonly cachedInputPer1M: 0.2;
466
+ readonly longContext: {
467
+ readonly inputPer1M: 2.5;
468
+ readonly outputPer1M: 5;
469
+ readonly cachedInputPer1M: 0.4;
470
+ readonly thresholdTokens: 200000;
471
+ };
472
+ readonly vendor: "xai";
473
+ readonly provider: "xai";
474
+ };
475
+ "grok-4.20-reasoning": {
476
+ readonly inputPer1M: 1.25;
477
+ readonly outputPer1M: 2.5;
478
+ readonly cachedInputPer1M: 0.2;
479
+ readonly longContext: {
480
+ readonly inputPer1M: 2.5;
481
+ readonly outputPer1M: 5;
482
+ readonly cachedInputPer1M: 0.4;
483
+ readonly thresholdTokens: 200000;
484
+ };
485
+ readonly vendor: "xai";
486
+ readonly provider: "xai";
487
+ };
488
+ "grok-4.20-reasoning-gv2": {
489
+ readonly inputPer1M: 1.25;
490
+ readonly outputPer1M: 2.5;
491
+ readonly cachedInputPer1M: 0.2;
492
+ readonly longContext: {
493
+ readonly inputPer1M: 2.5;
494
+ readonly outputPer1M: 5;
495
+ readonly cachedInputPer1M: 0.4;
496
+ readonly thresholdTokens: 200000;
497
+ };
498
+ readonly vendor: "xai";
499
+ readonly provider: "xai";
500
+ };
501
+ "grok-4.20-reasoning-latest": {
502
+ readonly inputPer1M: 1.25;
503
+ readonly outputPer1M: 2.5;
504
+ readonly cachedInputPer1M: 0.2;
505
+ readonly longContext: {
506
+ readonly inputPer1M: 2.5;
507
+ readonly outputPer1M: 5;
508
+ readonly cachedInputPer1M: 0.4;
509
+ readonly thresholdTokens: 200000;
510
+ };
511
+ readonly vendor: "xai";
512
+ readonly provider: "xai";
513
+ };
514
+ "grok-4.3": {
515
+ readonly inputPer1M: 1.25;
516
+ readonly outputPer1M: 2.5;
517
+ readonly cachedInputPer1M: 0.2;
518
+ readonly longContext: {
519
+ readonly inputPer1M: 2.5;
520
+ readonly outputPer1M: 5;
521
+ readonly cachedInputPer1M: 0.4;
522
+ readonly thresholdTokens: 200000;
523
+ };
524
+ readonly vendor: "xai";
525
+ readonly provider: "xai";
526
+ };
527
+ "grok-4.3-latest": {
528
+ readonly inputPer1M: 1.25;
529
+ readonly outputPer1M: 2.5;
530
+ readonly cachedInputPer1M: 0.2;
531
+ readonly longContext: {
532
+ readonly inputPer1M: 2.5;
533
+ readonly outputPer1M: 5;
534
+ readonly cachedInputPer1M: 0.4;
535
+ readonly thresholdTokens: 200000;
536
+ };
537
+ readonly vendor: "xai";
538
+ readonly provider: "xai";
539
+ };
540
+ "grok-4.5": {
541
+ readonly inputPer1M: 2;
542
+ readonly outputPer1M: 6;
543
+ readonly cachedInputPer1M: 0.3;
544
+ readonly longContext: {
545
+ readonly inputPer1M: 4;
546
+ readonly outputPer1M: 12;
547
+ readonly cachedInputPer1M: 0.6;
548
+ readonly thresholdTokens: 200000;
549
+ };
550
+ readonly vendor: "xai";
551
+ readonly provider: "xai";
552
+ };
553
+ "grok-4.5-latest": {
554
+ readonly inputPer1M: 2;
555
+ readonly outputPer1M: 6;
556
+ readonly cachedInputPer1M: 0.3;
557
+ readonly longContext: {
558
+ readonly inputPer1M: 4;
559
+ readonly outputPer1M: 12;
560
+ readonly cachedInputPer1M: 0.6;
561
+ readonly thresholdTokens: 200000;
562
+ };
563
+ readonly vendor: "xai";
564
+ readonly provider: "xai";
565
+ };
566
+ "grok-4.6": {
567
+ readonly inputPer1M: 2;
568
+ readonly outputPer1M: 6;
569
+ readonly cachedInputPer1M: 0.5;
570
+ readonly longContext: {
571
+ readonly inputPer1M: 4;
572
+ readonly outputPer1M: 12;
573
+ readonly cachedInputPer1M: 1;
574
+ readonly thresholdTokens: 200000;
575
+ };
576
+ readonly vendor: "xai";
577
+ readonly provider: "xai";
578
+ };
579
+ "grok-build-0.1": {
580
+ readonly inputPer1M: 1;
581
+ readonly outputPer1M: 2;
582
+ readonly cachedInputPer1M: 0.2;
583
+ readonly longContext: {
584
+ readonly inputPer1M: 2;
585
+ readonly outputPer1M: 4;
586
+ readonly cachedInputPer1M: 0.4;
587
+ readonly thresholdTokens: 200000;
588
+ };
589
+ readonly vendor: "xai";
590
+ readonly provider: "xai";
591
+ };
592
+ "grok-build-latest": {
593
+ readonly inputPer1M: 2;
594
+ readonly outputPer1M: 6;
595
+ readonly cachedInputPer1M: 0.3;
596
+ readonly longContext: {
597
+ readonly inputPer1M: 4;
598
+ readonly outputPer1M: 12;
599
+ readonly cachedInputPer1M: 0.6;
600
+ readonly thresholdTokens: 200000;
601
+ };
602
+ readonly vendor: "xai";
603
+ readonly provider: "xai";
604
+ };
605
+ "grok-code-fast": {
606
+ readonly inputPer1M: 1;
607
+ readonly outputPer1M: 2;
608
+ readonly cachedInputPer1M: 0.2;
609
+ readonly longContext: {
610
+ readonly inputPer1M: 2;
611
+ readonly outputPer1M: 4;
612
+ readonly cachedInputPer1M: 0.4;
613
+ readonly thresholdTokens: 200000;
614
+ };
615
+ readonly vendor: "xai";
616
+ readonly provider: "xai";
617
+ };
618
+ "grok-code-fast-1": {
619
+ readonly inputPer1M: 1;
620
+ readonly outputPer1M: 2;
621
+ readonly cachedInputPer1M: 0.2;
622
+ readonly longContext: {
623
+ readonly inputPer1M: 2;
624
+ readonly outputPer1M: 4;
625
+ readonly cachedInputPer1M: 0.4;
626
+ readonly thresholdTokens: 200000;
627
+ };
628
+ readonly vendor: "xai";
629
+ readonly provider: "xai";
630
+ };
631
+ "grok-code-fast-1-0825": {
632
+ readonly inputPer1M: 1;
633
+ readonly outputPer1M: 2;
634
+ readonly cachedInputPer1M: 0.2;
635
+ readonly longContext: {
636
+ readonly inputPer1M: 2;
637
+ readonly outputPer1M: 4;
638
+ readonly cachedInputPer1M: 0.4;
639
+ readonly thresholdTokens: 200000;
640
+ };
641
+ readonly vendor: "xai";
642
+ readonly provider: "xai";
643
+ };
644
+ "M2-her": {
645
+ readonly inputPer1M: 0.3;
646
+ readonly outputPer1M: 1.2;
647
+ readonly cacheReadMultiplier: 0.1;
648
+ readonly vendor: "minimax";
649
+ readonly provider: "minimax";
650
+ };
651
+ "MiniMax-M2": {
652
+ readonly inputPer1M: 0.255;
653
+ readonly outputPer1M: 1.02;
654
+ readonly vendor: "minimax";
655
+ readonly provider: "minimax";
656
+ };
657
+ "MiniMax-M2.1": {
658
+ readonly inputPer1M: 0.3;
659
+ readonly outputPer1M: 1.2;
660
+ readonly cacheReadMultiplier: 0.1;
661
+ readonly vendor: "minimax";
662
+ readonly provider: "minimax";
663
+ };
664
+ "MiniMax-M2.5": {
665
+ readonly inputPer1M: 0.27;
666
+ readonly outputPer1M: 1.08;
667
+ readonly cacheReadMultiplier: 0.1;
668
+ readonly vendor: "minimax";
669
+ readonly provider: "minimax";
670
+ };
671
+ "MiniMax-M2.7": {
672
+ readonly inputPer1M: 0.3;
673
+ readonly outputPer1M: 1.2;
674
+ readonly cacheReadMultiplier: 0.2;
675
+ readonly vendor: "minimax";
676
+ readonly provider: "minimax";
677
+ };
678
+ "gpt-3.5-turbo": {
679
+ readonly inputPer1M: 0.5;
680
+ readonly outputPer1M: 1.5;
681
+ readonly vendor: "openai";
682
+ readonly provider: "openai";
683
+ };
684
+ "gpt-3.5-turbo-0613": {
685
+ readonly inputPer1M: 1;
686
+ readonly outputPer1M: 2;
687
+ readonly vendor: "openai";
688
+ readonly provider: "openai";
689
+ };
690
+ "gpt-3.5-turbo-16k": {
691
+ readonly inputPer1M: 3;
692
+ readonly outputPer1M: 4;
693
+ readonly vendor: "openai";
694
+ readonly provider: "openai";
695
+ };
696
+ "gpt-3.5-turbo-instruct": {
697
+ readonly inputPer1M: 1.5;
698
+ readonly outputPer1M: 2;
699
+ readonly vendor: "openai";
700
+ readonly provider: "openai";
701
+ };
702
+ "gpt-4": {
703
+ readonly inputPer1M: 30;
704
+ readonly outputPer1M: 60;
705
+ readonly vendor: "openai";
706
+ readonly provider: "openai";
707
+ };
708
+ "gpt-4-turbo": {
709
+ readonly inputPer1M: 10;
710
+ readonly outputPer1M: 30;
711
+ readonly vendor: "openai";
712
+ readonly provider: "openai";
713
+ };
714
+ "gpt-4-turbo-preview": {
715
+ readonly inputPer1M: 10;
716
+ readonly outputPer1M: 30;
717
+ readonly vendor: "openai";
718
+ readonly provider: "openai";
719
+ };
720
+ "gpt-4.1": {
721
+ readonly inputPer1M: 2;
722
+ readonly outputPer1M: 8;
723
+ readonly cacheReadMultiplier: 0.25;
724
+ readonly vendor: "openai";
725
+ readonly provider: "openai";
726
+ };
727
+ "gpt-4.1-mini": {
728
+ readonly inputPer1M: 0.4;
729
+ readonly outputPer1M: 1.6;
730
+ readonly cacheReadMultiplier: 0.25;
731
+ readonly vendor: "openai";
732
+ readonly provider: "openai";
733
+ };
734
+ "gpt-4.1-nano": {
735
+ readonly inputPer1M: 0.1;
736
+ readonly outputPer1M: 0.4;
737
+ readonly cacheReadMultiplier: 0.25;
738
+ readonly vendor: "openai";
739
+ readonly provider: "openai";
740
+ };
741
+ "gpt-4o": {
742
+ readonly inputPer1M: 2.5;
743
+ readonly outputPer1M: 10;
744
+ readonly cacheReadMultiplier: 0.5;
745
+ readonly vendor: "openai";
746
+ readonly provider: "openai";
747
+ };
748
+ "gpt-4o-2024-05-13": {
749
+ readonly inputPer1M: 5;
750
+ readonly outputPer1M: 15;
751
+ readonly vendor: "openai";
752
+ readonly provider: "openai";
753
+ };
754
+ "gpt-4o-2024-08-06": {
755
+ readonly inputPer1M: 2.5;
756
+ readonly outputPer1M: 10;
757
+ readonly cacheReadMultiplier: 0.5;
758
+ readonly vendor: "openai";
759
+ readonly provider: "openai";
760
+ };
761
+ "gpt-4o-2024-11-20": {
762
+ readonly inputPer1M: 2.5;
763
+ readonly outputPer1M: 10;
764
+ readonly cacheReadMultiplier: 0.5;
765
+ readonly vendor: "openai";
766
+ readonly provider: "openai";
767
+ };
768
+ "gpt-4o-mini": {
769
+ readonly inputPer1M: 0.15;
770
+ readonly outputPer1M: 0.6;
771
+ readonly cacheReadMultiplier: 0.5;
772
+ readonly vendor: "openai";
773
+ readonly provider: "openai";
774
+ };
775
+ "gpt-4o-mini-2024-07-18": {
776
+ readonly inputPer1M: 0.15;
777
+ readonly outputPer1M: 0.6;
778
+ readonly cacheReadMultiplier: 0.5;
779
+ readonly vendor: "openai";
780
+ readonly provider: "openai";
781
+ };
782
+ "gpt-5": {
783
+ readonly inputPer1M: 1.25;
784
+ readonly outputPer1M: 10;
785
+ readonly cacheReadMultiplier: 0.1;
786
+ readonly vendor: "openai";
787
+ readonly provider: "openai";
788
+ };
789
+ "gpt-5-image": {
790
+ readonly inputPer1M: 10;
791
+ readonly outputPer1M: 10;
792
+ readonly cacheReadMultiplier: 0.125;
793
+ readonly vendor: "openai";
794
+ readonly provider: "openai";
795
+ };
796
+ "gpt-5-image-mini": {
797
+ readonly inputPer1M: 2.5;
798
+ readonly outputPer1M: 2;
799
+ readonly cacheReadMultiplier: 0.1;
800
+ readonly vendor: "openai";
801
+ readonly provider: "openai";
802
+ };
803
+ "gpt-5-mini": {
804
+ readonly inputPer1M: 0.25;
805
+ readonly outputPer1M: 2;
806
+ readonly cacheReadMultiplier: 0.1;
807
+ readonly vendor: "openai";
808
+ readonly provider: "openai";
809
+ };
810
+ "gpt-5-nano": {
811
+ readonly inputPer1M: 0.05;
812
+ readonly outputPer1M: 0.4;
813
+ readonly cacheReadMultiplier: 0.1;
814
+ readonly vendor: "openai";
815
+ readonly provider: "openai";
816
+ };
817
+ "gpt-5-pro": {
818
+ readonly inputPer1M: 15;
819
+ readonly outputPer1M: 120;
820
+ readonly vendor: "openai";
821
+ readonly provider: "openai";
822
+ };
823
+ "gpt-5.1": {
824
+ readonly inputPer1M: 1.25;
825
+ readonly outputPer1M: 10;
826
+ readonly cacheReadMultiplier: 0.1;
827
+ readonly vendor: "openai";
828
+ readonly provider: "openai";
829
+ };
830
+ "gpt-5.1-codex": {
831
+ readonly inputPer1M: 1.25;
832
+ readonly outputPer1M: 10;
833
+ readonly cacheReadMultiplier: 0.104;
834
+ readonly vendor: "openai";
835
+ readonly provider: "openai";
836
+ };
837
+ "gpt-5.1-codex-max": {
838
+ readonly inputPer1M: 1.25;
839
+ readonly outputPer1M: 10;
840
+ readonly cacheReadMultiplier: 0.1;
841
+ readonly vendor: "openai";
842
+ readonly provider: "openai";
843
+ };
844
+ "gpt-5.1-codex-mini": {
845
+ readonly inputPer1M: 0.25;
846
+ readonly outputPer1M: 2;
847
+ readonly cacheReadMultiplier: 0.12;
848
+ readonly vendor: "openai";
849
+ readonly provider: "openai";
850
+ };
851
+ "gpt-5.2": {
852
+ readonly inputPer1M: 1.75;
853
+ readonly outputPer1M: 14;
854
+ readonly cacheReadMultiplier: 0.1;
855
+ readonly vendor: "openai";
856
+ readonly provider: "openai";
857
+ };
858
+ "gpt-5.2-chat": {
859
+ readonly inputPer1M: 1.75;
860
+ readonly outputPer1M: 14;
861
+ readonly cacheReadMultiplier: 0.1;
862
+ readonly vendor: "openai";
863
+ readonly provider: "openai";
864
+ };
865
+ "gpt-5.2-codex": {
866
+ readonly inputPer1M: 1.75;
867
+ readonly outputPer1M: 14;
868
+ readonly cacheReadMultiplier: 0.1;
869
+ readonly vendor: "openai";
870
+ readonly provider: "openai";
871
+ };
872
+ "gpt-5.2-pro": {
873
+ readonly inputPer1M: 21;
874
+ readonly outputPer1M: 168;
875
+ readonly vendor: "openai";
876
+ readonly provider: "openai";
877
+ };
878
+ "gpt-5.3-codex": {
879
+ readonly inputPer1M: 1.75;
880
+ readonly outputPer1M: 14;
881
+ readonly cacheReadMultiplier: 0.1;
882
+ readonly vendor: "openai";
883
+ readonly provider: "openai";
884
+ };
885
+ "gpt-5.4": {
886
+ readonly inputPer1M: 2.5;
887
+ readonly outputPer1M: 15;
888
+ readonly cacheReadMultiplier: 0.1;
889
+ readonly vendor: "openai";
890
+ readonly provider: "openai";
891
+ };
892
+ "gpt-5.4-mini": {
893
+ readonly inputPer1M: 0.75;
894
+ readonly outputPer1M: 4.5;
895
+ readonly cacheReadMultiplier: 0.1;
896
+ readonly vendor: "openai";
897
+ readonly provider: "openai";
898
+ };
899
+ "gpt-5.4-nano": {
900
+ readonly inputPer1M: 0.2;
901
+ readonly outputPer1M: 1.25;
902
+ readonly cacheReadMultiplier: 0.1;
903
+ readonly vendor: "openai";
904
+ readonly provider: "openai";
905
+ };
906
+ "gpt-5.4-pro": {
907
+ readonly inputPer1M: 30;
908
+ readonly outputPer1M: 180;
909
+ readonly vendor: "openai";
910
+ readonly provider: "openai";
911
+ };
912
+ "gpt-5.5": {
913
+ readonly inputPer1M: 5;
914
+ readonly outputPer1M: 30;
915
+ readonly cacheReadMultiplier: 0.1;
916
+ readonly vendor: "openai";
917
+ readonly provider: "openai";
918
+ };
919
+ "gpt-5.5-pro": {
920
+ readonly inputPer1M: 30;
921
+ readonly outputPer1M: 180;
922
+ readonly vendor: "openai";
923
+ readonly provider: "openai";
924
+ };
925
+ "gpt-5.6-luna": {
926
+ readonly inputPer1M: 0.2;
927
+ readonly outputPer1M: 1.2;
928
+ readonly cacheReadMultiplier: 0.1;
929
+ readonly cacheWriteMultiplier: 1.25;
930
+ readonly vendor: "openai";
931
+ readonly provider: "openai";
932
+ };
933
+ "gpt-5.6-luna-pro": {
934
+ readonly inputPer1M: 0.2;
935
+ readonly outputPer1M: 1.2;
936
+ readonly cacheReadMultiplier: 0.1;
937
+ readonly cacheWriteMultiplier: 1.25;
938
+ readonly vendor: "openai";
939
+ readonly provider: "openai";
940
+ };
941
+ "gpt-5.6-sol": {
942
+ readonly inputPer1M: 2;
943
+ readonly outputPer1M: 10;
944
+ readonly cacheReadMultiplier: 0.1;
945
+ readonly cacheWriteMultiplier: 1.25;
946
+ readonly vendor: "openai";
947
+ readonly provider: "openai";
948
+ };
949
+ "gpt-5.6-sol-pro": {
950
+ readonly inputPer1M: 2;
951
+ readonly outputPer1M: 10;
952
+ readonly cacheReadMultiplier: 0.1;
953
+ readonly cacheWriteMultiplier: 1.25;
954
+ readonly vendor: "openai";
955
+ readonly provider: "openai";
956
+ };
957
+ "gpt-5.6-terra": {
958
+ readonly inputPer1M: 2;
959
+ readonly outputPer1M: 12;
960
+ readonly cacheReadMultiplier: 0.1;
961
+ readonly cacheWriteMultiplier: 1.25;
962
+ readonly vendor: "openai";
963
+ readonly provider: "openai";
964
+ };
965
+ "gpt-5.6-terra-pro": {
966
+ readonly inputPer1M: 2;
967
+ readonly outputPer1M: 12;
968
+ readonly cacheReadMultiplier: 0.1;
969
+ readonly cacheWriteMultiplier: 1.25;
970
+ readonly vendor: "openai";
971
+ readonly provider: "openai";
972
+ };
973
+ "gpt-audio": {
974
+ readonly inputPer1M: 2.5;
975
+ readonly outputPer1M: 10;
976
+ readonly vendor: "openai";
977
+ readonly provider: "openai";
978
+ };
979
+ "gpt-audio-mini": {
980
+ readonly inputPer1M: 0.6;
981
+ readonly outputPer1M: 2.4;
982
+ readonly vendor: "openai";
983
+ readonly provider: "openai";
984
+ };
985
+ "gpt-chat-latest": {
986
+ readonly inputPer1M: 5;
987
+ readonly outputPer1M: 30;
988
+ readonly cacheReadMultiplier: 0.1;
989
+ readonly vendor: "openai";
990
+ readonly provider: "openai";
991
+ };
992
+ "gpt-oss-120b": {
993
+ readonly inputPer1M: 0.037;
994
+ readonly outputPer1M: 0.17;
995
+ readonly vendor: "openai";
996
+ readonly provider: "openai";
997
+ };
998
+ "gpt-oss-120b:batch": {
999
+ readonly inputPer1M: 0.15;
1000
+ readonly outputPer1M: 0.6;
1001
+ readonly vendor: "openai";
1002
+ readonly provider: "openai";
1003
+ };
1004
+ "gpt-oss-20b": {
1005
+ readonly inputPer1M: 0.03;
1006
+ readonly outputPer1M: 0.13;
1007
+ readonly cacheReadMultiplier: 1;
1008
+ readonly vendor: "openai";
1009
+ readonly provider: "openai";
1010
+ };
1011
+ "gpt-oss-20b:batch": {
1012
+ readonly inputPer1M: 0.05;
1013
+ readonly outputPer1M: 0.2;
1014
+ readonly vendor: "openai";
1015
+ readonly provider: "openai";
1016
+ };
1017
+ "gpt-oss-safeguard-20b": {
1018
+ readonly inputPer1M: 0.075;
1019
+ readonly outputPer1M: 0.3;
1020
+ readonly cacheReadMultiplier: 0.5;
1021
+ readonly vendor: "openai";
1022
+ readonly provider: "openai";
1023
+ };
1024
+ o1: {
1025
+ readonly inputPer1M: 15;
1026
+ readonly outputPer1M: 60;
1027
+ readonly cacheReadMultiplier: 0.5;
1028
+ readonly vendor: "openai";
1029
+ readonly provider: "openai";
1030
+ };
1031
+ "o1-pro": {
1032
+ readonly inputPer1M: 150;
1033
+ readonly outputPer1M: 600;
1034
+ readonly vendor: "openai";
1035
+ readonly provider: "openai";
1036
+ };
1037
+ o3: {
1038
+ readonly inputPer1M: 2;
1039
+ readonly outputPer1M: 8;
1040
+ readonly cacheReadMultiplier: 0.25;
1041
+ readonly vendor: "openai";
1042
+ readonly provider: "openai";
1043
+ };
1044
+ "o3-mini": {
1045
+ readonly inputPer1M: 1.1;
1046
+ readonly outputPer1M: 4.4;
1047
+ readonly cacheReadMultiplier: 0.5;
1048
+ readonly vendor: "openai";
1049
+ readonly provider: "openai";
1050
+ };
1051
+ "o3-mini-high": {
1052
+ readonly inputPer1M: 1.1;
1053
+ readonly outputPer1M: 4.4;
1054
+ readonly cacheReadMultiplier: 0.5;
1055
+ readonly vendor: "openai";
1056
+ readonly provider: "openai";
1057
+ };
1058
+ "o3-pro": {
1059
+ readonly inputPer1M: 20;
1060
+ readonly outputPer1M: 80;
1061
+ readonly vendor: "openai";
1062
+ readonly provider: "openai";
1063
+ };
1064
+ "o4-mini": {
1065
+ readonly inputPer1M: 1.1;
1066
+ readonly outputPer1M: 4.4;
1067
+ readonly cacheReadMultiplier: 0.25;
1068
+ readonly vendor: "openai";
1069
+ readonly provider: "openai";
1070
+ };
1071
+ "o4-mini-high": {
1072
+ readonly inputPer1M: 1.1;
1073
+ readonly outputPer1M: 4.4;
1074
+ readonly cacheReadMultiplier: 0.25;
1075
+ readonly vendor: "openai";
1076
+ readonly provider: "openai";
1077
+ };
1078
+ "gemini-2.5-flash": {
1079
+ readonly inputPer1M: 0.3;
1080
+ readonly outputPer1M: 2.5;
1081
+ readonly cacheReadMultiplier: 0.1;
1082
+ readonly vendor: "google";
1083
+ readonly provider: "google";
1084
+ };
1085
+ "gemini-2.5-flash-lite": {
1086
+ readonly inputPer1M: 0.1;
1087
+ readonly outputPer1M: 0.4;
1088
+ readonly cacheReadMultiplier: 0.1;
1089
+ readonly vendor: "google";
1090
+ readonly provider: "google";
1091
+ };
1092
+ "gemini-2.5-pro": {
1093
+ readonly inputPer1M: 1.25;
1094
+ readonly outputPer1M: 10;
1095
+ readonly cacheReadMultiplier: 0.1;
1096
+ readonly vendor: "google";
1097
+ readonly provider: "google";
1098
+ };
1099
+ "gemini-3-flash-preview": {
1100
+ readonly inputPer1M: 0.5;
1101
+ readonly outputPer1M: 3;
1102
+ readonly cacheReadMultiplier: 0.1;
1103
+ readonly vendor: "google";
1104
+ readonly provider: "google";
1105
+ };
1106
+ "gemini-3.1-flash-lite": {
1107
+ readonly inputPer1M: 0.25;
1108
+ readonly outputPer1M: 1.5;
1109
+ readonly cacheReadMultiplier: 0.1;
1110
+ readonly vendor: "google";
1111
+ readonly provider: "google";
1112
+ };
1113
+ "gemini-3.1-pro-preview": {
1114
+ readonly inputPer1M: 2;
1115
+ readonly outputPer1M: 12;
1116
+ readonly cacheReadMultiplier: 0.1;
1117
+ readonly vendor: "google";
1118
+ readonly provider: "google";
1119
+ };
1120
+ "gemini-3.5-flash": {
1121
+ readonly inputPer1M: 1.5;
1122
+ readonly outputPer1M: 9;
1123
+ readonly cacheReadMultiplier: 0.1;
1124
+ readonly vendor: "google";
1125
+ readonly provider: "google";
1126
+ };
1127
+ "claude-fable-5": {
1128
+ readonly inputPer1M: 10;
1129
+ readonly outputPer1M: 50;
1130
+ readonly cacheReadMultiplier: 0.1;
1131
+ readonly cacheWriteMultiplier: 1.25;
1132
+ readonly vendor: "anthropic";
1133
+ readonly provider: "anthropic";
1134
+ };
1135
+ "claude-haiku-4-5": {
1136
+ readonly inputPer1M: 1;
1137
+ readonly outputPer1M: 5;
1138
+ readonly cacheReadMultiplier: 0.1;
1139
+ readonly cacheWriteMultiplier: 1.25;
1140
+ readonly vendor: "anthropic";
1141
+ readonly provider: "anthropic";
1142
+ };
1143
+ "claude-haiku-4-5-20251001": {
1144
+ readonly inputPer1M: 1;
1145
+ readonly outputPer1M: 5;
1146
+ readonly cacheReadMultiplier: 0.1;
1147
+ readonly cacheWriteMultiplier: 1.25;
1148
+ readonly vendor: "anthropic";
1149
+ readonly provider: "anthropic";
1150
+ };
1151
+ "claude-opus-4-5": {
1152
+ readonly inputPer1M: 5;
1153
+ readonly outputPer1M: 25;
1154
+ readonly cacheReadMultiplier: 0.1;
1155
+ readonly cacheWriteMultiplier: 1.25;
1156
+ readonly vendor: "anthropic";
1157
+ readonly provider: "anthropic";
1158
+ };
1159
+ "claude-opus-4-5-20251101": {
1160
+ readonly inputPer1M: 5;
1161
+ readonly outputPer1M: 25;
1162
+ readonly cacheReadMultiplier: 0.1;
1163
+ readonly cacheWriteMultiplier: 1.25;
1164
+ readonly vendor: "anthropic";
1165
+ readonly provider: "anthropic";
1166
+ };
1167
+ "claude-opus-4-6": {
1168
+ readonly inputPer1M: 5;
1169
+ readonly outputPer1M: 25;
1170
+ readonly cacheReadMultiplier: 0.1;
1171
+ readonly cacheWriteMultiplier: 1.25;
1172
+ readonly vendor: "anthropic";
1173
+ readonly provider: "anthropic";
1174
+ };
1175
+ "claude-opus-4-7": {
1176
+ readonly inputPer1M: 5;
1177
+ readonly outputPer1M: 25;
1178
+ readonly cacheReadMultiplier: 0.1;
1179
+ readonly cacheWriteMultiplier: 1.25;
1180
+ readonly vendor: "anthropic";
1181
+ readonly provider: "anthropic";
1182
+ };
1183
+ "claude-opus-4-8": {
1184
+ readonly inputPer1M: 5;
1185
+ readonly outputPer1M: 25;
1186
+ readonly cacheReadMultiplier: 0.1;
1187
+ readonly cacheWriteMultiplier: 1.25;
1188
+ readonly vendor: "anthropic";
1189
+ readonly provider: "anthropic";
1190
+ };
1191
+ "claude-opus-5": {
1192
+ readonly inputPer1M: 5;
1193
+ readonly outputPer1M: 25;
1194
+ readonly cacheReadMultiplier: 0.1;
1195
+ readonly cacheWriteMultiplier: 1.25;
1196
+ readonly vendor: "anthropic";
1197
+ readonly provider: "anthropic";
1198
+ };
1199
+ "claude-sonnet-4-5": {
1200
+ readonly inputPer1M: 3;
1201
+ readonly outputPer1M: 15;
1202
+ readonly cacheReadMultiplier: 0.1;
1203
+ readonly cacheWriteMultiplier: 1.25;
1204
+ readonly vendor: "anthropic";
1205
+ readonly provider: "anthropic";
1206
+ };
1207
+ "claude-sonnet-4-5-20250929": {
1208
+ readonly inputPer1M: 3;
1209
+ readonly outputPer1M: 15;
1210
+ readonly cacheReadMultiplier: 0.1;
1211
+ readonly cacheWriteMultiplier: 1.25;
1212
+ readonly vendor: "anthropic";
1213
+ readonly provider: "anthropic";
1214
+ };
1215
+ "claude-sonnet-4-6": {
1216
+ readonly inputPer1M: 3;
1217
+ readonly outputPer1M: 15;
1218
+ readonly cacheReadMultiplier: 0.1;
1219
+ readonly cacheWriteMultiplier: 1.25;
1220
+ readonly vendor: "anthropic";
1221
+ readonly provider: "anthropic";
1222
+ };
1223
+ "claude-sonnet-5": {
1224
+ readonly inputPer1M: 2;
1225
+ readonly outputPer1M: 10;
1226
+ readonly cacheReadMultiplier: 0.1;
1227
+ readonly cacheWriteMultiplier: 1.25;
1228
+ readonly vendor: "anthropic";
1229
+ readonly provider: "anthropic";
1230
+ };
1231
+ "kimi-k2.6": {
1232
+ readonly inputPer1M: 0.95;
1233
+ readonly outputPer1M: 4;
1234
+ readonly cacheReadMultiplier: 0.1684;
1235
+ readonly vendor: "moonshot";
1236
+ readonly provider: "moonshot";
1237
+ };
1238
+ "kimi-k2.7-code": {
1239
+ readonly inputPer1M: 0.66;
1240
+ readonly outputPer1M: 3.4;
1241
+ readonly cacheReadMultiplier: 0.2727;
1242
+ readonly vendor: "moonshot";
1243
+ readonly provider: "moonshot";
1244
+ };
1245
+ "kimi-k3": {
1246
+ readonly inputPer1M: 3;
1247
+ readonly outputPer1M: 15;
1248
+ readonly cacheReadMultiplier: 0.1;
1249
+ readonly vendor: "moonshot";
1250
+ readonly provider: "moonshot";
1251
+ };
1252
+ "codestral-2508": {
1253
+ readonly inputPer1M: 0.3;
1254
+ readonly outputPer1M: 0.9;
1255
+ readonly cacheReadMultiplier: 0.1;
1256
+ readonly vendor: "mistral";
1257
+ readonly provider: "mistral";
1258
+ };
1259
+ "ministral-14b-2512": {
1260
+ readonly inputPer1M: 0.2;
1261
+ readonly outputPer1M: 0.2;
1262
+ readonly cacheReadMultiplier: 0.1;
1263
+ readonly vendor: "mistral";
1264
+ readonly provider: "mistral";
1265
+ };
1266
+ "ministral-3b-2512": {
1267
+ readonly inputPer1M: 0.1;
1268
+ readonly outputPer1M: 0.1;
1269
+ readonly cacheReadMultiplier: 0.1;
1270
+ readonly vendor: "mistral";
1271
+ readonly provider: "mistral";
1272
+ };
1273
+ "ministral-8b-2512": {
1274
+ readonly inputPer1M: 0.15;
1275
+ readonly outputPer1M: 0.15;
1276
+ readonly cacheReadMultiplier: 0.1;
1277
+ readonly vendor: "mistral";
1278
+ readonly provider: "mistral";
1279
+ };
1280
+ "mistral-large-2512": {
1281
+ readonly inputPer1M: 0.5;
1282
+ readonly outputPer1M: 1.5;
1283
+ readonly cacheReadMultiplier: 0.1;
1284
+ readonly vendor: "mistral";
1285
+ readonly provider: "mistral";
1286
+ };
1287
+ "mistral-medium-3": {
1288
+ readonly inputPer1M: 0.4;
1289
+ readonly outputPer1M: 2;
1290
+ readonly cacheReadMultiplier: 0.1;
1291
+ readonly vendor: "mistral";
1292
+ readonly provider: "mistral";
1293
+ };
1294
+ "mistral-medium-3-5": {
1295
+ readonly inputPer1M: 1.5;
1296
+ readonly outputPer1M: 7.5;
1297
+ readonly vendor: "mistral";
1298
+ readonly provider: "mistral";
1299
+ };
1300
+ "mistral-medium-3.5": {
1301
+ readonly inputPer1M: 1.5;
1302
+ readonly outputPer1M: 7.5;
1303
+ readonly vendor: "mistral";
1304
+ readonly provider: "mistral";
1305
+ };
1306
+ "mistral-small-2603": {
1307
+ readonly inputPer1M: 0.15;
1308
+ readonly outputPer1M: 0.6;
1309
+ readonly cacheReadMultiplier: 0.1;
1310
+ readonly vendor: "mistral";
1311
+ readonly provider: "mistral";
1312
+ };
1313
+ };
1314
+ /**
1315
+ * Every canonical catalog model id. Existence is NOT the same question as
1316
+ * "does this id have a price" — `LLM_PRICING_CATALOG`'s keys alone used to
1317
+ * answer both, which meant a real, live, provider-published model with no
1318
+ * pricing row yet (the Anthropic `claude-opus-4-6` incident: synced by
1319
+ * `catalog-sync`, present in `CONTEXT_WINDOWS`, absent here) simply ceased
1320
+ * to exist anywhere downstream — invisible in `agentproto models`, unlisted
1321
+ * in every adapter's native allow-list, silently resolved to a stale alias.
1322
+ * `LlmModelId` now unions the pricing keys with `CONTEXT_WINDOWS` (each
1323
+ * provider's own synced `/v1/models` id list — see
1324
+ * `packages/catalog-sync/src/generators/llm-context-windows.ts` — carries
1325
+ * ids independent of whether a price has synced yet) and `OPENROUTER_ROUTES`
1326
+ * (thousands of ids, self-updating). A model can be a member of this type
1327
+ * with `resolvePricing` returning `undefined` for it — callers MUST treat
1328
+ * that as "price not yet known," never as "doesn't exist" (see
1329
+ * `ResolvedModel`'s `pricing?` in `registry/index.ts`, and `isKnownLlmId`
1330
+ * below for an existence-only check). Downstream curation/config should
1331
+ * still constrain ids to this type so a typo is a build error.
1332
+ */
1333
+ type LlmModelId = keyof typeof LLM_PRICING_CATALOG | keyof typeof CONTEXT_WINDOWS | keyof typeof OPENROUTER_ROUTES;
1334
+ /**
1335
+ * True iff `modelId` is a real, known catalog id — regardless of whether it
1336
+ * has a price yet. Use this (not `resolvePricing(id) !== undefined`) to
1337
+ * answer "does this model exist"; use `resolvePricing`/`resolvePricingExact`
1338
+ * to answer "what does it cost" — the two questions are independent by
1339
+ * design, see `LlmModelId`'s doc comment.
1340
+ */
1341
+ declare function isKnownLlmId(modelId: string): boolean;
1342
+ /**
1343
+ * Every known LLM id that has NO pricing row (`CONTEXT_WINDOWS` ∪
1344
+ * `OPENROUTER_ROUTES`, minus whatever `LLM_PRICING_CATALOG` already prices)
1345
+ * — the enumeration `listModels`'s `llm` branch needs to surface a
1346
+ * known-but-unpriced model instead of silently dropping it. Each entry
1347
+ * carries its provider when derivable (see `getModelProvider`).
1348
+ */
1349
+ declare function listUnpricedKnownLlmIds(): Array<{
1350
+ id: string;
1351
+ provider: CatalogProvider | undefined;
1352
+ }>;
1353
+ declare const MODEL_ALIASES: {
1354
+ "claude-4-opus": string;
1355
+ "claude-4-sonnet": string;
1356
+ "claude-3-5-haiku": string;
1357
+ "claude-haiku-4-5-20251001": string;
1358
+ "claude-opus-4": string;
1359
+ "claude-sonnet-4": string;
1360
+ "claude-haiku-3.5": string;
1361
+ "gemini-3.1-flash-lite-preview": string;
1362
+ "google/gemini-3.1-pro-preview": string;
1363
+ "google/gemini-3.5-flash": string;
1364
+ "google/gemini-3-flash-preview": string;
1365
+ "google/gemini-3.1-flash-lite": string;
1366
+ "google/gemini-2.5-flash": string;
1367
+ "google/gemini-2.5-flash-lite": string;
1368
+ "google/gemini-2.5-pro": string;
1369
+ "openai/gpt-4.1": string;
1370
+ "openai/gpt-4.1-mini": string;
1371
+ "openai/gpt-4.1-nano": string;
1372
+ "openai/gpt-5": string;
1373
+ "openai/gpt-5.1": string;
1374
+ "openai/gpt-5.2": string;
1375
+ "openai/gpt-5.4": string;
1376
+ "openai/gpt-5.4-mini": string;
1377
+ "openai/gpt-5.4-nano": string;
1378
+ "openai/gpt-5.5": string;
1379
+ "openai/o3": string;
1380
+ "openai/o4-mini": string;
1381
+ "openai/o3-mini": string;
1382
+ "openai/o1": string;
1383
+ "openai/o1-mini": string;
1384
+ "minimax-m2": string;
1385
+ "minimax-m2.1": string;
1386
+ "minimax-m2.5": string;
1387
+ "minimax-m2.7": string;
1388
+ "kimi-k2": string;
1389
+ "moonshotai/kimi-k2.5": string;
1390
+ "moonshotai/kimi-k2.6": string;
1391
+ "moonshotai/kimi-k2.7-code": string;
1392
+ "moonshotai/kimi-k3": string;
1393
+ "mistralai/mistral-large-latest": string;
1394
+ "mistralai/mistral-small-latest": string;
1395
+ "mistralai/mistral-medium-latest": string;
1396
+ "mistralai/mistral-medium-3-5": string;
1397
+ "mistralai/codestral-latest": string;
1398
+ "mistralai/ministral-8b-latest": string;
1399
+ "mistralai/devstral-latest": string;
1400
+ "mistralai/magistral-small-latest": string;
1401
+ "mistralai/devstral-medium-latest": string;
1402
+ "grok-latest": string;
1403
+ };
1404
+ /** Every alias id that resolves to a canonical model — the alias keys. */
1405
+ type LlmModelAlias = keyof typeof MODEL_ALIASES;
1406
+ /** Any model id the catalog recognises — canonical key or alias. */
1407
+ type KnownLlmId = LlmModelId | LlmModelAlias;
1408
+ /**
1409
+ * Resolves a model id to its pricing entry. Tries direct match → alias →
1410
+ * partial-prefix match. Used both for cost computation and BYOK shadow
1411
+ * accounting; semantics are load-bearing for migration.
1412
+ */
1413
+ declare function resolvePricing(modelId: string): LLMPricing | undefined;
1414
+ /**
1415
+ * Like {@link resolvePricing} but WITHOUT the substring/partial-prefix
1416
+ * fallback — an id resolves ONLY on an exact catalog key or an exact alias.
1417
+ * The substring scan in `resolvePricing` (intended for dated snapshots like
1418
+ * `claude-sonnet-4-6-20260301` → `claude-sonnet-4`) also over-fires for
1419
+ * unrelated cross-product siblings (`gemini-2.5-flash-image` substring-hits
1420
+ * the `gemini-2.5-flash` row), so any caller that must PROVE a verbatim
1421
+ * first-party identity — e.g. the direct-vendor route restore in
1422
+ * `serviceableModelRoutes` — needs this exact form instead. Semantics of
1423
+ * `resolvePricing`/`resolveAlias` are intentionally left unchanged for their
1424
+ * existing callers.
1425
+ */
1426
+ declare function resolvePricingExact(modelId: string): LLMPricing | undefined;
1427
+ /**
1428
+ * Resolves a model id to its canonical catalog key (or the original id if no
1429
+ * match). Public surface for consumers that need the canonical id without
1430
+ * the pricing payload.
1431
+ */
1432
+ declare function resolveAlias(modelId: string): string;
1433
+ /**
1434
+ * Resolves a model id to its live context window (max input tokens) and max
1435
+ * output tokens, sourced from `CONTEXT_WINDOWS`
1436
+ * (`packages/catalog-sync/src/generators/llm-context-windows.ts` — re-synced
1437
+ * from each provider's live `/v1/models` endpoint; never hand-maintain these
1438
+ * numbers). Covers Anthropic, Groq, xAI, and Moonshot — the providers that
1439
+ * publish this data live. Handles bare aliases the provider's own API doesn't
1440
+ * use ("claude-haiku-4-5" vs. the dated live id "claude-haiku-4-5-20251001")
1441
+ * via prefix match, then falls back through the pricing alias table for
1442
+ * older aliases. Returns undefined for ids no synced provider carries.
1443
+ */
1444
+ declare function resolveContextWindow(modelId: string): ContextWindowEntry | undefined;
1445
+ /**
1446
+ * Every live model id `CONTEXT_WINDOWS` carries for one provider — sourced
1447
+ * straight from that provider's own `/v1/models` sync (`llm-context-windows.ts`
1448
+ * generator), independent of whether the id has landed a pricing row yet.
1449
+ *
1450
+ * The one legitimate consumer of this today: an adapter's `models.allowed`
1451
+ * curation for its native (non-gateway) provider surface. Deriving that list
1452
+ * from here instead of a hand-typed array means a newly-published id (e.g.
1453
+ * Anthropic shipping `claude-opus-4-9`) becomes offerable the moment the next
1454
+ * catalog-sync run picks it up — no code change, no PR. An adapter that wants
1455
+ * to hide a specific id anyway (deprecated, not yet vetted) does so with its
1456
+ * OWN small denylist filtering this list's output, never by omitting the id
1457
+ * from a hand-typed allowlist that silently also hides every future id.
1458
+ */
1459
+ declare function listNativeModelIds(provider: ContextWindowEntry["provider"]): string[];
1460
+ /**
1461
+ * Resolve a model id to its DEFAULT provider — the single source of truth for
1462
+ * "which SDK reaches this model when no per-model override is set". Reads the
1463
+ * resolved catalog entry's `provider` field (direct id → alias → partial
1464
+ * prefix, same resolution as `resolvePricing`). Returns undefined for unknown
1465
+ * ids so callers can fall back to their own heuristic.
1466
+ *
1467
+ * This is the abstraction that decouples the provider from the model-id STRING:
1468
+ * instead of inferring "claude-* → anthropic" at each call site, the provider
1469
+ * is an explicit catalog attribute. A model reachable through more than one
1470
+ * provider (e.g. Claude via the direct Anthropic SDK vs. OpenRouter) is held as
1471
+ * distinct catalog entries — the bare id (`claude-haiku-4-5`, provider
1472
+ * `anthropic`) and the slash route (`anthropic/claude-haiku-4.5`, provider
1473
+ * `openrouter`) — each carrying its own `provider`.
1474
+ */
1475
+ declare function getModelProvider(modelId: string): CatalogProvider | undefined;
1476
+ /**
1477
+ * The unified registry view of a model: canonical id, default provider, vendor,
1478
+ * and pricing — everything the routing + billing layers need from ONE lookup.
1479
+ * Returns undefined for unknown ids.
1480
+ */
1481
+ interface ModelRoute {
1482
+ /** Canonical catalog key (post-alias). */
1483
+ canonicalId: string;
1484
+ /** Default provider — the SDK used when no per-model override is set. */
1485
+ provider?: CatalogProvider;
1486
+ /** Model author/vendor (permanent; independent of the routing provider). */
1487
+ vendor?: string;
1488
+ /** Billing pricing entry. */
1489
+ pricing: LLMPricing;
1490
+ }
1491
+ declare function resolveModelRoute(modelId: string): ModelRoute | undefined;
1492
+ /**
1493
+ * Default fallback: roughly gemini-flash pricing (cheapest). Unknown
1494
+ * model ids resolve to this — the formula path then computes credit
1495
+ * cost from `inputPer1M`/`outputPer1M`, so unknown models always price
1496
+ * at default markup × cheap-model rates, never at zero.
1497
+ */
1498
+ declare const DEFAULT_PRICING: LLMPricing;
1499
+ interface LLMCreditCostResult {
1500
+ /**
1501
+ * Total **centicredits** to charge — what `useAccountCredits` debits
1502
+ * directly (ledger column is cc). Reflects any per-model override or
1503
+ * per-app markup; never below `MIN_CREDITS_PER_TURN_CC`.
1504
+ *
1505
+ * Unit: cc (1 displayed credit = 100 cc). Format for display with
1506
+ * `displayCredits(cc) → cr`.
1507
+ */
1508
+ credits: number;
1509
+ /**
1510
+ * What the *pure formula* would have charged (provider cost ×
1511
+ * text-markup), independent of per-model overrides. Surfaced so
1512
+ * `usage_events.calculated_credits` can record the formula-derived
1513
+ * value next to the override-applied debit — easy reconciliation
1514
+ * against Langfuse traces. Unit: cc.
1515
+ */
1516
+ calculatedCredits: number;
1517
+ /** Breakdown of `credits` (each in cc). */
1518
+ inputCredits: number;
1519
+ outputCredits: number;
1520
+ cacheReadCredits: number;
1521
+ cacheWriteCredits: number;
1522
+ /** Production cost in USD (true provider cost, with cache multipliers applied). */
1523
+ productionCost: number;
1524
+ /** Model pricing used */
1525
+ pricing: LLMPricing;
1526
+ /** Whether fallback pricing was used */
1527
+ isFallback: boolean;
1528
+ /** Markup actually applied. Same as `pricingRegistry.getMarkup("text", appId)` when no override. */
1529
+ markup: number;
1530
+ /** True when a per-model `overrideCredit*Per1M` field bypassed the formula. */
1531
+ hasOverride: boolean;
1532
+ }
1533
+ interface LLMUsageBreakdown {
1534
+ /**
1535
+ * Input tokens that were NOT served from cache. With Anthropic prompt
1536
+ * caching, providers often report `inputTokens` already EXCLUDING
1537
+ * cached portions — pass the same number you'd pass to the legacy
1538
+ * 3-arg signature; cache fields are ADDED on top.
1539
+ */
1540
+ inputTokens: number;
1541
+ outputTokens: number;
1542
+ cacheReadInputTokens?: number;
1543
+ cacheCreationInputTokens?: number;
1544
+ }
1545
+ interface CalculateLLMCreditCostOptions {
1546
+ /**
1547
+ * App invoking the LLM. Routes per-app markup overrides registered
1548
+ * via `pricingRegistry.registerApp(appId, ...)`. When omitted, core
1549
+ * defaults apply.
1550
+ */
1551
+ appId?: string;
1552
+ /**
1553
+ * Direct markup override (escape hatch for tests / one-off
1554
+ * reconciliation). When set, bypasses `pricingRegistry` for both
1555
+ * formula and `calculatedCredits` math. Takes precedence over
1556
+ * `appId`.
1557
+ */
1558
+ markupOverride?: number;
1559
+ }
1560
+ declare function calculateLLMCreditCost(modelId: string, inputTokens: number, outputTokens: number): LLMCreditCostResult;
1561
+ declare function calculateLLMCreditCost(modelId: string, usage: LLMUsageBreakdown, opts?: CalculateLLMCreditCostOptions): LLMCreditCostResult;
1562
+ interface CacheStats {
1563
+ /**
1564
+ * Cache hit rate as a 0..1 fraction of total input tokens (raw + cache
1565
+ * read + cache create). 0 means no cache activity, 1 means everything
1566
+ * read from cache, 0 for output-only calls. `null` when there were no
1567
+ * input tokens at all.
1568
+ */
1569
+ cacheHitRate: number | null;
1570
+ /**
1571
+ * Provider USD we *saved* vs the same input billed at the uncached
1572
+ * rate. Cache reads at 0.1× save 0.9× of the input cost; cache writes
1573
+ * at 1.25× actually COST 0.25× more than uncached (negative savings).
1574
+ * Sum across both. Negative means cache-write overhead exceeded
1575
+ * cache-read savings (rare — usually means the prompt prefix was
1576
+ * cached on the first turn but never re-used).
1577
+ */
1578
+ providerCostSavedUsd: number;
1579
+ /**
1580
+ * Centicredits the user *saved* vs the same input billed at the
1581
+ * uncached rate. Same sign convention as `providerCostSavedUsd`.
1582
+ * Unit: cc (format with `displayCredits(cc)` for UI).
1583
+ */
1584
+ creditsSaved: number;
1585
+ /**
1586
+ * True iff the model carries cache multipliers in its pricing.
1587
+ * Useful for explaining "this model doesn't support caching" in UI.
1588
+ */
1589
+ cacheSupported: boolean;
1590
+ }
1591
+ /**
1592
+ * Turn a credit-cost result into cache-utilisation stats. Pure compute.
1593
+ *
1594
+ * Use cases:
1595
+ * - "Cache saved 87% on this call" in a UI tooltip.
1596
+ * - Per-conversation dashboards: "across this conversation, prompt
1597
+ * caching saved you $0.42 / 12 credits."
1598
+ * - Regression alarms — if cacheHitRate drops below an expected
1599
+ * threshold on a known-cacheable workload, something broke in
1600
+ * prompt-prefix stability.
1601
+ *
1602
+ * Returns `cacheSupported: false` for models without cache multipliers
1603
+ * (gpt-4o-mini, gemini, mistral) — all fields are zero in that case
1604
+ * (no cache activity is possible).
1605
+ */
1606
+ declare function getCacheStats(modelId: string, usage: LLMUsageBreakdown, opts?: CalculateLLMCreditCostOptions): CacheStats;
1607
+
1608
+ export { type CacheStats as C, DEFAULT_PRICING as D, type KnownLlmId as K, type LLMPricing as L, MODEL_ALIASES as M, type LLMCreditCostResult as a, type LLMUsageBreakdown as b, LLM_PRICING_CATALOG as c, calculateLLMCreditCost as d, type CalculateLLMCreditCostOptions as e, type ContextWindowEntry as f, type LlmModelAlias as g, type LlmModelId as h, type ModelRoute as i, getCacheStats as j, getModelProvider as k, isKnownLlmId as l, listNativeModelIds as m, listUnpricedKnownLlmIds as n, resolveAlias as o, resolveContextWindow as p, resolveModelRoute as q, resolvePricing as r, resolvePricingExact as s };