@newrelic/preflight 1.63.1 → 1.63.3

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 (35) hide show
  1. package/dist/dashboard/subagent-timeline-store.d.ts.map +1 -1
  2. package/dist/dashboard/subagent-timeline-store.js +17 -11
  3. package/dist/dashboard/subagent-timeline-store.js.map +1 -1
  4. package/dist/hooks/copilot-app-usage-watcher.d.ts.map +1 -1
  5. package/dist/hooks/copilot-app-usage-watcher.js +19 -1
  6. package/dist/hooks/copilot-app-usage-watcher.js.map +1 -1
  7. package/dist/metrics/git-efficiency-tracker.d.ts.map +1 -1
  8. package/dist/metrics/git-efficiency-tracker.js +42 -12
  9. package/dist/metrics/git-efficiency-tracker.js.map +1 -1
  10. package/dist/metrics/git-event-classifier.d.ts +38 -4
  11. package/dist/metrics/git-event-classifier.d.ts.map +1 -1
  12. package/dist/metrics/git-event-classifier.js +319 -8
  13. package/dist/metrics/git-event-classifier.js.map +1 -1
  14. package/dist/metrics/git-workspace-report.d.ts +0 -4
  15. package/dist/metrics/git-workspace-report.d.ts.map +1 -1
  16. package/dist/metrics/git-workspace-report.js +14 -8
  17. package/dist/metrics/git-workspace-report.js.map +1 -1
  18. package/dist/shared/events/factory.d.ts.map +1 -1
  19. package/dist/shared/events/factory.js +6 -10
  20. package/dist/shared/events/factory.js.map +1 -1
  21. package/dist/shared/events/serialize.d.ts.map +1 -1
  22. package/dist/shared/events/serialize.js +4 -10
  23. package/dist/shared/events/serialize.js.map +1 -1
  24. package/dist/shared/pricing-data.d.ts.map +1 -1
  25. package/dist/shared/pricing-data.js +803 -67
  26. package/dist/shared/pricing-data.js.map +1 -1
  27. package/dist/shared/pricing.d.ts +41 -17
  28. package/dist/shared/pricing.d.ts.map +1 -1
  29. package/dist/shared/pricing.js +47 -22
  30. package/dist/shared/pricing.js.map +1 -1
  31. package/dist/shared/tokens.d.ts +14 -5
  32. package/dist/shared/tokens.d.ts.map +1 -1
  33. package/dist/shared/tokens.js +73 -64
  34. package/dist/shared/tokens.js.map +1 -1
  35. package/package.json +1 -1
@@ -16,10 +16,14 @@ export const MODEL_ALIASES = {
16
16
  'claude-opus-4': 'claude-opus-4-8',
17
17
  'claude-sonnet-4': 'claude-sonnet-4-6',
18
18
  'claude-haiku-4': 'claude-haiku-4-5',
19
+ 'claude-haiku-5': 'claude-haiku-5-5',
19
20
  'claude-haiku-3-5': 'claude-haiku-3-5-20241022',
20
21
  // Google Gemini current-gen shortcuts
21
22
  'gemini-3.5': 'gemini-3.5-flash',
22
23
  'gemini-3.1-pro': 'gemini-3.1-pro-preview',
24
+ // Same model and price as 3.1 Pro Preview, with a tool-use-tuned endpoint
25
+ // (ai.google.dev lists both IDs under one price).
26
+ 'gemini-3.1-pro-preview-customtools': 'gemini-3.1-pro-preview',
23
27
  // No alias for 'gemini-3.1-flash-lite' — it's now an exact-match table key
24
28
  // in its own right (GA'd, dropped the "-preview" suffix). An earlier
25
29
  // revision of this file aliased it to 'gemini-3.1-flash-lite-preview',
@@ -38,16 +42,22 @@ export const MODEL_ALIASES = {
38
42
  // this file aliased 'gpt-5' -> 'gpt-5.5', which over-billed real `gpt-5`
39
43
  // calls by several times ($1.25/$10 actual vs $5/$30 aliased).
40
44
  'gpt-5.6': 'gpt-5.6-sol',
45
+ // OpenAI's bare 'gpt-4' API alias points at the gpt-4-0613 snapshot. Pinned
46
+ // so it does not depend on forward-prefix matching.
47
+ 'gpt-4': 'gpt-4-0613',
48
+ // Mistral: bare family name routes to the current generation, not to
49
+ // whichever 'mistral-large-*' key forward-prefix matching happens to pick.
50
+ 'mistral-large': 'mistral-large-4',
41
51
  // AWS Bedrock geo cross-region inference profile IDs. These are a
42
52
  // different kind of alias than the family-name shortcuts above — each is
43
53
  // a real, literal AWS inference-profile ID, routed here because AWS bills
44
54
  // every region below identically to the bare `anthropic.*` "in-region"
45
55
  // key it points at (see the Bedrock section's tier comment in
46
- // DEFAULT_PRICING_TABLE for the pricing rationale). Not verified that
47
- // every region is an actual valid profile for every model — AWS's
48
- // regional rollout varies per model, but an alias for a region AWS
49
- // doesn't actually offer is simply unreachable in practice, not a source
50
- // of mispricing.
56
+ // DEFAULT_PRICING_TABLE for the pricing rationale). The in./apac. and
57
+ // non-Claude entries further down are taken from AWS model cards. The
58
+ // us./eu./au./jp. Claude entries are not verified per model — AWS's
59
+ // regional rollout varies, but an alias for a region AWS doesn't actually
60
+ // offer is simply unreachable in practice, not a source of mispricing.
51
61
  'us.anthropic.claude-sonnet-5': 'anthropic.claude-sonnet-5',
52
62
  'eu.anthropic.claude-sonnet-5': 'anthropic.claude-sonnet-5',
53
63
  'au.anthropic.claude-sonnet-5': 'anthropic.claude-sonnet-5',
@@ -76,6 +86,106 @@ export const MODEL_ALIASES = {
76
86
  'eu.anthropic.claude-haiku-4-5-20251001-v1:0': 'anthropic.claude-haiku-4-5-20251001-v1:0',
77
87
  'au.anthropic.claude-haiku-4-5-20251001-v1:0': 'anthropic.claude-haiku-4-5-20251001-v1:0',
78
88
  'jp.anthropic.claude-haiku-4-5-20251001-v1:0': 'anthropic.claude-haiku-4-5-20251001-v1:0',
89
+ 'us.anthropic.claude-sonnet-5-5': 'anthropic.claude-sonnet-5-5',
90
+ 'eu.anthropic.claude-sonnet-5-5': 'anthropic.claude-sonnet-5-5',
91
+ 'au.anthropic.claude-sonnet-5-5': 'anthropic.claude-sonnet-5-5',
92
+ 'jp.anthropic.claude-sonnet-5-5': 'anthropic.claude-sonnet-5-5',
93
+ 'us.anthropic.claude-opus-5-5': 'anthropic.claude-opus-5-5',
94
+ 'eu.anthropic.claude-opus-5-5': 'anthropic.claude-opus-5-5',
95
+ 'au.anthropic.claude-opus-5-5': 'anthropic.claude-opus-5-5',
96
+ 'jp.anthropic.claude-opus-5-5': 'anthropic.claude-opus-5-5',
97
+ 'us.anthropic.claude-fable-5-1': 'anthropic.claude-fable-5-1',
98
+ 'eu.anthropic.claude-fable-5-1': 'anthropic.claude-fable-5-1',
99
+ 'au.anthropic.claude-fable-5-1': 'anthropic.claude-fable-5-1',
100
+ 'jp.anthropic.claude-fable-5-1': 'anthropic.claude-fable-5-1',
101
+ 'us.anthropic.claude-mythos-5': 'anthropic.claude-mythos-5',
102
+ 'eu.anthropic.claude-mythos-5': 'anthropic.claude-mythos-5',
103
+ 'au.anthropic.claude-mythos-5': 'anthropic.claude-mythos-5',
104
+ 'jp.anthropic.claude-mythos-5': 'anthropic.claude-mythos-5',
105
+ 'us.anthropic.claude-mythos-5-1': 'anthropic.claude-mythos-5-1',
106
+ 'eu.anthropic.claude-mythos-5-1': 'anthropic.claude-mythos-5-1',
107
+ 'au.anthropic.claude-mythos-5-1': 'anthropic.claude-mythos-5-1',
108
+ 'jp.anthropic.claude-mythos-5-1': 'anthropic.claude-mythos-5-1',
109
+ 'us.anthropic.claude-mythos-preview': 'anthropic.claude-mythos-preview',
110
+ 'eu.anthropic.claude-mythos-preview': 'anthropic.claude-mythos-preview',
111
+ 'au.anthropic.claude-mythos-preview': 'anthropic.claude-mythos-preview',
112
+ 'jp.anthropic.claude-mythos-preview': 'anthropic.claude-mythos-preview',
113
+ 'us.anthropic.claude-opus-4-6-v1': 'anthropic.claude-opus-4-6-v1',
114
+ 'eu.anthropic.claude-opus-4-6-v1': 'anthropic.claude-opus-4-6-v1',
115
+ 'au.anthropic.claude-opus-4-6-v1': 'anthropic.claude-opus-4-6-v1',
116
+ 'jp.anthropic.claude-opus-4-6-v1': 'anthropic.claude-opus-4-6-v1',
117
+ 'us.anthropic.claude-opus-4-5-20251101-v1:0': 'anthropic.claude-opus-4-5-20251101-v1:0',
118
+ 'eu.anthropic.claude-opus-4-5-20251101-v1:0': 'anthropic.claude-opus-4-5-20251101-v1:0',
119
+ 'au.anthropic.claude-opus-4-5-20251101-v1:0': 'anthropic.claude-opus-4-5-20251101-v1:0',
120
+ 'jp.anthropic.claude-opus-4-5-20251101-v1:0': 'anthropic.claude-opus-4-5-20251101-v1:0',
121
+ 'us.anthropic.claude-sonnet-4-5-20250929-v1:0': 'anthropic.claude-sonnet-4-5-20250929-v1:0',
122
+ 'eu.anthropic.claude-sonnet-4-5-20250929-v1:0': 'anthropic.claude-sonnet-4-5-20250929-v1:0',
123
+ 'au.anthropic.claude-sonnet-4-5-20250929-v1:0': 'anthropic.claude-sonnet-4-5-20250929-v1:0',
124
+ 'jp.anthropic.claude-sonnet-4-5-20250929-v1:0': 'anthropic.claude-sonnet-4-5-20250929-v1:0',
125
+ 'us.anthropic.claude-sonnet-4-20250514-v1:0': 'anthropic.claude-sonnet-4-20250514-v1:0',
126
+ 'eu.anthropic.claude-sonnet-4-20250514-v1:0': 'anthropic.claude-sonnet-4-20250514-v1:0',
127
+ 'au.anthropic.claude-sonnet-4-20250514-v1:0': 'anthropic.claude-sonnet-4-20250514-v1:0',
128
+ 'jp.anthropic.claude-sonnet-4-20250514-v1:0': 'anthropic.claude-sonnet-4-20250514-v1:0',
129
+ 'us.anthropic.claude-opus-4-1-20250805-v1:0': 'anthropic.claude-opus-4-1-20250805-v1:0',
130
+ 'eu.anthropic.claude-opus-4-1-20250805-v1:0': 'anthropic.claude-opus-4-1-20250805-v1:0',
131
+ 'au.anthropic.claude-opus-4-1-20250805-v1:0': 'anthropic.claude-opus-4-1-20250805-v1:0',
132
+ 'jp.anthropic.claude-opus-4-1-20250805-v1:0': 'anthropic.claude-opus-4-1-20250805-v1:0',
133
+ 'us.anthropic.claude-opus-4-20250514-v1:0': 'anthropic.claude-opus-4-20250514-v1:0',
134
+ 'eu.anthropic.claude-opus-4-20250514-v1:0': 'anthropic.claude-opus-4-20250514-v1:0',
135
+ 'au.anthropic.claude-opus-4-20250514-v1:0': 'anthropic.claude-opus-4-20250514-v1:0',
136
+ 'jp.anthropic.claude-opus-4-20250514-v1:0': 'anthropic.claude-opus-4-20250514-v1:0',
137
+ 'us.anthropic.claude-3-7-sonnet-20250219-v1:0': 'anthropic.claude-3-7-sonnet-20250219-v1:0',
138
+ 'eu.anthropic.claude-3-7-sonnet-20250219-v1:0': 'anthropic.claude-3-7-sonnet-20250219-v1:0',
139
+ 'au.anthropic.claude-3-7-sonnet-20250219-v1:0': 'anthropic.claude-3-7-sonnet-20250219-v1:0',
140
+ 'jp.anthropic.claude-3-7-sonnet-20250219-v1:0': 'anthropic.claude-3-7-sonnet-20250219-v1:0',
141
+ 'us.anthropic.claude-3-haiku-20240307-v1:0': 'anthropic.claude-3-haiku-20240307-v1:0',
142
+ 'eu.anthropic.claude-3-haiku-20240307-v1:0': 'anthropic.claude-3-haiku-20240307-v1:0',
143
+ 'au.anthropic.claude-3-haiku-20240307-v1:0': 'anthropic.claude-3-haiku-20240307-v1:0',
144
+ 'jp.anthropic.claude-3-haiku-20240307-v1:0': 'anthropic.claude-3-haiku-20240307-v1:0',
145
+ 'us.anthropic.claude-3-sonnet-20240229-v1:0': 'anthropic.claude-3-sonnet-20240229-v1:0',
146
+ 'eu.anthropic.claude-3-sonnet-20240229-v1:0': 'anthropic.claude-3-sonnet-20240229-v1:0',
147
+ 'au.anthropic.claude-3-sonnet-20240229-v1:0': 'anthropic.claude-3-sonnet-20240229-v1:0',
148
+ 'jp.anthropic.claude-3-sonnet-20240229-v1:0': 'anthropic.claude-3-sonnet-20240229-v1:0',
149
+ // Legacy dated IDs: without these, `us.`/`eu.`-prefixed profiles resolve to
150
+ // null ($0) because the prefix-match fallback can't strip a region prefix.
151
+ 'us.anthropic.claude-3-5-sonnet-20241022-v2:0': 'anthropic.claude-3-5-sonnet-20241022-v2:0',
152
+ 'eu.anthropic.claude-3-5-sonnet-20241022-v2:0': 'anthropic.claude-3-5-sonnet-20241022-v2:0',
153
+ 'us.anthropic.claude-3-5-haiku-20241022-v1:0': 'anthropic.claude-3-5-haiku-20241022-v1:0',
154
+ 'eu.anthropic.claude-3-5-haiku-20241022-v1:0': 'anthropic.claude-3-5-haiku-20241022-v1:0',
155
+ 'us.anthropic.claude-3-opus-20240229-v1:0': 'anthropic.claude-3-opus-20240229-v1:0',
156
+ 'eu.anthropic.claude-3-opus-20240229-v1:0': 'anthropic.claude-3-opus-20240229-v1:0',
157
+ // Geo inference profiles for the remaining Bedrock models, per their AWS model cards.
158
+ 'in.anthropic.claude-haiku-4-5-20251001-v1:0': 'anthropic.claude-haiku-4-5-20251001-v1:0',
159
+ 'in.anthropic.claude-opus-5': 'anthropic.claude-opus-5',
160
+ 'in.anthropic.claude-sonnet-5': 'anthropic.claude-sonnet-5',
161
+ 'apac.anthropic.claude-sonnet-4-20250514-v1:0': 'anthropic.claude-sonnet-4-20250514-v1:0',
162
+ 'us.anthropic.claude-haiku-5-5': 'anthropic.claude-haiku-5-5',
163
+ 'eu.anthropic.claude-haiku-5-5': 'anthropic.claude-haiku-5-5',
164
+ 'au.anthropic.claude-haiku-5-5': 'anthropic.claude-haiku-5-5',
165
+ 'jp.anthropic.claude-haiku-5-5': 'anthropic.claude-haiku-5-5',
166
+ 'us.amazon.nova-2-lite-v1:0': 'amazon.nova-2-lite-v1:0',
167
+ 'eu.amazon.nova-2-lite-v1:0': 'amazon.nova-2-lite-v1:0',
168
+ 'jp.amazon.nova-2-lite-v1:0': 'amazon.nova-2-lite-v1:0',
169
+ 'us.amazon.nova-lite-v1:0': 'amazon.nova-lite-v1:0',
170
+ 'eu.amazon.nova-lite-v1:0': 'amazon.nova-lite-v1:0',
171
+ 'us.amazon.nova-micro-v1:0': 'amazon.nova-micro-v1:0',
172
+ 'eu.amazon.nova-micro-v1:0': 'amazon.nova-micro-v1:0',
173
+ 'us.amazon.nova-pro-v1:0': 'amazon.nova-pro-v1:0',
174
+ 'eu.amazon.nova-pro-v1:0': 'amazon.nova-pro-v1:0',
175
+ 'apac.amazon.nova-pro-v1:0': 'amazon.nova-pro-v1:0',
176
+ 'us.meta.llama4-maverick-17b-instruct-v1:0': 'meta.llama4-maverick-17b-instruct-v1:0',
177
+ 'us.meta.llama4-scout-17b-instruct-v1:0': 'meta.llama4-scout-17b-instruct-v1:0',
178
+ 'us.meta.llama3-3-70b-instruct-v1:0': 'meta.llama3-3-70b-instruct-v1:0',
179
+ 'us.meta.llama3-2-11b-instruct-v1:0': 'meta.llama3-2-11b-instruct-v1:0',
180
+ 'us.meta.llama3-2-90b-instruct-v1:0': 'meta.llama3-2-90b-instruct-v1:0',
181
+ 'us.meta.llama3-1-8b-instruct-v1:0': 'meta.llama3-1-8b-instruct-v1:0',
182
+ 'us.meta.llama3-1-70b-instruct-v1:0': 'meta.llama3-1-70b-instruct-v1:0',
183
+ 'us.meta.llama3-2-1b-instruct-v1:0': 'meta.llama3-2-1b-instruct-v1:0',
184
+ 'eu.meta.llama3-2-1b-instruct-v1:0': 'meta.llama3-2-1b-instruct-v1:0',
185
+ 'us.meta.llama3-2-3b-instruct-v1:0': 'meta.llama3-2-3b-instruct-v1:0',
186
+ 'eu.meta.llama3-2-3b-instruct-v1:0': 'meta.llama3-2-3b-instruct-v1:0',
187
+ 'us.mistral.pixtral-large-2502-v1:0': 'mistral.pixtral-large-2502-v1:0',
188
+ 'eu.mistral.pixtral-large-2502-v1:0': 'mistral.pixtral-large-2502-v1:0',
79
189
  // Mistral's pricing page now shows a "-latest" alias for each Ministral 3
80
190
  // size, routing to the dated snapshot IDs that are this table's actual
81
191
  // keys (see the Ministral 3 comment in DEFAULT_PRICING_TABLE).
@@ -86,7 +196,11 @@ export const MODEL_ALIASES = {
86
196
  // ---------------------------------------------------------------------------
87
197
  // Built-in pricing table — USD per million tokens
88
198
  //
89
- // Rates last verified against vendor public pricing pages on 2026-08-27:
199
+ // Rates last fully verified against vendor public pricing pages on
200
+ // 2026-08-27. Later partial passes: Anthropic 5.5, GPT-6, Bedrock, xAI,
201
+ // Moonshot, Mistral Large 4 and the Copilot stale-entry notes on 2026-10-07;
202
+ // OpenAI long-context cache tiers, xAI cache tiers and Moonshot cache writes
203
+ // on 2026-10-08:
90
204
  // - Anthropic https://www.anthropic.com/pricing, docs.claude.com
91
205
  // - Google https://ai.google.dev/gemini-api/docs/pricing
92
206
  // - OpenAI https://platform.openai.com/docs/pricing, /docs/models
@@ -95,7 +209,8 @@ export const MODEL_ALIASES = {
95
209
  // - Bedrock https://aws.amazon.com/bedrock/pricing/
96
210
  //
97
211
  // A handful of entries (marked individually below) are instead sourced from
98
- // GitHub Copilot's own pricing page, verified 2026-08-27:
212
+ // GitHub Copilot's own pricing page, verified 2026-08-27 (delistings re-checked
213
+ // 2026-10-07):
99
214
  // - GitHub Copilot https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing
100
215
  // Copilot's per-token pricing is a verified passthrough of each underlying
101
216
  // vendor's own direct-API list price, not a Copilot-specific markup —
@@ -160,7 +275,17 @@ export const DEFAULT_PRICING_TABLE = {
160
275
  cacheCreationPerMTok: 12.5,
161
276
  contextWindow: 1_000_000,
162
277
  },
163
- // Anthropic's current top-tier model (replaces Opus 4.8 as the default).
278
+ // Opus 5.5 is the newest Opus: $4/$20 (below Opus 5's $5/$25), with cache
279
+ // reads at 0.05x input ($0.20) rather than the usual 0.1x. 5m cache write
280
+ // is the standard 1.25x ($5).
281
+ 'claude-opus-5-5': {
282
+ inputPerMTok: 4,
283
+ outputPerMTok: 20,
284
+ thinkingPerMTok: 20,
285
+ cacheReadPerMTok: 0.2,
286
+ cacheCreationPerMTok: 5,
287
+ contextWindow: 1_000_000,
288
+ },
164
289
  'claude-opus-5': {
165
290
  inputPerMTok: 5,
166
291
  outputPerMTok: 25,
@@ -189,6 +314,15 @@ export const DEFAULT_PRICING_TABLE = {
189
314
  cacheCreationPerMTok: 2.5,
190
315
  contextWindow: 1_000_000,
191
316
  },
317
+ // Same rates as claude-sonnet-5.
318
+ 'claude-sonnet-5-5': {
319
+ inputPerMTok: 2,
320
+ outputPerMTok: 10,
321
+ thinkingPerMTok: 10,
322
+ cacheReadPerMTok: 0.2,
323
+ cacheCreationPerMTok: 2.5,
324
+ contextWindow: 1_000_000,
325
+ },
192
326
  'claude-sonnet-4-6': {
193
327
  inputPerMTok: 3,
194
328
  outputPerMTok: 15,
@@ -197,6 +331,24 @@ export const DEFAULT_PRICING_TABLE = {
197
331
  cacheCreationPerMTok: 3.75,
198
332
  contextWindow: 1_000_000,
199
333
  },
334
+ // Haiku 5.5 is priced by prompt length, flat: a prompt over 100k tokens bills
335
+ // the whole request at 5x input/output and 5x cache reads (platform.claude.com
336
+ // pricing, verified 2026-10-08). The 5m cache-write tier rate ($0.625 above
337
+ // 100k) is not modeled; cache writes stay at the base $0.125. 1M context per
338
+ // the model overview. 'claude-haiku-4' deliberately stays on 4.5.
339
+ 'claude-haiku-5-5': {
340
+ inputPerMTok: 0.1,
341
+ outputPerMTok: 0.5,
342
+ thinkingPerMTok: 0.5,
343
+ cacheReadPerMTok: 0.01,
344
+ cacheCreationPerMTok: 0.125,
345
+ contextWindow: 1_000_000,
346
+ tierThreshold: 100_000,
347
+ tierInputPerMTok: 0.5,
348
+ tierOutputPerMTok: 2.5,
349
+ tierThinkingPerMTok: 2.5,
350
+ tierCacheReadPerMTok: 0.05,
351
+ },
200
352
  // Dateless current-gen entry — MODEL_ALIASES['claude-haiku-4'] routes here.
201
353
  // Matches the opus/sonnet convention: alias → dateless key → dated legacy key.
202
354
  // Update this entry when Haiku 4.x rates change; the dated entry below is
@@ -209,6 +361,8 @@ export const DEFAULT_PRICING_TABLE = {
209
361
  cacheCreationPerMTok: 1.25,
210
362
  contextWindow: 200_000,
211
363
  },
364
+ // Anthropic lists retirement "not sooner than" 2026-10-15; recheck the
365
+ // deprecations page on or after that date.
212
366
  'claude-haiku-4-5-20251001': {
213
367
  inputPerMTok: 1,
214
368
  outputPerMTok: 5,
@@ -240,6 +394,8 @@ export const DEFAULT_PRICING_TABLE = {
240
394
  cacheCreationPerMTok: 6.25,
241
395
  contextWindow: 1_000_000,
242
396
  },
397
+ // Deprecated 2026-09-30, retires 2026-11-30 (replacement claude-sonnet-5-5).
398
+ // Keep for historical-cost backfill after that date.
243
399
  'claude-sonnet-4-5': {
244
400
  inputPerMTok: 3,
245
401
  outputPerMTok: 15,
@@ -261,6 +417,8 @@ export const DEFAULT_PRICING_TABLE = {
261
417
  // base. A future 'claude-opus-4-10' resolves via the dated-key + alias path
262
418
  // instead (see pricing.test.ts "13b"), never through this entry — no
263
419
  // action needed here when that model ships.
420
+ // Retired (tentative 2026-08-05 per Anthropic's deprecations page). Kept for
421
+ // historical-cost backfill.
264
422
  'claude-opus-4-1': {
265
423
  inputPerMTok: 15,
266
424
  outputPerMTok: 75,
@@ -269,6 +427,7 @@ export const DEFAULT_PRICING_TABLE = {
269
427
  cacheCreationPerMTok: 18.75,
270
428
  contextWindow: 200_000,
271
429
  },
430
+ // Retired 2026-06-15. Kept for historical-cost backfill.
272
431
  'claude-sonnet-4-20250514': {
273
432
  inputPerMTok: 3,
274
433
  outputPerMTok: 15,
@@ -277,6 +436,7 @@ export const DEFAULT_PRICING_TABLE = {
277
436
  cacheCreationPerMTok: 3.75,
278
437
  contextWindow: 200_000,
279
438
  },
439
+ // Retired 2026-06-15. Kept for historical-cost backfill.
280
440
  'claude-opus-4-20250514': {
281
441
  inputPerMTok: 15,
282
442
  outputPerMTok: 75,
@@ -285,6 +445,7 @@ export const DEFAULT_PRICING_TABLE = {
285
445
  cacheCreationPerMTok: 18.75,
286
446
  contextWindow: 200_000,
287
447
  },
448
+ // Retired 2026-02-19. Kept for historical-cost backfill.
288
449
  'claude-haiku-3-5-20241022': {
289
450
  inputPerMTok: 0.8,
290
451
  outputPerMTok: 4,
@@ -294,58 +455,59 @@ export const DEFAULT_PRICING_TABLE = {
294
455
  },
295
456
  // ---- Google Gemini (current generation) ----
296
457
  // Gemini 3.6 Flash, 3.7 Flash, and 3.8 Flash are newer generations than 3.5
297
- // Flash, released after this table's last full pass. All three currently
458
+ // Flash, are the current Flash generation. All three currently
298
459
  // carry identical promotional pricing that steps up on 2027-01-01
299
460
  // (confirmed directly on ai.google.dev/gemini-api/docs/pricing on
300
461
  // 2026-09-02 for 3.8, 2026-08-14 for 3.6/3.7): input $0.75->$1.50, output
301
462
  // (incl. thinking) $3.75->$7.50. Rates below are the CURRENT (pre-step-up)
302
463
  // rate — update all three to the post-2027-01-01 rate once that date
303
- // passes. (Google also publishes a context-caching rate, $0.075->$0.15,
304
- // but it's deliberately omitted here, consistent with every other Gemini
305
- // entry in this table: none of them set cacheReadPerMTok even though
306
- // extractGeminiTokens() does report a real cachedContentTokenCount. This
307
- // is a pre-existing gap across the whole Gemini section, not something
308
- // introduced here — worth a follow-up pass if cached Gemini usage becomes
309
- // material.)
464
+ // passes. The context-caching read rate steps up the same day, $0.075->$0.15
465
+ // (ai.google.dev, verified 2026-10-08). Cache storage is billed per hour
466
+ // and is not modeled.
310
467
  //
311
468
  // 3.8 Flash's own model page states its exact input-token limit as
312
469
  // 1,048,576, not a round 1,000,000 — contextWindow below is rounded to
313
- // 1_000_000 to match every sibling Gemini entry's convention in this file
314
- // (all of which round the same way), not a precision loss introduced here.
470
+ // 1_000_000 to match every sibling Gemini entry's convention in this file.
315
471
  'gemini-3.8-flash': {
316
472
  inputPerMTok: 0.75,
473
+ cacheReadPerMTok: 0.075,
317
474
  outputPerMTok: 3.75,
318
475
  thinkingPerMTok: 3.75,
319
476
  contextWindow: 1_000_000,
320
477
  },
321
478
  'gemini-3.7-flash': {
322
479
  inputPerMTok: 0.75,
480
+ cacheReadPerMTok: 0.075,
323
481
  outputPerMTok: 3.75,
324
482
  thinkingPerMTok: 3.75,
325
483
  contextWindow: 1_000_000,
326
484
  },
327
485
  'gemini-3.6-flash': {
328
486
  inputPerMTok: 0.75,
487
+ cacheReadPerMTok: 0.075,
329
488
  outputPerMTok: 3.75,
330
489
  thinkingPerMTok: 3.75,
331
490
  contextWindow: 1_000_000,
332
491
  },
333
492
  'gemini-3.5-flash': {
334
493
  inputPerMTok: 1.5,
494
+ cacheReadPerMTok: 0.15,
335
495
  outputPerMTok: 9,
336
496
  thinkingPerMTok: 9,
337
497
  contextWindow: 1_000_000,
338
498
  },
339
- // New — Gemini 3.5 generation's cost-efficient tier, released alongside
340
- // 3.5 Flash but not previously in this table.
499
+ // Gemini 3.5 generation's cost-efficient tier, released alongside 3.5 Flash.
341
500
  'gemini-3.5-flash-lite': {
342
501
  inputPerMTok: 0.3,
502
+ cacheReadPerMTok: 0.03,
343
503
  outputPerMTok: 2.5,
344
504
  thinkingPerMTok: 2.5,
345
505
  contextWindow: 1_000_000,
346
506
  },
347
507
  'gemini-3.1-pro-preview': {
348
508
  inputPerMTok: 2,
509
+ cacheReadPerMTok: 0.2,
510
+ tierCacheReadPerMTok: 0.4,
349
511
  outputPerMTok: 12,
350
512
  thinkingPerMTok: 12,
351
513
  contextWindow: 1_000_000,
@@ -367,25 +529,46 @@ export const DEFAULT_PRICING_TABLE = {
367
529
  // set explicitly or reasoning spend is silently billed at $0.
368
530
  'gemini-3.1-flash-lite': {
369
531
  inputPerMTok: 0.25,
532
+ audioInputPerMTok: 0.5,
533
+ cacheReadPerMTok: 0.025,
534
+ audioCacheReadPerMTok: 0.05,
370
535
  outputPerMTok: 1.5,
371
536
  thinkingPerMTok: 1.5,
372
537
  contextWindow: 1_000_000,
373
538
  },
374
539
  'gemini-3.1-flash-lite-preview': {
375
540
  inputPerMTok: 0.25,
541
+ audioInputPerMTok: 0.5,
542
+ cacheReadPerMTok: 0.025,
543
+ audioCacheReadPerMTok: 0.05,
376
544
  outputPerMTok: 1.5,
377
545
  thinkingPerMTok: 1.5,
378
546
  contextWindow: 1_000_000,
379
547
  },
380
548
  'gemini-3-flash-preview': {
381
549
  inputPerMTok: 0.5,
550
+ audioInputPerMTok: 1,
551
+ cacheReadPerMTok: 0.05,
552
+ audioCacheReadPerMTok: 0.1,
382
553
  outputPerMTok: 3,
383
554
  thinkingPerMTok: 3,
384
555
  contextWindow: 1_000_000,
385
556
  },
557
+ // Gemini Robotics-ER 2 (text-token rates; image/video/audio inputs bill at the
558
+ // same per-token rate). Output price includes thinking tokens. $1/$5 is
559
+ // introductory per ai.google.dev, verified 2026-10-08: Google lists
560
+ // $2/$10 starting 2027-01-01, so bump these rates once that date passes.
561
+ 'gemini-robotics-er-2-preview': {
562
+ inputPerMTok: 1,
563
+ outputPerMTok: 5,
564
+ thinkingPerMTok: 5,
565
+ contextWindow: 131_072,
566
+ },
386
567
  // ---- Google Gemini 2.5 ----
387
568
  'gemini-2.5-pro': {
388
569
  inputPerMTok: 1.25,
570
+ cacheReadPerMTok: 0.125,
571
+ tierCacheReadPerMTok: 0.25,
389
572
  outputPerMTok: 10,
390
573
  thinkingPerMTok: 10,
391
574
  contextWindow: 1_000_000,
@@ -396,6 +579,9 @@ export const DEFAULT_PRICING_TABLE = {
396
579
  },
397
580
  'gemini-2.5-flash': {
398
581
  inputPerMTok: 0.3,
582
+ audioInputPerMTok: 1,
583
+ cacheReadPerMTok: 0.03,
584
+ audioCacheReadPerMTok: 0.1,
399
585
  outputPerMTok: 2.5,
400
586
  thinkingPerMTok: 2.5,
401
587
  contextWindow: 1_000_000,
@@ -404,6 +590,9 @@ export const DEFAULT_PRICING_TABLE = {
404
590
  // above; same reasoning applies here.
405
591
  'gemini-2.5-flash-lite': {
406
592
  inputPerMTok: 0.1,
593
+ audioInputPerMTok: 0.3,
594
+ cacheReadPerMTok: 0.01,
595
+ audioCacheReadPerMTok: 0.03,
407
596
  outputPerMTok: 0.4,
408
597
  thinkingPerMTok: 0.4,
409
598
  contextWindow: 1_000_000,
@@ -440,14 +629,63 @@ export const DEFAULT_PRICING_TABLE = {
440
629
  tierOutputPerMTok: 0.6,
441
630
  },
442
631
  // ---- OpenAI (current generation) ----
443
- // GPT-5.6 (Sol/Terra/Luna) is OpenAI's current recommended flagship
444
- // family, replacing unsuffixed GPT-5.5 as the "top tier" choice. Same
445
- // flat long-context tiering as GPT-5.5 (2x input/1.5x output above 272k).
632
+ // GPT-6 (Astra/Sol/Luna) is OpenAI's newest family. Same flat long-context
633
+ // tiering as GPT-5.5/5.6 (2x input/1.5x output above 272k), plus 2x cached
634
+ // input above 272k (stated on each model page, verified 2026-10-08;
635
+ // tierCacheReadPerMTok). Same 1.25x cache-write multiplier as GPT-5.6 (not
636
+ // modeled — see the GPT-5.6 note below).
637
+ // gpt-6-sol is superseded by gpt-6.1-sol but remains billable.
638
+ 'gpt-6-astra': {
639
+ inputPerMTok: 10,
640
+ outputPerMTok: 50,
641
+ cacheReadPerMTok: 1,
642
+ contextWindow: 1_050_000,
643
+ tierThreshold: 272_000,
644
+ tierCacheReadPerMTok: 2,
645
+ tierInputPerMTok: 20,
646
+ tierOutputPerMTok: 75,
647
+ },
648
+ 'gpt-6.1-sol': {
649
+ inputPerMTok: 2,
650
+ outputPerMTok: 10,
651
+ cacheReadPerMTok: 0.1,
652
+ contextWindow: 1_050_000,
653
+ tierThreshold: 272_000,
654
+ tierCacheReadPerMTok: 0.2,
655
+ tierInputPerMTok: 4,
656
+ tierOutputPerMTok: 15,
657
+ },
658
+ 'gpt-6-sol': {
659
+ inputPerMTok: 2,
660
+ outputPerMTok: 10,
661
+ cacheReadPerMTok: 0.2,
662
+ contextWindow: 1_050_000,
663
+ tierThreshold: 272_000,
664
+ tierCacheReadPerMTok: 0.4,
665
+ tierInputPerMTok: 4,
666
+ tierOutputPerMTok: 15,
667
+ },
668
+ 'gpt-6-luna': {
669
+ inputPerMTok: 0.1,
670
+ outputPerMTok: 0.5,
671
+ cacheReadPerMTok: 0.01,
672
+ contextWindow: 1_050_000,
673
+ tierThreshold: 272_000,
674
+ tierCacheReadPerMTok: 0.02,
675
+ tierInputPerMTok: 0.2,
676
+ tierOutputPerMTok: 0.75,
677
+ },
678
+ // GPT-5.6 (Sol/Terra/Luna) is the prior-generation flagship family,
679
+ // superseded by GPT-6. Same flat long-context tiering as GPT-5.5 (2x
680
+ // input/1.5x output above 272k).
446
681
  // Cache writes are billed at 1.25x uncached input on this family — not
447
- // modeled here: extractOpenAITokens() in tokens.ts hardcodes
448
- // cacheCreationTokens to 0 (OpenAI's usage shape has no cache-write
449
- // count), so a cacheCreationPerMTok here would be dead data until that
450
- // extractor gains a field for it.
682
+ // modeled here: no cacheCreationPerMTok is set, so any cache-write tokens
683
+ // that extractOpenAITokens() reports (prompt_tokens_details.cache_write_tokens)
684
+ // are billed at $0.
685
+ // The GPT-5.5/5.6 pages (verified 2026-10-08) say the >272k tier is "2x
686
+ // input and 1.5x output" and are silent on cached input, so no
687
+ // tierCacheReadPerMTok is set for them (unlike GPT-6, which states 2x
688
+ // "input and cache rates"). Cached input above 272k bills at the base rate.
451
689
  // $4/$20 is promotional pricing per OpenAI's own model page: "a 20%
452
690
  // reduction in input pricing and a 33% reduction in output pricing"
453
691
  // versus GPT-5.5 ($5/$30), "available at least through November 21,
@@ -508,7 +746,7 @@ export const DEFAULT_PRICING_TABLE = {
508
746
  cacheReadPerMTok: 0.175,
509
747
  contextWindow: 400_000,
510
748
  },
511
- // Prior-generation flagship, superseded by gpt-5.6-sol above but still
749
+ // Prior-generation flagship, superseded by gpt-5.6-sol and GPT-6 but still
512
750
  // billable at these rates.
513
751
  'gpt-5.5': {
514
752
  inputPerMTok: 5,
@@ -547,6 +785,108 @@ export const DEFAULT_PRICING_TABLE = {
547
785
  cacheReadPerMTok: 0.02,
548
786
  contextWindow: 400_000,
549
787
  },
788
+ // ---- OpenAI (current-generation catalog gaps, added per issue #47) ----
789
+ // Text-token models only; audio/image/TTS/embedding SKUs are out of scope.
790
+ // Rates verified against developers.openai.com/api/docs/pricing.md and each
791
+ // model page on 2026-10-08. The -pro models re-price the full request above
792
+ // 272k input, same flat-tier mode as gpt-5.5.
793
+ // gpt-5.5-cyber is deliberately absent: its model page publishes no context window.
794
+ 'gpt-5.5-pro': {
795
+ inputPerMTok: 30,
796
+ outputPerMTok: 180,
797
+ contextWindow: 1_050_000,
798
+ tierThreshold: 272_000,
799
+ tierInputPerMTok: 60,
800
+ tierOutputPerMTok: 270,
801
+ },
802
+ 'gpt-5.4-pro': {
803
+ inputPerMTok: 30,
804
+ outputPerMTok: 180,
805
+ contextWindow: 1_050_000,
806
+ tierThreshold: 272_000,
807
+ tierInputPerMTok: 60,
808
+ tierOutputPerMTok: 270,
809
+ },
810
+ 'gpt-5.2': {
811
+ inputPerMTok: 1.75,
812
+ outputPerMTok: 14,
813
+ cacheReadPerMTok: 0.175,
814
+ contextWindow: 400_000,
815
+ },
816
+ 'gpt-5.2-pro': {
817
+ inputPerMTok: 21,
818
+ outputPerMTok: 168,
819
+ contextWindow: 400_000,
820
+ },
821
+ // Shutdown 2027-04-01 per OpenAI; keep for historical-cost backfill after.
822
+ 'gpt-5.1': {
823
+ inputPerMTok: 1.25,
824
+ outputPerMTok: 10,
825
+ cacheReadPerMTok: 0.125,
826
+ contextWindow: 400_000,
827
+ },
828
+ 'gpt-5-nano': {
829
+ inputPerMTok: 0.05,
830
+ outputPerMTok: 0.4,
831
+ cacheReadPerMTok: 0.005,
832
+ contextWindow: 400_000,
833
+ },
834
+ 'gpt-5-pro': {
835
+ inputPerMTok: 15,
836
+ outputPerMTok: 120,
837
+ contextWindow: 400_000,
838
+ },
839
+ 'gpt-5.6-cyber': {
840
+ inputPerMTok: 12.5,
841
+ outputPerMTok: 75,
842
+ cacheReadPerMTok: 1.25,
843
+ contextWindow: 400_000,
844
+ },
845
+ 'gpt-4.1': {
846
+ inputPerMTok: 2,
847
+ outputPerMTok: 8,
848
+ cacheReadPerMTok: 0.5,
849
+ contextWindow: 1_047_576,
850
+ },
851
+ 'gpt-4.1-mini': {
852
+ inputPerMTok: 0.4,
853
+ outputPerMTok: 1.6,
854
+ cacheReadPerMTok: 0.1,
855
+ contextWindow: 1_047_576,
856
+ },
857
+ 'gpt-4.1-nano': {
858
+ inputPerMTok: 0.1,
859
+ outputPerMTok: 0.4,
860
+ cacheReadPerMTok: 0.025,
861
+ contextWindow: 1_047_576,
862
+ },
863
+ 'o1-pro': {
864
+ inputPerMTok: 150,
865
+ outputPerMTok: 600,
866
+ contextWindow: 200_000,
867
+ },
868
+ 'o3-pro': {
869
+ inputPerMTok: 20,
870
+ outputPerMTok: 80,
871
+ contextWindow: 200_000,
872
+ },
873
+ 'gpt-4o-2024-05-13': {
874
+ inputPerMTok: 5,
875
+ outputPerMTok: 15,
876
+ contextWindow: 128_000,
877
+ },
878
+ 'gpt-4-0613': {
879
+ inputPerMTok: 30,
880
+ outputPerMTok: 60,
881
+ contextWindow: 8_192,
882
+ },
883
+ 'gpt-3.5-turbo-instruct': {
884
+ inputPerMTok: 1.5,
885
+ outputPerMTok: 2,
886
+ contextWindow: 4_096,
887
+ },
888
+ // Deprecated: gpt-4.1-nano, o1-pro, gpt-4o-2024-05-13 and gpt-4-0613 shut down
889
+ // 2026-10-23; gpt-5-pro and o3-pro 2026-12-11. Kept for historical-cost backfill.
550
890
  // ---- OpenAI (legacy) ----
551
891
  // gpt-4o/-mini and their dated snapshots below all publish a cached-input
552
892
  // rate (~50% off list, notably less generous than the ~90% discount on
@@ -597,15 +937,17 @@ export const DEFAULT_PRICING_TABLE = {
597
937
  // o1-mini and o1-preview were fully shut down by OpenAI (2025-10-27 and
598
938
  // 2025-07-28 respectively) — requests to these model IDs now fail.
599
939
  // Retained only for historical-cost backfill, same convention as
600
- // gemini-2.0-flash / command / command-light below.
940
+ // gemini-2.0-flash (above) / command / command-light (below).
601
941
  'o1-mini': {
602
942
  inputPerMTok: 1.1,
603
943
  outputPerMTok: 4.4,
944
+ cacheReadPerMTok: 0.55,
604
945
  contextWindow: 128_000,
605
946
  },
606
947
  'o1-preview': {
607
948
  inputPerMTok: 15,
608
949
  outputPerMTok: 60,
950
+ cacheReadPerMTok: 7.5,
609
951
  contextWindow: 128_000,
610
952
  },
611
953
  // Repriced down from its April 2025 launch rate ($10/$40) — $2/$8 is the
@@ -629,6 +971,9 @@ export const DEFAULT_PRICING_TABLE = {
629
971
  cacheReadPerMTok: 0.275,
630
972
  contextWindow: 200_000,
631
973
  },
974
+ // gpt-4-turbo and gpt-3.5-turbo (and o1, o3-mini, o4-mini above) are on
975
+ // OpenAI's deprecations page with a 2026-10-23 shutdown. Keep for
976
+ // historical-cost backfill after that date.
632
977
  'gpt-4-turbo': {
633
978
  inputPerMTok: 10,
634
979
  outputPerMTok: 30,
@@ -641,8 +986,8 @@ export const DEFAULT_PRICING_TABLE = {
641
986
  },
642
987
  // ---- AWS Bedrock (Converse API pricing for on-demand) ----
643
988
  // Current Claude generation via Bedrock
644
- // Cache pricing for these models IS now published on the Bedrock pricing
645
- // page (it wasn't as of this file's last check) — resolved by matching
989
+ // Cache pricing for these models is published on the Bedrock pricing
990
+ // page — resolved by matching
646
991
  // each model's known direct-API cache-write/-read multipliers (1.25x /
647
992
  // 0.1x of input), which line up exactly with AWS's own numbers. AWS
648
993
  // publishes BOTH a 5-minute and a 1-hour cache-write rate; cacheCreationPerMTok
@@ -651,9 +996,9 @@ export const DEFAULT_PRICING_TABLE = {
651
996
  // $2/$10 is Anthropic's standing Sonnet 5 price on Bedrock too — not
652
997
  // introductory. See the direct-API claude-sonnet-5 comment above.
653
998
  //
654
- // Bare `anthropic.*` keys below (and the `us./eu./au./jp.` regional-prefix
655
- // aliases in MODEL_ALIASES) price the "Geo and In-region Cross-region
656
- // Inference" tier — AWS bills these two identically. The `global.*` keys
999
+ // Bare `anthropic.*` keys below (and the regional-prefix
1000
+ // aliases (us./eu./au./jp./in./apac.) in MODEL_ALIASES) price the "Geo and
1001
+ // In-region Cross-region Inference" tier — AWS bills these two identically. The `global.*` keys
657
1002
  // further down price the separate, ~10%-cheaper "Global Cross-region
658
1003
  // Inference" tier. On Bedrock a bare `anthropic.*` ID is genuinely the
659
1004
  // in-region on-demand ID (confirmed real and directly invocable for this
@@ -665,10 +1010,10 @@ export const DEFAULT_PRICING_TABLE = {
665
1010
  // claude-sonnet-5 via AWS's own per-SKU pricing data ($2.2/$11/cw$2.75/
666
1011
  // cr$0.22 vs. global's $2/$10/cw$2.5/cr$0.2) and independently corroborated
667
1012
  // as AWS's documented flat ~10% policy (not model-specific) on the
668
- // global-cross-region-inference docs page. The other 6 models' geo rates
669
- // below are DERIVED via that same 1.1x multiplier, not independently
670
- // re-verified per model — re-confirm against AWS's pricing data in the
671
- // next full audit pass if this table's accuracy is ever in question.
1013
+ // global-cross-region-inference docs page. Some pre-5.5
1014
+ // models' geo rates below were originally DERIVED via that same 1.1x
1015
+ // multiplier; entries annotated as read from AWS's pricing page have since
1016
+ // been read directly. Re-confirm the rest in the next full audit pass.
672
1017
  'anthropic.claude-sonnet-5': {
673
1018
  inputPerMTok: 2.2,
674
1019
  outputPerMTok: 11,
@@ -676,6 +1021,23 @@ export const DEFAULT_PRICING_TABLE = {
676
1021
  cacheCreationPerMTok: 2.75,
677
1022
  contextWindow: 1_000_000,
678
1023
  },
1024
+ // Sonnet 5.5 and Opus 5.5 geo rates are read directly from AWS's pricing
1025
+ // page (2026-10-07), not derived from the 1.1x multiplier. Model IDs
1026
+ // confirmed against AWS's model cards (2026-10-07).
1027
+ 'anthropic.claude-sonnet-5-5': {
1028
+ inputPerMTok: 2.2,
1029
+ outputPerMTok: 11,
1030
+ cacheReadPerMTok: 0.22,
1031
+ cacheCreationPerMTok: 2.75,
1032
+ contextWindow: 1_000_000,
1033
+ },
1034
+ 'anthropic.claude-opus-5-5': {
1035
+ inputPerMTok: 4.4,
1036
+ outputPerMTok: 22,
1037
+ cacheReadPerMTok: 0.22,
1038
+ cacheCreationPerMTok: 5.5,
1039
+ contextWindow: 1_000_000,
1040
+ },
679
1041
  'anthropic.claude-fable-5': {
680
1042
  inputPerMTok: 11,
681
1043
  outputPerMTok: 55,
@@ -683,6 +1045,14 @@ export const DEFAULT_PRICING_TABLE = {
683
1045
  cacheCreationPerMTok: 13.75,
684
1046
  contextWindow: 1_000_000,
685
1047
  },
1048
+ // Geo rate read from AWS's pricing page (2026-10-07).
1049
+ 'anthropic.claude-fable-5-1': {
1050
+ inputPerMTok: 11,
1051
+ outputPerMTok: 55,
1052
+ cacheReadPerMTok: 0.275,
1053
+ cacheCreationPerMTok: 13.75,
1054
+ contextWindow: 1_000_000,
1055
+ },
686
1056
  'anthropic.claude-opus-5': {
687
1057
  inputPerMTok: 5.5,
688
1058
  outputPerMTok: 27.5,
@@ -718,7 +1088,108 @@ export const DEFAULT_PRICING_TABLE = {
718
1088
  cacheCreationPerMTok: 1.375,
719
1089
  contextWindow: 200_000,
720
1090
  },
721
- // Global Cross-region Inference tier for the same 7 current-gen models
1091
+ // Haiku 5.5: IDs from its AWS model card, rates from the AWS pricing page (2026-10-07).
1092
+ // The page's "Long Context Pricing" table lists 5x input/output/cache-read; it
1093
+ // states no threshold, so the first-party 100k flat threshold is assumed. Cache
1094
+ // writes stay at the base rate, as on the first-party entry.
1095
+ 'anthropic.claude-haiku-5-5': {
1096
+ inputPerMTok: 0.11,
1097
+ outputPerMTok: 0.55,
1098
+ thinkingPerMTok: 0.55,
1099
+ cacheReadPerMTok: 0.011,
1100
+ cacheCreationPerMTok: 0.1375,
1101
+ contextWindow: 1_000_000,
1102
+ tierThreshold: 100_000,
1103
+ tierInputPerMTok: 0.55,
1104
+ tierOutputPerMTok: 2.75,
1105
+ tierThinkingPerMTok: 2.75,
1106
+ tierCacheReadPerMTok: 0.055,
1107
+ },
1108
+ // Older and Mythos-line Claude models, geo/in-region rates read from AWS's
1109
+ // pricing page (2026-10-07); IDs confirmed against AWS model cards except
1110
+ // Mythos Preview, Opus 4, 3.7 Sonnet and 3 Sonnet (no card; AWS still prices them).
1111
+ // Mythos 5 is bedrock-mantle (Messages API) only, with no Geo or Global profile.
1112
+ 'anthropic.claude-mythos-5': {
1113
+ inputPerMTok: 11,
1114
+ outputPerMTok: 55,
1115
+ cacheReadPerMTok: 1.1,
1116
+ cacheCreationPerMTok: 13.75,
1117
+ contextWindow: 1_000_000,
1118
+ },
1119
+ 'anthropic.claude-mythos-5-1': {
1120
+ inputPerMTok: 11,
1121
+ outputPerMTok: 55,
1122
+ cacheReadPerMTok: 0.275,
1123
+ cacheCreationPerMTok: 13.75,
1124
+ contextWindow: 1_000_000,
1125
+ },
1126
+ 'anthropic.claude-mythos-preview': {
1127
+ inputPerMTok: 27.5,
1128
+ outputPerMTok: 137.5,
1129
+ cacheReadPerMTok: 2.75,
1130
+ cacheCreationPerMTok: 34.375,
1131
+ contextWindow: 1_000_000,
1132
+ },
1133
+ 'anthropic.claude-opus-4-6-v1': {
1134
+ inputPerMTok: 5.5,
1135
+ outputPerMTok: 27.5,
1136
+ cacheReadPerMTok: 0.55,
1137
+ cacheCreationPerMTok: 6.875,
1138
+ contextWindow: 1_000_000,
1139
+ },
1140
+ 'anthropic.claude-opus-4-5-20251101-v1:0': {
1141
+ inputPerMTok: 5.5,
1142
+ outputPerMTok: 27.5,
1143
+ cacheReadPerMTok: 0.55,
1144
+ cacheCreationPerMTok: 6.875,
1145
+ contextWindow: 200_000,
1146
+ },
1147
+ 'anthropic.claude-sonnet-4-5-20250929-v1:0': {
1148
+ inputPerMTok: 3.3,
1149
+ outputPerMTok: 16.5,
1150
+ cacheReadPerMTok: 0.33,
1151
+ cacheCreationPerMTok: 4.125,
1152
+ contextWindow: 200_000,
1153
+ },
1154
+ 'anthropic.claude-sonnet-4-20250514-v1:0': {
1155
+ inputPerMTok: 3,
1156
+ outputPerMTok: 15,
1157
+ cacheReadPerMTok: 0.3,
1158
+ cacheCreationPerMTok: 3.75,
1159
+ contextWindow: 200_000,
1160
+ },
1161
+ 'anthropic.claude-opus-4-1-20250805-v1:0': {
1162
+ inputPerMTok: 15,
1163
+ outputPerMTok: 75,
1164
+ cacheReadPerMTok: 1.5,
1165
+ cacheCreationPerMTok: 18.75,
1166
+ contextWindow: 200_000,
1167
+ },
1168
+ 'anthropic.claude-opus-4-20250514-v1:0': {
1169
+ inputPerMTok: 15,
1170
+ outputPerMTok: 75,
1171
+ cacheReadPerMTok: 1.5,
1172
+ cacheCreationPerMTok: 18.75,
1173
+ contextWindow: 200_000,
1174
+ },
1175
+ 'anthropic.claude-3-7-sonnet-20250219-v1:0': {
1176
+ inputPerMTok: 3,
1177
+ outputPerMTok: 15,
1178
+ cacheReadPerMTok: 0.3,
1179
+ cacheCreationPerMTok: 3.75,
1180
+ contextWindow: 200_000,
1181
+ },
1182
+ 'anthropic.claude-3-haiku-20240307-v1:0': {
1183
+ inputPerMTok: 0.25,
1184
+ outputPerMTok: 1.25,
1185
+ contextWindow: 200_000,
1186
+ },
1187
+ 'anthropic.claude-3-sonnet-20240229-v1:0': {
1188
+ inputPerMTok: 3,
1189
+ outputPerMTok: 15,
1190
+ contextWindow: 200_000,
1191
+ },
1192
+ // Global Cross-region Inference tier for the Bedrock Claude models
722
1193
  // above — ~10% cheaper, see the tier comment there. Real, directly
723
1194
  // invocable Bedrock model IDs (confirmed via AWS's model-card pages), not
724
1195
  // this table's own naming convention.
@@ -729,6 +1200,20 @@ export const DEFAULT_PRICING_TABLE = {
729
1200
  cacheCreationPerMTok: 2.5,
730
1201
  contextWindow: 1_000_000,
731
1202
  },
1203
+ 'global.anthropic.claude-sonnet-5-5': {
1204
+ inputPerMTok: 2,
1205
+ outputPerMTok: 10,
1206
+ cacheReadPerMTok: 0.2,
1207
+ cacheCreationPerMTok: 2.5,
1208
+ contextWindow: 1_000_000,
1209
+ },
1210
+ 'global.anthropic.claude-opus-5-5': {
1211
+ inputPerMTok: 4,
1212
+ outputPerMTok: 20,
1213
+ cacheReadPerMTok: 0.2,
1214
+ cacheCreationPerMTok: 5,
1215
+ contextWindow: 1_000_000,
1216
+ },
732
1217
  'global.anthropic.claude-fable-5': {
733
1218
  inputPerMTok: 10,
734
1219
  outputPerMTok: 50,
@@ -771,12 +1256,70 @@ export const DEFAULT_PRICING_TABLE = {
771
1256
  cacheCreationPerMTok: 1.25,
772
1257
  contextWindow: 200_000,
773
1258
  },
1259
+ 'global.anthropic.claude-opus-4-6-v1': {
1260
+ inputPerMTok: 5,
1261
+ outputPerMTok: 25,
1262
+ cacheReadPerMTok: 0.5,
1263
+ cacheCreationPerMTok: 6.25,
1264
+ contextWindow: 1_000_000,
1265
+ },
1266
+ 'global.anthropic.claude-opus-4-5-20251101-v1:0': {
1267
+ inputPerMTok: 5,
1268
+ outputPerMTok: 25,
1269
+ cacheReadPerMTok: 0.5,
1270
+ cacheCreationPerMTok: 6.25,
1271
+ contextWindow: 200_000,
1272
+ },
1273
+ 'global.anthropic.claude-sonnet-4-5-20250929-v1:0': {
1274
+ inputPerMTok: 3,
1275
+ outputPerMTok: 15,
1276
+ cacheReadPerMTok: 0.3,
1277
+ cacheCreationPerMTok: 3.75,
1278
+ contextWindow: 200_000,
1279
+ },
1280
+ 'global.anthropic.claude-haiku-5-5': {
1281
+ inputPerMTok: 0.1,
1282
+ outputPerMTok: 0.5,
1283
+ thinkingPerMTok: 0.5,
1284
+ cacheReadPerMTok: 0.01,
1285
+ cacheCreationPerMTok: 0.125,
1286
+ contextWindow: 1_000_000,
1287
+ tierThreshold: 100_000,
1288
+ tierInputPerMTok: 0.5,
1289
+ tierOutputPerMTok: 2.5,
1290
+ tierThinkingPerMTok: 2.5,
1291
+ tierCacheReadPerMTok: 0.05,
1292
+ },
1293
+ // Fable 5.1 and Mythos 5.1: AWS model cards confirm these global IDs exist, but
1294
+ // the pricing page lists no Global-tier row. Rates are DERIVED from the geo row
1295
+ // via AWS's flat 1.1x geo premium; replace with published rates when AWS lists them.
1296
+ 'global.anthropic.claude-fable-5-1': {
1297
+ inputPerMTok: 10,
1298
+ outputPerMTok: 50,
1299
+ cacheReadPerMTok: 0.25,
1300
+ cacheCreationPerMTok: 12.5,
1301
+ contextWindow: 1_000_000,
1302
+ },
1303
+ 'global.anthropic.claude-mythos-5-1': {
1304
+ inputPerMTok: 10,
1305
+ outputPerMTok: 50,
1306
+ cacheReadPerMTok: 0.25,
1307
+ cacheCreationPerMTok: 12.5,
1308
+ contextWindow: 1_000_000,
1309
+ },
1310
+ // Sonnet 4 is priced identically in the Geo and Global tiers on the AWS page.
1311
+ 'global.anthropic.claude-sonnet-4-20250514-v1:0': {
1312
+ inputPerMTok: 3,
1313
+ outputPerMTok: 15,
1314
+ cacheReadPerMTok: 0.3,
1315
+ cacheCreationPerMTok: 3.75,
1316
+ contextWindow: 200_000,
1317
+ },
774
1318
  // Legacy Claude models via Bedrock cross-region inference
775
1319
  // Cache rates verified against AWS Bedrock pricing page (2026-06-03) — but
776
1320
  // against the WRONG table. AWS publishes two tiers for this model: the
777
1321
  // standard $3/$15 tier (cache write $3.75, cache read $0.30 — used below,
778
- // paired with the input/output rate this entry already had and this PR
779
- // does not change) and a separate "Public Extended Access, Effective 1
1322
+ // paired with this entry's standard input/output rate) and a separate "Public Extended Access, Effective 1
780
1323
  // Dec 2025" tier at exactly 2x ($6/$30, cache write $7.50, cache read
781
1324
  // $0.60) for accounts still on this model post-EOL. The 2026-06-03 check
782
1325
  // paired the standard input/output with the extended-access cache rates
@@ -786,8 +1329,7 @@ export const DEFAULT_PRICING_TABLE = {
786
1329
  // placeholders on 2026-08-14, not inferred), so it's internally
787
1330
  // consistent again. If callers are actually on Public Extended Access —
788
1331
  // undetectable from usage data alone — the whole entry (not just the
789
- // cache rates) would need to move to the $6/$30 row instead; that's a
790
- // separate decision this PR doesn't make.
1332
+ // cache rates) would need to move to the $6/$30 row instead; not done here.
791
1333
  'anthropic.claude-3-5-sonnet-20241022-v2:0': {
792
1334
  inputPerMTok: 3,
793
1335
  outputPerMTok: 15,
@@ -795,8 +1337,8 @@ export const DEFAULT_PRICING_TABLE = {
795
1337
  cacheCreationPerMTok: 3.75,
796
1338
  contextWindow: 200_000,
797
1339
  },
798
- // Cache pricing for this model IS now published on the Bedrock pricing
799
- // page (it wasn't as of this file's last check) — same 1.25x-input /
1340
+ // Cache pricing for this model is published on the Bedrock pricing
1341
+ // page — same 1.25x-input /
800
1342
  // 0.1x-input multiplier convention used everywhere else in this section.
801
1343
  'anthropic.claude-3-5-haiku-20241022-v1:0': {
802
1344
  inputPerMTok: 0.8,
@@ -825,7 +1367,65 @@ export const DEFAULT_PRICING_TABLE = {
825
1367
  outputPerMTok: 0.6,
826
1368
  contextWindow: 8_192,
827
1369
  },
1370
+ // Llama 3.1+ / 4 per-MTok rates are us-east-1 on-demand from AWS's pricing
1371
+ // page; IDs and context windows confirmed against AWS model cards (2026-10-07).
1372
+ 'meta.llama4-maverick-17b-instruct-v1:0': {
1373
+ inputPerMTok: 0.24,
1374
+ outputPerMTok: 0.97,
1375
+ contextWindow: 1_000_000,
1376
+ },
1377
+ 'meta.llama4-scout-17b-instruct-v1:0': {
1378
+ inputPerMTok: 0.17,
1379
+ outputPerMTok: 0.66,
1380
+ contextWindow: 10_000_000,
1381
+ },
1382
+ 'meta.llama3-3-70b-instruct-v1:0': {
1383
+ inputPerMTok: 0.72,
1384
+ outputPerMTok: 0.72,
1385
+ contextWindow: 128_000,
1386
+ },
1387
+ 'meta.llama3-2-1b-instruct-v1:0': {
1388
+ inputPerMTok: 0.1,
1389
+ outputPerMTok: 0.1,
1390
+ contextWindow: 128_000,
1391
+ },
1392
+ 'meta.llama3-2-3b-instruct-v1:0': {
1393
+ inputPerMTok: 0.15,
1394
+ outputPerMTok: 0.15,
1395
+ contextWindow: 128_000,
1396
+ },
1397
+ 'meta.llama3-2-11b-instruct-v1:0': {
1398
+ inputPerMTok: 0.16,
1399
+ outputPerMTok: 0.16,
1400
+ contextWindow: 128_000,
1401
+ },
1402
+ 'meta.llama3-2-90b-instruct-v1:0': {
1403
+ inputPerMTok: 0.72,
1404
+ outputPerMTok: 0.72,
1405
+ contextWindow: 128_000,
1406
+ },
1407
+ 'meta.llama3-1-8b-instruct-v1:0': {
1408
+ inputPerMTok: 0.22,
1409
+ outputPerMTok: 0.22,
1410
+ contextWindow: 128_000,
1411
+ },
1412
+ 'meta.llama3-1-70b-instruct-v1:0': {
1413
+ inputPerMTok: 0.72,
1414
+ outputPerMTok: 0.72,
1415
+ contextWindow: 128_000,
1416
+ },
828
1417
  // Mistral via Bedrock
1418
+ // Mistral 7B and Pixtral Large rates: us-east-1 on-demand, AWS page (2026-10-07).
1419
+ 'mistral.mistral-7b-instruct-v0:2': {
1420
+ inputPerMTok: 0.15,
1421
+ outputPerMTok: 0.2,
1422
+ contextWindow: 32_000,
1423
+ },
1424
+ 'mistral.pixtral-large-2502-v1:0': {
1425
+ inputPerMTok: 2,
1426
+ outputPerMTok: 6,
1427
+ contextWindow: 128_000,
1428
+ },
829
1429
  'mistral.mistral-large-2402-v1:0': {
830
1430
  inputPerMTok: 4,
831
1431
  outputPerMTok: 12,
@@ -836,20 +1436,44 @@ export const DEFAULT_PRICING_TABLE = {
836
1436
  outputPerMTok: 3,
837
1437
  contextWindow: 32_000,
838
1438
  },
839
- // Amazon Nova
1439
+ // Mistral Large 3 on Bedrock: $0.50/$1.50 per the AWS pricing page, 256K per its model card.
1440
+ 'mistral.mistral-large-3-675b-instruct': {
1441
+ inputPerMTok: 0.5,
1442
+ outputPerMTok: 1.5,
1443
+ contextWindow: 256_000,
1444
+ },
1445
+ // Amazon Nova (Premier / 2 Lite added 2026-10-07). Nova Premier has no AWS model
1446
+ // card but is still priced on the pricing page; its ID and 1M window are unconfirmed.
1447
+ // Cache reads (25% of input) are from the Bedrock pricing page's Nova on-demand
1448
+ // table (verified 2026-10-08); the prompt-caching docs list Micro/Lite/Pro/2 Lite
1449
+ // as supported. Premier's cache support is unchecked. No cache-write charge seen.
1450
+ 'amazon.nova-premier-v1:0': {
1451
+ inputPerMTok: 2.5,
1452
+ outputPerMTok: 12.5,
1453
+ contextWindow: 1_000_000,
1454
+ },
1455
+ 'amazon.nova-2-lite-v1:0': {
1456
+ inputPerMTok: 0.3,
1457
+ outputPerMTok: 2.5,
1458
+ cacheReadPerMTok: 0.075,
1459
+ contextWindow: 1_000_000,
1460
+ },
840
1461
  'amazon.nova-pro-v1:0': {
841
1462
  inputPerMTok: 0.8,
842
1463
  outputPerMTok: 3.2,
1464
+ cacheReadPerMTok: 0.2,
843
1465
  contextWindow: 300_000,
844
1466
  },
845
1467
  'amazon.nova-lite-v1:0': {
846
1468
  inputPerMTok: 0.06,
847
1469
  outputPerMTok: 0.24,
1470
+ cacheReadPerMTok: 0.015,
848
1471
  contextWindow: 300_000,
849
1472
  },
850
1473
  'amazon.nova-micro-v1:0': {
851
1474
  inputPerMTok: 0.035,
852
1475
  outputPerMTok: 0.14,
1476
+ cacheReadPerMTok: 0.00875,
853
1477
  contextWindow: 128_000,
854
1478
  },
855
1479
  // ---- Mistral ----
@@ -873,6 +1497,24 @@ export const DEFAULT_PRICING_TABLE = {
873
1497
  outputPerMTok: 1.5,
874
1498
  contextWindow: 256_000,
875
1499
  },
1500
+ // Mistral Large 4 (docs.mistral.ai/models/mistral-large-4-0, v26.10, public
1501
+ // preview since 2026-10-06; API names mistral-large-4 / mistral-large-4-0).
1502
+ // Rates are the preview SALE price actually billed, verified 2026-10-07:
1503
+ // $0.68 in / $2.09 out against a struck-through list of $1.36 / $4.18.
1504
+ // TEMPORARY SALE PRICING, no published end date: re-verify at every pricing
1505
+ // audit and revert to the list price ($1.36 / $4.18) once the sale ends,
1506
+ // otherwise costs are under-reported by half. 'mistral-large-latest' above is
1507
+ // deliberately unchanged: the docs don't say it now routes here.
1508
+ 'mistral-large-4': {
1509
+ inputPerMTok: 0.68,
1510
+ outputPerMTok: 2.09,
1511
+ contextWindow: 1_000_000,
1512
+ },
1513
+ 'mistral-large-4-0': {
1514
+ inputPerMTok: 0.68,
1515
+ outputPerMTok: 2.09,
1516
+ contextWindow: 1_000_000,
1517
+ },
876
1518
  'mistral-small-latest': {
877
1519
  inputPerMTok: 0.15,
878
1520
  outputPerMTok: 0.6,
@@ -900,7 +1542,7 @@ export const DEFAULT_PRICING_TABLE = {
900
1542
  },
901
1543
  // Retired 2026-07-31 (deprecated 2026-05-22) — no longer billable via the
902
1544
  // Mistral API. Retained for historical-cost backfill only, same
903
- // convention as gemini-2.0-flash / command / command-light below.
1545
+ // convention as gemini-2.0-flash (above) / command / command-light (below).
904
1546
  // contextWindow unchanged (128k) — this predates the 256k bump the
905
1547
  // -latest family got later; it was never repriced, only retired.
906
1548
  'mistral-nemo': {
@@ -908,7 +1550,9 @@ export const DEFAULT_PRICING_TABLE = {
908
1550
  outputPerMTok: 0.15,
909
1551
  contextWindow: 131_072,
910
1552
  },
911
- // ---- Mistral (legacy — deprecated March 2025) ----
1553
+ // ---- Mistral (legacy — retired 2025-03-30) ----
1554
+ // Both are listed under "Deprecated & retired models" on docs.mistral.ai
1555
+ // (checked 2026-10-07). Retained for historical-cost backfill.
912
1556
  'open-mistral-7b': {
913
1557
  inputPerMTok: 0.25,
914
1558
  outputPerMTok: 0.25,
@@ -919,9 +1563,8 @@ export const DEFAULT_PRICING_TABLE = {
919
1563
  outputPerMTok: 0.7,
920
1564
  contextWindow: 32_000,
921
1565
  },
922
- // Note: codestral gets the SMALLER window (128k) — the generalist models
923
- // above get the larger 256k window. This is backwards from what the table
924
- // previously encoded (codestral had 256k, generalists had 131_072).
1566
+ // Note: codestral's window (128k) is smaller than the 256k of the current
1567
+ // -latest generalist models.
925
1568
  'codestral-latest': {
926
1569
  inputPerMTok: 0.3,
927
1570
  outputPerMTok: 0.9,
@@ -1003,18 +1646,14 @@ export const DEFAULT_PRICING_TABLE = {
1003
1646
  outputPerMTok: 6,
1004
1647
  cacheReadPerMTok: 0.3,
1005
1648
  contextWindow: 500_000,
1006
- // ModelPricing has no tiered cache-read field, so the long-context
1007
- // tier's doubled cached-input rate ($0.6 vs the $0.3 base rate above)
1008
- // cannot be represented — the base (lower) cache rate is used at every
1009
- // tier. Not fixable without a schema change; known and accepted.
1010
1649
  tierThreshold: 200_000,
1011
1650
  tierMode: 'flat',
1651
+ tierCacheReadPerMTok: 0.6,
1012
1652
  tierInputPerMTok: 4,
1013
1653
  tierOutputPerMTok: 12,
1014
1654
  },
1015
- // xAI's current flagship, GA (docs.x.ai marks it "Latest"/default model,
1016
- // no preview/beta disclaimer), sourced from docs.x.ai/docs/pricing and
1017
- // docs.x.ai/docs/models/grok-4.6 directly — same $2/$6 base and 200K flat
1655
+ // Prior xAI flagship (superseded by grok-4.7), sourced from
1656
+ // docs.x.ai/docs/pricing and docs.x.ai/docs/models/grok-4.6 — same $2/$6 base and 200K flat
1018
1657
  // long-context tier shape as grok-4.5, but a higher cached-input rate
1019
1658
  // ($0.5 base / $1 long-context tier, vs 4.5's $0.3/$0.6).
1020
1659
  'grok-4.6': {
@@ -1022,40 +1661,135 @@ export const DEFAULT_PRICING_TABLE = {
1022
1661
  outputPerMTok: 6,
1023
1662
  cacheReadPerMTok: 0.5,
1024
1663
  contextWindow: 500_000,
1025
- // Same known schema gap as grok-4.5: no tiered cache-read field, so the
1026
- // long-context tier's doubled cached-input rate ($1 vs the $0.5 base
1027
- // rate above) can't be represented — the base rate applies at every
1028
- // tier. Not fixable without a schema change; known and accepted.
1029
1664
  tierThreshold: 200_000,
1030
1665
  tierMode: 'flat',
1666
+ tierCacheReadPerMTok: 1,
1031
1667
  tierInputPerMTok: 4,
1032
1668
  tierOutputPerMTok: 12,
1033
1669
  },
1670
+ // Verified 2026-10-07 against docs.x.ai/developers/pricing. Every entry
1671
+ // below has the same long-context (xAI: ">= 200k"; computeCost tiers
1672
+ // strictly above 200_000 input tokens) flat tier as grok-4.5, with
1673
+ // the cached-input rate doubled in that tier (tierCacheReadPerMTok).
1674
+ // Grok 4.7 Fast and the 1.1x US-regional multiplier on the xAI page are
1675
+ // separate SKUs (Cursor/Grok Build only; regional endpoint) — not modeled.
1676
+ 'grok-4.7': {
1677
+ inputPerMTok: 2,
1678
+ outputPerMTok: 6,
1679
+ cacheReadPerMTok: 0.5,
1680
+ contextWindow: 500_000,
1681
+ tierThreshold: 200_000,
1682
+ tierMode: 'flat',
1683
+ tierCacheReadPerMTok: 1,
1684
+ tierInputPerMTok: 4,
1685
+ tierOutputPerMTok: 12,
1686
+ },
1687
+ 'grok-build-0.1': {
1688
+ inputPerMTok: 1,
1689
+ outputPerMTok: 2,
1690
+ cacheReadPerMTok: 0.2,
1691
+ contextWindow: 256_000,
1692
+ tierThreshold: 200_000,
1693
+ tierMode: 'flat',
1694
+ tierCacheReadPerMTok: 0.4,
1695
+ tierInputPerMTok: 2,
1696
+ tierOutputPerMTok: 4,
1697
+ },
1698
+ 'grok-4.3': {
1699
+ inputPerMTok: 1.25,
1700
+ outputPerMTok: 2.5,
1701
+ cacheReadPerMTok: 0.2,
1702
+ contextWindow: 1_000_000,
1703
+ tierThreshold: 200_000,
1704
+ tierMode: 'flat',
1705
+ tierCacheReadPerMTok: 0.4,
1706
+ tierInputPerMTok: 2.5,
1707
+ tierOutputPerMTok: 5,
1708
+ },
1709
+ 'grok-4.20-0309-reasoning': {
1710
+ inputPerMTok: 1.25,
1711
+ outputPerMTok: 2.5,
1712
+ cacheReadPerMTok: 0.2,
1713
+ contextWindow: 1_000_000,
1714
+ tierThreshold: 200_000,
1715
+ tierMode: 'flat',
1716
+ tierCacheReadPerMTok: 0.4,
1717
+ tierInputPerMTok: 2.5,
1718
+ tierOutputPerMTok: 5,
1719
+ },
1720
+ 'grok-4.20-0309-non-reasoning': {
1721
+ inputPerMTok: 1.25,
1722
+ outputPerMTok: 2.5,
1723
+ cacheReadPerMTok: 0.2,
1724
+ contextWindow: 1_000_000,
1725
+ tierThreshold: 200_000,
1726
+ tierMode: 'flat',
1727
+ tierCacheReadPerMTok: 0.4,
1728
+ tierInputPerMTok: 2.5,
1729
+ tierOutputPerMTok: 5,
1730
+ },
1731
+ 'grok-4.20-multi-agent-0309': {
1732
+ inputPerMTok: 1.25,
1733
+ outputPerMTok: 2.5,
1734
+ cacheReadPerMTok: 0.2,
1735
+ contextWindow: 1_000_000,
1736
+ tierThreshold: 200_000,
1737
+ tierMode: 'flat',
1738
+ tierCacheReadPerMTok: 0.4,
1739
+ tierInputPerMTok: 2.5,
1740
+ tierOutputPerMTok: 5,
1741
+ },
1034
1742
  // ---- Moonshot AI ----
1035
- // Sourced from GitHub Copilot's pricing page (see the file-level comment
1036
- // above) — Moonshot AI has no separate public per-token pricing page.
1743
+ // Moonshot publishes direct pricing at platform.moonshot.ai/docs/pricing/chat
1744
+ // (rates agree with GitHub Copilot's Moonshot table). K3 also bills cache
1745
+ // writes separately by TTL (5min $3.00 / 1h $6.00, published on the
1746
+ // context-caching guide, verified 2026-10-08). extractOpenAITokens() reads
1747
+ // the usage object's single cache_write_tokens count into cacheCreationTokens
1748
+ // and bills it at the 5min rate. The 1h TTL ($6.00) is not modeled: the TTL
1749
+ // split is only in response headers, so 1h writes under-price by $3.00/MTok.
1750
+ // GitHub's retirement table removes Kimi K2.7 Code from Copilot on 2026-10-02,
1751
+ // but Moonshot's direct page still lists it, so the entry stays.
1037
1752
  'kimi-k2.7-code': {
1038
1753
  inputPerMTok: 0.95,
1039
1754
  outputPerMTok: 4,
1040
1755
  cacheReadPerMTok: 0.19,
1041
- contextWindow: 256_000,
1756
+ contextWindow: 262_144,
1042
1757
  },
1043
1758
  'kimi-k3': {
1044
1759
  inputPerMTok: 3,
1045
1760
  outputPerMTok: 15,
1046
1761
  cacheReadPerMTok: 0.3,
1047
- contextWindow: 256_000,
1762
+ cacheCreationPerMTok: 3,
1763
+ contextWindow: 1_048_576,
1764
+ },
1765
+ // kimi-k2.7-code-highspeed and kimi-k2.6 verified 2026-10-07 against the
1766
+ // same page (column headers: cache hit / cache miss / output).
1767
+ 'kimi-k2.7-code-highspeed': {
1768
+ inputPerMTok: 1.9,
1769
+ outputPerMTok: 8,
1770
+ cacheReadPerMTok: 0.38,
1771
+ contextWindow: 262_144,
1772
+ },
1773
+ 'kimi-k2.6': {
1774
+ inputPerMTok: 0.95,
1775
+ outputPerMTok: 4,
1776
+ cacheReadPerMTok: 0.16,
1777
+ contextWindow: 262_144,
1048
1778
  },
1049
1779
  // ---- Microsoft (MAI-Code) ----
1050
1780
  // Sourced from GitHub Copilot's pricing page (see the file-level comment
1051
1781
  // above) — Microsoft has no separate public per-token pricing page for
1052
1782
  // the MAI-Code family.
1783
+ // No longer on Copilot's pricing page (only mai-code-1.1-flash is, checked
1784
+ // 2026-10-07) — likely superseded. Retained for historical-cost backfill.
1053
1785
  'mai-code-1-flash': {
1054
1786
  inputPerMTok: 0.75,
1055
1787
  outputPerMTok: 4.5,
1056
1788
  cacheReadPerMTok: 0.075,
1057
1789
  contextWindow: 128_000,
1058
1790
  },
1791
+ // contextWindow unverified: neither Copilot nor Microsoft publishes one for the
1792
+ // hosted model. Microsoft's launch post cites 256K for the on-device build only.
1059
1793
  'mai-code-1.1-flash': {
1060
1794
  inputPerMTok: 0.2,
1061
1795
  outputPerMTok: 1.2,
@@ -1065,7 +1799,9 @@ export const DEFAULT_PRICING_TABLE = {
1065
1799
  // ---- GitHub (Copilot fine-tuned) ----
1066
1800
  // Raptor mini is GitHub's own fine-tuned model, billed only through
1067
1801
  // Copilot — there is no vendor page to source it from other than Copilot's
1068
- // own pricing page (see the file-level comment above).
1802
+ // own pricing page (see the file-level comment above). No longer listed
1803
+ // there as of 2026-10-07 — likely delisted. Retained for historical-cost
1804
+ // backfill.
1069
1805
  'raptor-mini': {
1070
1806
  inputPerMTok: 0.25,
1071
1807
  outputPerMTok: 2,