@broberg/ai-sdk 0.56.0 → 0.56.1

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  PRICING,
3
3
  stripDatedSuffix
4
- } from "./chunk-UCBMCVFU.js";
4
+ } from "./chunk-QVMGFHCF.js";
5
5
 
6
6
  // src/cost/media-pricing.ts
7
7
  var MEDIA_PRICING_CHECKED_AT = "2026-09-05";
@@ -325,4 +325,4 @@ export {
325
325
  warnIfPricingStale,
326
326
  resetPricingWarningForTests
327
327
  };
328
- //# sourceMappingURL=chunk-JCUF333L.js.map
328
+ //# sourceMappingURL=chunk-BOZYLPIM.js.map
@@ -192,6 +192,8 @@ var PRICING = {
192
192
  "mistral:open-mistral-nemo": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.15, version: MS },
193
193
  // Moderation (F016.4) — per input token; output 0. (OCR is per-page in the adapter.)
194
194
  "mistral:mistral-moderation-latest": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0, version: MS },
195
+ "mistral:mistral-moderation-2603": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0, version: MS },
196
+ // F077.4 pinned default
195
197
  // Embeddings (F016.5) — per input token.
196
198
  "mistral:mistral-embed": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0, version: MS },
197
199
  "mistral:codestral-embed": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0, version: MS },
@@ -214,4 +216,4 @@ export {
214
216
  stripDatedSuffix,
215
217
  getPrice
216
218
  };
217
- //# sourceMappingURL=chunk-UCBMCVFU.js.map
219
+ //# sourceMappingURL=chunk-QVMGFHCF.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/cost/pricing.ts"],"sourcesContent":["// Versioned per-(provider, model) pricing. F3.6 populates the table + adds tests\n// + MiniMax coverage. F3.1 ships the type + lookup with an empty table, so\n// computeCost returns 0 for every model until F3.6 lands (calls still complete).\nexport interface PricingEntry {\n /** USD per 1M input tokens. */\n inputPer1M: number;\n /** USD per 1M output tokens. */\n outputPer1M: number;\n /** USD per 1M cache-read tokens (falls back to input rate if unset). */\n cacheReadPer1M?: number;\n /** USD per 1M cache-write/creation tokens (falls back to input rate if unset). */\n cacheWritePer1M?: number;\n /** Pricing snapshot version (date or tag) so stale entries are detectable. */\n version: string;\n /** F075 — a second set of rates for prompts LONGER than `aboveTokens` (input +\n * cache-read + cache-write). Claude Haiku 5.5 costs 5x above 100k tokens; one row\n * could only be right for one side of that line. */\n longPrompt?: { aboveTokens: number; inputPer1M: number; outputPer1M: number; cacheReadPer1M?: number; cacheWritePer1M?: number };\n}\n\n// USD per 1M tokens. Anthropic cache multipliers follow the standard model:\n// cache-read ≈ 0.1× input, cache-write ≈ 1.25× input. Verified against the\n// pricing tables in cms (packages/cms-ai/src/providers) + trail (model-lab).\n// MiniMax M2.7 is an estimate pending confirmation against OpenRouter's live\n// price page — flagged in its version string.\nconst V = \"2026-06-02\";\n// Mistral prices come straight from mistral.ai/pricing (per Christian's CD report).\nconst MS = \"2026-06-04-mistral.ai\";\n// Anthropic's own price page, read for F075.\nconst AN = \"2026-10-08-platform.claude.com\";\n\n/** Keyed `${provider}:${model}`. Exported so the catalogue-research job (F014)\n * can enumerate every priced entry and diff it against the live provider lists. */\nexport const PRICING: Record<string, PricingEntry> = {\n // Anthropic (direct API). DEFAULT_TIER_MAP: fast/cheap=haiku, smart/vision=sonnet, powerful=opus.\n // $1.00/$5.00 — Anthropic's published Haiku 4.5 rate, confirmed against the\n // claude-api skill's model table 2026-09-03. F048: this row said $0.80/$4.00 while\n // \"openrouter:anthropic/claude-haiku-4.5\" said $1.00/$5.00 — the SAME model at two\n // prices, and the shorter, likelier id carried the wrong one. A consumer pricing\n // 68M haiku tokens (upmetrics' real volume) was told 20% under.\n \"anthropic:claude-haiku-4-5\": {\n inputPer1M: 1.0,\n outputPer1M: 5.0,\n cacheReadPer1M: 0.1,\n cacheWritePer1M: 1.25,\n version: \"2026-09-03\",\n },\n \"anthropic:claude-sonnet-4-6\": {\n inputPer1M: 3.0,\n outputPer1M: 15.0,\n cacheReadPer1M: 0.3,\n cacheWritePer1M: 3.75,\n version: V,\n },\n // $5.00/$25.00 — Anthropic's published Opus 4.8 rate, confirmed against the\n // claude-api skill's model table 2026-09-03.\n //\n // FOUND BY THE CONTRADICTION GUARD ON ITS FIRST RUN, not by a report. This row said\n // $15.00/$75.00 while \"openrouter:anthropic/claude-opus-4.8\" said $5.00/$25.00 —\n // THREE TIMES too high, the opposite direction from the haiku error and a larger\n // multiple. Nobody had noticed, because both numbers looked like answers.\n \"anthropic:claude-opus-4-8\": {\n inputPer1M: 5.0,\n outputPer1M: 25.0,\n cacheReadPer1M: 0.5,\n cacheWritePer1M: 6.25,\n version: \"2026-09-03\",\n },\n\n // F075 — the rest of what Anthropic's /v1/models lists for our key, read 2026-10-08\n // from platform.claude.com/docs/en/about-claude/pricing. Cache-read is NOT 0.1x\n // everywhere: Opus/Sonnet 5.5 are 0.05x and Fable 5.1 is 0.025x. cacheWrite is the\n // 5-minute rate (the only one the SDK writes).\n \"anthropic:claude-fable-5-1\": { inputPer1M: 10, outputPer1M: 50, cacheReadPer1M: 0.25, cacheWritePer1M: 12.5, version: AN },\n \"anthropic:claude-fable-5\": { inputPer1M: 10, outputPer1M: 50, cacheReadPer1M: 1, cacheWritePer1M: 12.5, version: AN },\n \"anthropic:claude-opus-5-5\": { inputPer1M: 4, outputPer1M: 20, cacheReadPer1M: 0.2, cacheWritePer1M: 5, version: AN },\n \"anthropic:claude-opus-5\": { inputPer1M: 5, outputPer1M: 25, cacheReadPer1M: 0.5, cacheWritePer1M: 6.25, version: AN },\n \"anthropic:claude-opus-4-7\": { inputPer1M: 5, outputPer1M: 25, cacheReadPer1M: 0.5, cacheWritePer1M: 6.25, version: AN },\n \"anthropic:claude-opus-4-6\": { inputPer1M: 5, outputPer1M: 25, cacheReadPer1M: 0.5, cacheWritePer1M: 6.25, version: AN },\n \"anthropic:claude-opus-4-5\": { inputPer1M: 5, outputPer1M: 25, cacheReadPer1M: 0.5, cacheWritePer1M: 6.25, version: AN },\n \"anthropic:claude-sonnet-5-5\": { inputPer1M: 2, outputPer1M: 10, cacheReadPer1M: 0.1, cacheWritePer1M: 2.5, version: AN },\n \"anthropic:claude-sonnet-5\": { inputPer1M: 2, outputPer1M: 10, cacheReadPer1M: 0.2, cacheWritePer1M: 2.5, version: AN },\n \"anthropic:claude-sonnet-4-5\": { inputPer1M: 3, outputPer1M: 15, cacheReadPer1M: 0.3, cacheWritePer1M: 3.75, version: AN },\n \"anthropic:claude-haiku-5-5\": {\n inputPer1M: 0.1, outputPer1M: 0.5, cacheReadPer1M: 0.01, cacheWritePer1M: 0.125, version: AN,\n longPrompt: { aboveTokens: 100_000, inputPer1M: 0.5, outputPer1M: 2.5, cacheReadPer1M: 0.05, cacheWritePer1M: 0.625 },\n },\n\n // OpenAI. embedding default tier = text-embedding-3-small (no output tokens).\n // Cached input is 50% of the input rate — $1.25 vs $2.50 (gpt-4o) and $0.075 vs\n // $0.15 (gpt-4o-mini), read from developers.openai.com/api/docs/pricing on\n // 2026-08-27. NOTE IT IS 50%, NOT the 10% Mistral and Gemini charge: assuming one\n // uniform discount across providers would have understated OpenAI's cost by 4x on\n // the cached half. Caching is automatic above 1,024 tokens — no key, no opt-in.\n // The embedding models list NO cached price (embeddings do not cache), so they\n // deliberately get no row here rather than a guessed one.\n \"openai:text-embedding-3-small\": { inputPer1M: 0.02, outputPer1M: 0, version: V },\n \"openai:text-embedding-3-large\": { inputPer1M: 0.13, outputPer1M: 0, version: V },\n \"openai:gpt-4o\": { inputPer1M: 2.5, cacheReadPer1M: 1.25, outputPer1M: 10.0, version: \"2026-08-27-developers.openai.com\" },\n \"openai:gpt-4o-mini\": { inputPer1M: 0.15, cacheReadPer1M: 0.075, outputPer1M: 0.6, version: \"2026-08-27-developers.openai.com\" },\n // Whisper is priced per MINUTE — see MEDIA_PRICING in ./media-pricing.ts. It used to\n // sit here as 0/0 \"so token-based compute never charges it\", and inwardly that worked.\n // Outwardly it did not: getModelPrice(\"whisper-1\") answered `{unit:\"per_1m_tokens\",\n // inputPer1M: 0}` — i.e. \"this model is free\" — because media rows are consulted LAST\n // and a token row was already there. The per-minute price was unreachable by its own\n // id. computeCost still returns 0 for it (no entry) and transcribe still computes its\n // own cost, so nothing about billing changed; only the public answer stopped lying.\n\n // OpenRouter (meta-router — model slugs include the upstream vendor). Slugs use\n // dots (claude-sonnet-4.6) to match OpenRouter's live ids; the dashed forms\n // never matched a real call. Caught by the F014 catalogue research.\n \"openrouter:anthropic/claude-sonnet-4.6\": { inputPer1M: 3.0, outputPer1M: 15.0, version: V },\n // OpenRouter ground-truth $1/$5 — a markup over Anthropic-direct's $0.8/$4\n // (the `anthropic:` entry above). Was masked while the slug used dashes.\n \"openrouter:anthropic/claude-haiku-4.5\": { inputPer1M: 1.0, outputPer1M: 5.0, version: \"2026-06-04\" },\n \"openrouter:google/gemini-2.5-flash\": { inputPer1M: 0.3, outputPer1M: 2.5, version: V },\n // Ground-truth from OpenRouter /api/v1/models, re-read 2026-10-02 (F067.5; was 0.279/1.2).\n \"openrouter:minimax/minimax-m2.7\": {\n inputPer1M: 0.21,\n outputPer1M: 0.84,\n version: \"2026-10-02-openrouter-live\",\n },\n // DeepSeek V4 (CN-hosted — NOT GDPR-safe; non-personal-data workloads only).\n // On 2026-05-22 DeepSeek made the \"75% off\" promo the permanent official price.\n // V4-Pro $0.435/$0.87 is ~34x cheaper than GPT-5.5 on output; flash is cheaper\n // still. Numbers match OpenRouter /api/v1/models 1:1 (no router markup). A strong\n // cheap route for fleet background work once `claude -p` is API-billed (15 Jun).\n // Re-read from OpenRouter /api/v1/models 2026-10-02 (F067.5). These moved three\n // times in a month (Sep 3: pro 1.02, Oct 1: flash 0.042, Oct 2: flash 0.028) — an\n // OpenRouter call books usage.cost from the response anyway; this row is the fallback.\n \"openrouter:deepseek/deepseek-v4-pro\": { inputPer1M: 0.2088, outputPer1M: 0.4176, version: \"2026-10-02-openrouter-live\" },\n \"openrouter:deepseek/deepseek-v4-flash\": { inputPer1M: 0.028, outputPer1M: 0.056, version: \"2026-10-02-openrouter-live\" },\n // DeepSeek DIRECT API (provider \"deepseek\", F030 non-PII secondary). Rates from\n // api-docs.deepseek.com 2026-06-30 ($0.14/$0.28 per 1M; both map to deepseek-v4-flash).\n // `deepseek-chat` (non-thinking) + `deepseek-reasoner` (thinking) DEPRECATE 2026-07-24.\n // (The bare `deepseek-v4-flash` basename is already priced via the openrouter entry\n // above — kept distinct here to avoid a basename collision in the F027 pricing-API.)\n // Verify against a real key when it lands.\n \"deepseek:deepseek-chat\": { inputPer1M: 0.14, outputPer1M: 0.28, version: \"2026-06-30-deepseek-direct\" },\n \"deepseek:deepseek-reasoner\": { inputPer1M: 0.14, outputPer1M: 0.28, version: \"2026-06-30-deepseek-direct\" },\n // F066 — TypeSafe Jev. docs.typesafe.ai/models, read 2026-10-01: \"$42 per billion\n // tokens (input only)\", output free. Priced on the VERSIONED id because the response\n // reports the model that actually ran (\"jev-1.13.0\") even when you ask for\n // \"jev-latest\" — so a future version arrives unpriced and is booked as such, rather\n // than inheriting a number nobody checked for it.\n \"typesafe:jev-1.13.0\": { inputPer1M: 0.042, outputPer1M: 0, version: \"2026-10-01-typesafe-official\" },\n\n // Cached input tokens cost 10% of the input rate — $0.03 vs $0.30 (2.5-flash) and\n // $0.01 vs $0.10 (2.5-flash-lite), read from ai.google.dev/gemini-api/docs/pricing\n // on 2026-08-27 rather than recalled. NB the storage fee on that page ($1/1M\n // tokens/hour) applies to EXPLICIT context caching, where you create a CachedContent\n // object with a TTL. We use IMPLICIT caching, which has no storage charge — so this\n // table is not silently under-billing.\n // Google Gemini (direct). Provider key is \"gemini\" — matches the adapter's\n // usage.provider + the override.provider callers pass. (Image-gen models are\n // priced per-image in the adapter, not here.)\n \"gemini:gemini-2.5-flash\": { inputPer1M: 0.3, cacheReadPer1M: 0.03, outputPer1M: 2.5, version: \"2026-08-27-ai.google.dev\" },\n // flash-lite is the default `video` tier (F019) — cheap native video understanding.\n \"gemini:gemini-2.5-flash-lite\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.4, version: \"2026-08-27-ai.google.dev\" },\n\n // Vertex AI (F038) — the EU-resident route to the SAME Gemini models, so Google's\n // published Gemini token prices apply. Listed separately because cost lookups key on\n // `provider:model`: without these rows an EU vision/video call would silently log\n // $0, which is worse than no tracking (a confident wrong number).\n \"vertex:gemini-2.5-flash\": { inputPer1M: 0.3, cacheReadPer1M: 0.03, outputPer1M: 2.5, version: \"2026-08-27-ai.google.dev\" },\n \"vertex:gemini-2.5-flash-lite\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.4, version: \"2026-08-27-ai.google.dev\" },\n\n // Cached prompt tokens bill at 10% of the input rate (F039, measured 2026-08-27:\n // an 8,810-token prefix reported 8,784 cached on the second call WITH a\n // prompt_cache_key, and 0 without one at every size up to 57k).\n // Mistral (direct, La Plateforme). Official prices from mistral.ai/pricing\n // (2026-06-04, per Christian's CD report). EU/Paris-hosted — the designated\n // GDPR-safe provider for client/personal-data workloads (see F015). NB:\n // medium-3.5 is the premium \"Vibe\" coding tier ($1.5/$7.5); Large 3 ($0.5/$1.5)\n // is the cheaper frontier general-purpose model despite the higher number.\n \"mistral:mistral-large-latest\": { inputPer1M: 0.5, cacheReadPer1M: 0.05, outputPer1M: 1.5, version: MS },\n \"mistral:mistral-large-2512\": { inputPer1M: 0.5, cacheReadPer1M: 0.05, outputPer1M: 1.5, version: MS },\n // Large 4 (F074.1), measured 2026-10-08 on docs.mistral.ai/models/mistral-large-4:\n // LIST price. The page also shows a 50% \"Public Preview\" sale ($0.68/$0.07/$2.09)\n // with no end date; booking the sale would under-report the day it ends, unseen.\n // Cached input shows as \"$0.14\": that is 10% of $1.36 rounded to cents (the sale's\n // \"$0.07\" is 0.068 the same way), and 10% is the rate measured for Mistral (F039).\n \"mistral:mistral-large-4\": { inputPer1M: 1.36, cacheReadPer1M: 0.136, outputPer1M: 4.18, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-large-4-0\": { inputPer1M: 1.36, cacheReadPer1M: 0.136, outputPer1M: 4.18, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-medium-latest\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: MS },\n \"mistral:mistral-medium-3.5\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: MS },\n // F076.2 — Mistral's model API now lists mistral-medium-3 as an alias of Medium 3.5\n // (measured 2026-10-08), so it bills at 3.5's price, not Medium 3's $0.40/$2.00.\n \"mistral:mistral-medium-3\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n // F076.1 — Small 4 (2603) is $0.15/$0.60, measured 2026-10-08 on\n // docs.mistral.ai/models/mistral-small-4-0-26-03 AND OpenRouter's mistral-small-2603.\n // This row said $0.10/$0.30 (Small 3's price, carried over when -latest moved to\n // 2603), so the fleet's fast/cheap tiers were booked at about half their cost.\n \"mistral:mistral-small-latest\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.6, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-small-2603\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.6, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:ministral-3b-latest\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.1, version: MS },\n \"mistral:ministral-8b-latest\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.15, version: MS },\n \"mistral:ministral-14b-latest\": { inputPer1M: 0.2, cacheReadPer1M: 0.02, outputPer1M: 0.2, version: MS },\n // F076.2 — both Magistral aliases now point at the unified models (measured\n // 2026-10-08 via /v1/models): magistral-medium-latest → Medium 3.5, magistral-small-\n // latest → Small 4. They bill at those models' prices, not the old Magistral rates.\n \"mistral:magistral-medium-latest\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:magistral-small-latest\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.6, version: \"2026-10-08-docs.mistral.ai\" },\n // F076.2 — ids Mistral's model API lists for our key that had no row (a call to any\n // of them was booked at $0). Prices from docs.mistral.ai, 2026-10-08; cache-read at\n // the measured 10% (F039).\n \"mistral:mistral-vibe-cli-fast\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.6, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-medium-3-5\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-medium\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-medium-2604\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-vibe-cli-latest\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-vibe-cli-with-tools\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:ministral-14b-2512\": { inputPer1M: 0.2, cacheReadPer1M: 0.02, outputPer1M: 0.2, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:ministral-8b-2512\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.15, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:ministral-3b-2512\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.1, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:voxtral-small-2507\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.4, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:voxtral-small-latest\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.4, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:codestral-2508\": { inputPer1M: 0.3, cacheReadPer1M: 0.03, outputPer1M: 0.9, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-code-latest\": { inputPer1M: 0.3, cacheReadPer1M: 0.03, outputPer1M: 0.9, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-code-fim-latest\": { inputPer1M: 0.3, cacheReadPer1M: 0.03, outputPer1M: 0.9, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:devstral-latest\": { inputPer1M: 0.4, cacheReadPer1M: 0.04, outputPer1M: 2.0, version: MS },\n \"mistral:codestral-latest\": { inputPer1M: 0.3, cacheReadPer1M: 0.03, outputPer1M: 0.9, version: MS },\n \"mistral:open-mistral-nemo\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.15, version: MS },\n // Moderation (F016.4) — per input token; output 0. (OCR is per-page in the adapter.)\n \"mistral:mistral-moderation-latest\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0, version: MS },\n // Embeddings (F016.5) — per input token.\n \"mistral:mistral-embed\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0, version: MS },\n \"mistral:codestral-embed\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0, version: MS },\n // F048 — reported by upmetrics as an unknown model (6 calls). Official mistral.ai/pricing.\n \"mistral:pixtral-large-latest\": { inputPer1M: 2.0, cacheReadPer1M: 0.2, outputPer1M: 6.0, version: \"2026-09-03\" },\n};\n\n/** Strip a provider's dated snapshot suffix: \"claude-haiku-4-5-20251001\" → \"claude-haiku-4-5\".\n * Returns the input unchanged when there is no suffix.\n *\n * ONE definition, used by BOTH lookups. F012 taught this rule to `getPrice` — the\n * internal cost path — and the exported catalogue never learned it, so for two years\n * `usage.costUsd` priced a dated id correctly while `getModelPrice` returned undefined\n * for the same string. Found by upmetrics, who use the catalogue and not our internals:\n * 19,456 calls of `claude-haiku-4-5-20251001` looked like an unknown model. Fixing the\n * instance and not the class is the shape; a copy of this regex in the other lookup\n * would have been the same mistake a third time. */\nexport function stripDatedSuffix(model: string): string {\n return model.replace(/-\\d{8}$/, \"\");\n}\n\nexport function getPrice(provider: string, model: string): PricingEntry | undefined {\n const exact = PRICING[`${provider}:${model}`];\n if (exact) return exact;\n // A real paid call must never be logged as $0 (F012).\n const base = stripDatedSuffix(model);\n if (base !== model) return PRICING[`${provider}:${base}`];\n return undefined;\n}\n"],"mappings":";AAyBA,IAAM,IAAI;AAEV,IAAM,KAAK;AAEX,IAAM,KAAK;AAIJ,IAAM,UAAwC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOnD,8BAA8B;AAAA,IAC5B,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,SAAS;AAAA,EACX;AAAA,EACA,+BAA+B;AAAA,IAC7B,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,SAAS;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,6BAA6B;AAAA,IAC3B,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,SAAS;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,8BAA8B,EAAE,YAAY,IAAI,aAAa,IAAI,gBAAgB,MAAM,iBAAiB,MAAM,SAAS,GAAG;AAAA,EAC1H,4BAA4B,EAAE,YAAY,IAAI,aAAa,IAAI,gBAAgB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K,gBAAgB,MAAM,aAAa,GAAK,SAAS,GAAG;AAAA,EAClG,4BAA4B,EAAE,YAAY,KAAK,gBAAgB,MAAM,aAAa,KAAK,SAAS,GAAG;AAAA,EACnG,6BAA6B,EAAE,YAAY,MAAM,gBAAgB,OAAO,aAAa,MAAM,SAAS,GAAG;AAAA;AAAA,EAEvG,qCAAqC,EAAE,YAAY,KAAK,gBAAgB,MAAM,aAAa,GAAG,SAAS,GAAG;AAAA;AAAA,EAE1G,yBAAyB,EAAE,YAAY,KAAK,gBAAgB,MAAM,aAAa,GAAG,SAAS,GAAG;AAAA,EAC9F,2BAA2B,EAAE,YAAY,MAAM,gBAAgB,OAAO,aAAa,GAAG,SAAS,GAAG;AAAA;AAAA,EAElG,gCAAgC,EAAE,YAAY,GAAK,gBAAgB,KAAK,aAAa,GAAK,SAAS,aAAa;AAClH;AAYO,SAAS,iBAAiB,OAAuB;AACtD,SAAO,MAAM,QAAQ,WAAW,EAAE;AACpC;AAEO,SAAS,SAAS,UAAkB,OAAyC;AAClF,QAAM,QAAQ,QAAQ,GAAG,QAAQ,IAAI,KAAK,EAAE;AAC5C,MAAI,MAAO,QAAO;AAElB,QAAM,OAAO,iBAAiB,KAAK;AACnC,MAAI,SAAS,MAAO,QAAO,QAAQ,GAAG,QAAQ,IAAI,IAAI,EAAE;AACxD,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../src/cost/pricing.ts"],"sourcesContent":["// Versioned per-(provider, model) pricing. F3.6 populates the table + adds tests\n// + MiniMax coverage. F3.1 ships the type + lookup with an empty table, so\n// computeCost returns 0 for every model until F3.6 lands (calls still complete).\nexport interface PricingEntry {\n /** USD per 1M input tokens. */\n inputPer1M: number;\n /** USD per 1M output tokens. */\n outputPer1M: number;\n /** USD per 1M cache-read tokens (falls back to input rate if unset). */\n cacheReadPer1M?: number;\n /** USD per 1M cache-write/creation tokens (falls back to input rate if unset). */\n cacheWritePer1M?: number;\n /** Pricing snapshot version (date or tag) so stale entries are detectable. */\n version: string;\n /** F075 — a second set of rates for prompts LONGER than `aboveTokens` (input +\n * cache-read + cache-write). Claude Haiku 5.5 costs 5x above 100k tokens; one row\n * could only be right for one side of that line. */\n longPrompt?: { aboveTokens: number; inputPer1M: number; outputPer1M: number; cacheReadPer1M?: number; cacheWritePer1M?: number };\n}\n\n// USD per 1M tokens. Anthropic cache multipliers follow the standard model:\n// cache-read ≈ 0.1× input, cache-write ≈ 1.25× input. Verified against the\n// pricing tables in cms (packages/cms-ai/src/providers) + trail (model-lab).\n// MiniMax M2.7 is an estimate pending confirmation against OpenRouter's live\n// price page — flagged in its version string.\nconst V = \"2026-06-02\";\n// Mistral prices come straight from mistral.ai/pricing (per Christian's CD report).\nconst MS = \"2026-06-04-mistral.ai\";\n// Anthropic's own price page, read for F075.\nconst AN = \"2026-10-08-platform.claude.com\";\n\n/** Keyed `${provider}:${model}`. Exported so the catalogue-research job (F014)\n * can enumerate every priced entry and diff it against the live provider lists. */\nexport const PRICING: Record<string, PricingEntry> = {\n // Anthropic (direct API). DEFAULT_TIER_MAP: fast/cheap=haiku, smart/vision=sonnet, powerful=opus.\n // $1.00/$5.00 — Anthropic's published Haiku 4.5 rate, confirmed against the\n // claude-api skill's model table 2026-09-03. F048: this row said $0.80/$4.00 while\n // \"openrouter:anthropic/claude-haiku-4.5\" said $1.00/$5.00 — the SAME model at two\n // prices, and the shorter, likelier id carried the wrong one. A consumer pricing\n // 68M haiku tokens (upmetrics' real volume) was told 20% under.\n \"anthropic:claude-haiku-4-5\": {\n inputPer1M: 1.0,\n outputPer1M: 5.0,\n cacheReadPer1M: 0.1,\n cacheWritePer1M: 1.25,\n version: \"2026-09-03\",\n },\n \"anthropic:claude-sonnet-4-6\": {\n inputPer1M: 3.0,\n outputPer1M: 15.0,\n cacheReadPer1M: 0.3,\n cacheWritePer1M: 3.75,\n version: V,\n },\n // $5.00/$25.00 — Anthropic's published Opus 4.8 rate, confirmed against the\n // claude-api skill's model table 2026-09-03.\n //\n // FOUND BY THE CONTRADICTION GUARD ON ITS FIRST RUN, not by a report. This row said\n // $15.00/$75.00 while \"openrouter:anthropic/claude-opus-4.8\" said $5.00/$25.00 —\n // THREE TIMES too high, the opposite direction from the haiku error and a larger\n // multiple. Nobody had noticed, because both numbers looked like answers.\n \"anthropic:claude-opus-4-8\": {\n inputPer1M: 5.0,\n outputPer1M: 25.0,\n cacheReadPer1M: 0.5,\n cacheWritePer1M: 6.25,\n version: \"2026-09-03\",\n },\n\n // F075 — the rest of what Anthropic's /v1/models lists for our key, read 2026-10-08\n // from platform.claude.com/docs/en/about-claude/pricing. Cache-read is NOT 0.1x\n // everywhere: Opus/Sonnet 5.5 are 0.05x and Fable 5.1 is 0.025x. cacheWrite is the\n // 5-minute rate (the only one the SDK writes).\n \"anthropic:claude-fable-5-1\": { inputPer1M: 10, outputPer1M: 50, cacheReadPer1M: 0.25, cacheWritePer1M: 12.5, version: AN },\n \"anthropic:claude-fable-5\": { inputPer1M: 10, outputPer1M: 50, cacheReadPer1M: 1, cacheWritePer1M: 12.5, version: AN },\n \"anthropic:claude-opus-5-5\": { inputPer1M: 4, outputPer1M: 20, cacheReadPer1M: 0.2, cacheWritePer1M: 5, version: AN },\n \"anthropic:claude-opus-5\": { inputPer1M: 5, outputPer1M: 25, cacheReadPer1M: 0.5, cacheWritePer1M: 6.25, version: AN },\n \"anthropic:claude-opus-4-7\": { inputPer1M: 5, outputPer1M: 25, cacheReadPer1M: 0.5, cacheWritePer1M: 6.25, version: AN },\n \"anthropic:claude-opus-4-6\": { inputPer1M: 5, outputPer1M: 25, cacheReadPer1M: 0.5, cacheWritePer1M: 6.25, version: AN },\n \"anthropic:claude-opus-4-5\": { inputPer1M: 5, outputPer1M: 25, cacheReadPer1M: 0.5, cacheWritePer1M: 6.25, version: AN },\n \"anthropic:claude-sonnet-5-5\": { inputPer1M: 2, outputPer1M: 10, cacheReadPer1M: 0.1, cacheWritePer1M: 2.5, version: AN },\n \"anthropic:claude-sonnet-5\": { inputPer1M: 2, outputPer1M: 10, cacheReadPer1M: 0.2, cacheWritePer1M: 2.5, version: AN },\n \"anthropic:claude-sonnet-4-5\": { inputPer1M: 3, outputPer1M: 15, cacheReadPer1M: 0.3, cacheWritePer1M: 3.75, version: AN },\n \"anthropic:claude-haiku-5-5\": {\n inputPer1M: 0.1, outputPer1M: 0.5, cacheReadPer1M: 0.01, cacheWritePer1M: 0.125, version: AN,\n longPrompt: { aboveTokens: 100_000, inputPer1M: 0.5, outputPer1M: 2.5, cacheReadPer1M: 0.05, cacheWritePer1M: 0.625 },\n },\n\n // OpenAI. embedding default tier = text-embedding-3-small (no output tokens).\n // Cached input is 50% of the input rate — $1.25 vs $2.50 (gpt-4o) and $0.075 vs\n // $0.15 (gpt-4o-mini), read from developers.openai.com/api/docs/pricing on\n // 2026-08-27. NOTE IT IS 50%, NOT the 10% Mistral and Gemini charge: assuming one\n // uniform discount across providers would have understated OpenAI's cost by 4x on\n // the cached half. Caching is automatic above 1,024 tokens — no key, no opt-in.\n // The embedding models list NO cached price (embeddings do not cache), so they\n // deliberately get no row here rather than a guessed one.\n \"openai:text-embedding-3-small\": { inputPer1M: 0.02, outputPer1M: 0, version: V },\n \"openai:text-embedding-3-large\": { inputPer1M: 0.13, outputPer1M: 0, version: V },\n \"openai:gpt-4o\": { inputPer1M: 2.5, cacheReadPer1M: 1.25, outputPer1M: 10.0, version: \"2026-08-27-developers.openai.com\" },\n \"openai:gpt-4o-mini\": { inputPer1M: 0.15, cacheReadPer1M: 0.075, outputPer1M: 0.6, version: \"2026-08-27-developers.openai.com\" },\n // Whisper is priced per MINUTE — see MEDIA_PRICING in ./media-pricing.ts. It used to\n // sit here as 0/0 \"so token-based compute never charges it\", and inwardly that worked.\n // Outwardly it did not: getModelPrice(\"whisper-1\") answered `{unit:\"per_1m_tokens\",\n // inputPer1M: 0}` — i.e. \"this model is free\" — because media rows are consulted LAST\n // and a token row was already there. The per-minute price was unreachable by its own\n // id. computeCost still returns 0 for it (no entry) and transcribe still computes its\n // own cost, so nothing about billing changed; only the public answer stopped lying.\n\n // OpenRouter (meta-router — model slugs include the upstream vendor). Slugs use\n // dots (claude-sonnet-4.6) to match OpenRouter's live ids; the dashed forms\n // never matched a real call. Caught by the F014 catalogue research.\n \"openrouter:anthropic/claude-sonnet-4.6\": { inputPer1M: 3.0, outputPer1M: 15.0, version: V },\n // OpenRouter ground-truth $1/$5 — a markup over Anthropic-direct's $0.8/$4\n // (the `anthropic:` entry above). Was masked while the slug used dashes.\n \"openrouter:anthropic/claude-haiku-4.5\": { inputPer1M: 1.0, outputPer1M: 5.0, version: \"2026-06-04\" },\n \"openrouter:google/gemini-2.5-flash\": { inputPer1M: 0.3, outputPer1M: 2.5, version: V },\n // Ground-truth from OpenRouter /api/v1/models, re-read 2026-10-02 (F067.5; was 0.279/1.2).\n \"openrouter:minimax/minimax-m2.7\": {\n inputPer1M: 0.21,\n outputPer1M: 0.84,\n version: \"2026-10-02-openrouter-live\",\n },\n // DeepSeek V4 (CN-hosted — NOT GDPR-safe; non-personal-data workloads only).\n // On 2026-05-22 DeepSeek made the \"75% off\" promo the permanent official price.\n // V4-Pro $0.435/$0.87 is ~34x cheaper than GPT-5.5 on output; flash is cheaper\n // still. Numbers match OpenRouter /api/v1/models 1:1 (no router markup). A strong\n // cheap route for fleet background work once `claude -p` is API-billed (15 Jun).\n // Re-read from OpenRouter /api/v1/models 2026-10-02 (F067.5). These moved three\n // times in a month (Sep 3: pro 1.02, Oct 1: flash 0.042, Oct 2: flash 0.028) — an\n // OpenRouter call books usage.cost from the response anyway; this row is the fallback.\n \"openrouter:deepseek/deepseek-v4-pro\": { inputPer1M: 0.2088, outputPer1M: 0.4176, version: \"2026-10-02-openrouter-live\" },\n \"openrouter:deepseek/deepseek-v4-flash\": { inputPer1M: 0.028, outputPer1M: 0.056, version: \"2026-10-02-openrouter-live\" },\n // DeepSeek DIRECT API (provider \"deepseek\", F030 non-PII secondary). Rates from\n // api-docs.deepseek.com 2026-06-30 ($0.14/$0.28 per 1M; both map to deepseek-v4-flash).\n // `deepseek-chat` (non-thinking) + `deepseek-reasoner` (thinking) DEPRECATE 2026-07-24.\n // (The bare `deepseek-v4-flash` basename is already priced via the openrouter entry\n // above — kept distinct here to avoid a basename collision in the F027 pricing-API.)\n // Verify against a real key when it lands.\n \"deepseek:deepseek-chat\": { inputPer1M: 0.14, outputPer1M: 0.28, version: \"2026-06-30-deepseek-direct\" },\n \"deepseek:deepseek-reasoner\": { inputPer1M: 0.14, outputPer1M: 0.28, version: \"2026-06-30-deepseek-direct\" },\n // F066 — TypeSafe Jev. docs.typesafe.ai/models, read 2026-10-01: \"$42 per billion\n // tokens (input only)\", output free. Priced on the VERSIONED id because the response\n // reports the model that actually ran (\"jev-1.13.0\") even when you ask for\n // \"jev-latest\" — so a future version arrives unpriced and is booked as such, rather\n // than inheriting a number nobody checked for it.\n \"typesafe:jev-1.13.0\": { inputPer1M: 0.042, outputPer1M: 0, version: \"2026-10-01-typesafe-official\" },\n\n // Cached input tokens cost 10% of the input rate — $0.03 vs $0.30 (2.5-flash) and\n // $0.01 vs $0.10 (2.5-flash-lite), read from ai.google.dev/gemini-api/docs/pricing\n // on 2026-08-27 rather than recalled. NB the storage fee on that page ($1/1M\n // tokens/hour) applies to EXPLICIT context caching, where you create a CachedContent\n // object with a TTL. We use IMPLICIT caching, which has no storage charge — so this\n // table is not silently under-billing.\n // Google Gemini (direct). Provider key is \"gemini\" — matches the adapter's\n // usage.provider + the override.provider callers pass. (Image-gen models are\n // priced per-image in the adapter, not here.)\n \"gemini:gemini-2.5-flash\": { inputPer1M: 0.3, cacheReadPer1M: 0.03, outputPer1M: 2.5, version: \"2026-08-27-ai.google.dev\" },\n // flash-lite is the default `video` tier (F019) — cheap native video understanding.\n \"gemini:gemini-2.5-flash-lite\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.4, version: \"2026-08-27-ai.google.dev\" },\n\n // Vertex AI (F038) — the EU-resident route to the SAME Gemini models, so Google's\n // published Gemini token prices apply. Listed separately because cost lookups key on\n // `provider:model`: without these rows an EU vision/video call would silently log\n // $0, which is worse than no tracking (a confident wrong number).\n \"vertex:gemini-2.5-flash\": { inputPer1M: 0.3, cacheReadPer1M: 0.03, outputPer1M: 2.5, version: \"2026-08-27-ai.google.dev\" },\n \"vertex:gemini-2.5-flash-lite\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.4, version: \"2026-08-27-ai.google.dev\" },\n\n // Cached prompt tokens bill at 10% of the input rate (F039, measured 2026-08-27:\n // an 8,810-token prefix reported 8,784 cached on the second call WITH a\n // prompt_cache_key, and 0 without one at every size up to 57k).\n // Mistral (direct, La Plateforme). Official prices from mistral.ai/pricing\n // (2026-06-04, per Christian's CD report). EU/Paris-hosted — the designated\n // GDPR-safe provider for client/personal-data workloads (see F015). NB:\n // medium-3.5 is the premium \"Vibe\" coding tier ($1.5/$7.5); Large 3 ($0.5/$1.5)\n // is the cheaper frontier general-purpose model despite the higher number.\n \"mistral:mistral-large-latest\": { inputPer1M: 0.5, cacheReadPer1M: 0.05, outputPer1M: 1.5, version: MS },\n \"mistral:mistral-large-2512\": { inputPer1M: 0.5, cacheReadPer1M: 0.05, outputPer1M: 1.5, version: MS },\n // Large 4 (F074.1), measured 2026-10-08 on docs.mistral.ai/models/mistral-large-4:\n // LIST price. The page also shows a 50% \"Public Preview\" sale ($0.68/$0.07/$2.09)\n // with no end date; booking the sale would under-report the day it ends, unseen.\n // Cached input shows as \"$0.14\": that is 10% of $1.36 rounded to cents (the sale's\n // \"$0.07\" is 0.068 the same way), and 10% is the rate measured for Mistral (F039).\n \"mistral:mistral-large-4\": { inputPer1M: 1.36, cacheReadPer1M: 0.136, outputPer1M: 4.18, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-large-4-0\": { inputPer1M: 1.36, cacheReadPer1M: 0.136, outputPer1M: 4.18, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-medium-latest\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: MS },\n \"mistral:mistral-medium-3.5\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: MS },\n // F076.2 — Mistral's model API now lists mistral-medium-3 as an alias of Medium 3.5\n // (measured 2026-10-08), so it bills at 3.5's price, not Medium 3's $0.40/$2.00.\n \"mistral:mistral-medium-3\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n // F076.1 — Small 4 (2603) is $0.15/$0.60, measured 2026-10-08 on\n // docs.mistral.ai/models/mistral-small-4-0-26-03 AND OpenRouter's mistral-small-2603.\n // This row said $0.10/$0.30 (Small 3's price, carried over when -latest moved to\n // 2603), so the fleet's fast/cheap tiers were booked at about half their cost.\n \"mistral:mistral-small-latest\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.6, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-small-2603\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.6, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:ministral-3b-latest\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.1, version: MS },\n \"mistral:ministral-8b-latest\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.15, version: MS },\n \"mistral:ministral-14b-latest\": { inputPer1M: 0.2, cacheReadPer1M: 0.02, outputPer1M: 0.2, version: MS },\n // F076.2 — both Magistral aliases now point at the unified models (measured\n // 2026-10-08 via /v1/models): magistral-medium-latest → Medium 3.5, magistral-small-\n // latest → Small 4. They bill at those models' prices, not the old Magistral rates.\n \"mistral:magistral-medium-latest\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:magistral-small-latest\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.6, version: \"2026-10-08-docs.mistral.ai\" },\n // F076.2 — ids Mistral's model API lists for our key that had no row (a call to any\n // of them was booked at $0). Prices from docs.mistral.ai, 2026-10-08; cache-read at\n // the measured 10% (F039).\n \"mistral:mistral-vibe-cli-fast\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.6, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-medium-3-5\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-medium\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-medium-2604\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-vibe-cli-latest\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-vibe-cli-with-tools\": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:ministral-14b-2512\": { inputPer1M: 0.2, cacheReadPer1M: 0.02, outputPer1M: 0.2, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:ministral-8b-2512\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.15, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:ministral-3b-2512\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.1, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:voxtral-small-2507\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.4, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:voxtral-small-latest\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.4, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:codestral-2508\": { inputPer1M: 0.3, cacheReadPer1M: 0.03, outputPer1M: 0.9, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-code-latest\": { inputPer1M: 0.3, cacheReadPer1M: 0.03, outputPer1M: 0.9, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:mistral-code-fim-latest\": { inputPer1M: 0.3, cacheReadPer1M: 0.03, outputPer1M: 0.9, version: \"2026-10-08-docs.mistral.ai\" },\n \"mistral:devstral-latest\": { inputPer1M: 0.4, cacheReadPer1M: 0.04, outputPer1M: 2.0, version: MS },\n \"mistral:codestral-latest\": { inputPer1M: 0.3, cacheReadPer1M: 0.03, outputPer1M: 0.9, version: MS },\n \"mistral:open-mistral-nemo\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.15, version: MS },\n // Moderation (F016.4) — per input token; output 0. (OCR is per-page in the adapter.)\n \"mistral:mistral-moderation-latest\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0, version: MS },\n \"mistral:mistral-moderation-2603\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0, version: MS }, // F077.4 pinned default\n // Embeddings (F016.5) — per input token.\n \"mistral:mistral-embed\": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0, version: MS },\n \"mistral:codestral-embed\": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0, version: MS },\n // F048 — reported by upmetrics as an unknown model (6 calls). Official mistral.ai/pricing.\n \"mistral:pixtral-large-latest\": { inputPer1M: 2.0, cacheReadPer1M: 0.2, outputPer1M: 6.0, version: \"2026-09-03\" },\n};\n\n/** Strip a provider's dated snapshot suffix: \"claude-haiku-4-5-20251001\" → \"claude-haiku-4-5\".\n * Returns the input unchanged when there is no suffix.\n *\n * ONE definition, used by BOTH lookups. F012 taught this rule to `getPrice` — the\n * internal cost path — and the exported catalogue never learned it, so for two years\n * `usage.costUsd` priced a dated id correctly while `getModelPrice` returned undefined\n * for the same string. Found by upmetrics, who use the catalogue and not our internals:\n * 19,456 calls of `claude-haiku-4-5-20251001` looked like an unknown model. Fixing the\n * instance and not the class is the shape; a copy of this regex in the other lookup\n * would have been the same mistake a third time. */\nexport function stripDatedSuffix(model: string): string {\n return model.replace(/-\\d{8}$/, \"\");\n}\n\nexport function getPrice(provider: string, model: string): PricingEntry | undefined {\n const exact = PRICING[`${provider}:${model}`];\n if (exact) return exact;\n // A real paid call must never be logged as $0 (F012).\n const base = stripDatedSuffix(model);\n if (base !== model) return PRICING[`${provider}:${base}`];\n return undefined;\n}\n"],"mappings":";AAyBA,IAAM,IAAI;AAEV,IAAM,KAAK;AAEX,IAAM,KAAK;AAIJ,IAAM,UAAwC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOnD,8BAA8B;AAAA,IAC5B,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,SAAS;AAAA,EACX;AAAA,EACA,+BAA+B;AAAA,IAC7B,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,SAAS;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,6BAA6B;AAAA,IAC3B,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,SAAS;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,8BAA8B,EAAE,YAAY,IAAI,aAAa,IAAI,gBAAgB,MAAM,iBAAiB,MAAM,SAAS,GAAG;AAAA,EAC1H,4BAA4B,EAAE,YAAY,IAAI,aAAa,IAAI,gBAAgB,GAAG,iBAAiB,MAAM,SAAS,GAAG;AAAA,EACrH,6BAA6B,EAAE,YAAY,GAAG,aAAa,IAAI,gBAAgB,KAAK,iBAAiB,GAAG,SAAS,GAAG;AAAA,EACpH,2BAA2B,EAAE,YAAY,GAAG,aAAa,IAA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Aa,MAAM,SAAS,GAAG;AAAA;AAAA,EAEvG,qCAAqC,EAAE,YAAY,KAAK,gBAAgB,MAAM,aAAa,GAAG,SAAS,GAAG;AAAA,EAC1G,mCAAmC,EAAE,YAAY,KAAK,gBAAgB,MAAM,aAAa,GAAG,SAAS,GAAG;AAAA;AAAA;AAAA,EAExG,yBAAyB,EAAE,YAAY,KAAK,gBAAgB,MAAM,aAAa,GAAG,SAAS,GAAG;AAAA,EAC9F,2BAA2B,EAAE,YAAY,MAAM,gBAAgB,OAAO,aAAa,GAAG,SAAS,GAAG;AAAA;AAAA,EAElG,gCAAgC,EAAE,YAAY,GAAK,gBAAgB,KAAK,aAAa,GAAK,SAAS,aAAa;AAClH;AAYO,SAAS,iBAAiB,OAAuB;AACtD,SAAO,MAAM,QAAQ,WAAW,EAAE;AACpC;AAEO,SAAS,SAAS,UAAkB,OAAyC;AAClF,QAAM,QAAQ,QAAQ,GAAG,QAAQ,IAAI,KAAK,EAAE;AAC5C,MAAI,MAAO,QAAO;AAElB,QAAM,OAAO,iBAAiB,KAAK;AACnC,MAAI,SAAS,MAAO,QAAO,QAAQ,GAAG,QAAQ,IAAI,IAAI,EAAE;AACxD,SAAO;AACT;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getPrice
3
- } from "./chunk-UCBMCVFU.js";
3
+ } from "./chunk-QVMGFHCF.js";
4
4
 
5
5
  // src/routing/tier-map.ts
6
6
  var DEFAULT_TIER_MAP = {
@@ -261,4 +261,4 @@ export {
261
261
  resolveModel,
262
262
  describeTier
263
263
  };
264
- //# sourceMappingURL=chunk-N3QJ7KIB.js.map
264
+ //# sourceMappingURL=chunk-VMQSIO3J.js.map
package/dist/index.d.ts CHANGED
@@ -2232,8 +2232,8 @@ declare const falStubAdapter: ProviderAdapter;
2232
2232
  * wires the live adapters. */
2233
2233
  declare const stubProviders: Record<string, ProviderAdapter>;
2234
2234
 
2235
- declare const VERSION: "0.56.0";
2236
- declare const SDK_TAG: "@broberg/ai-sdk@0.56.0";
2235
+ declare const VERSION: "0.56.1";
2236
+ declare const SDK_TAG: "@broberg/ai-sdk@0.56.1";
2237
2237
 
2238
2238
  /** Built-in defaults. Every entry is overridable via AiConfig.defaults or a
2239
2239
  * per-call override.
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  resolveModel,
11
11
  resolveTier,
12
12
  setAvailability
13
- } from "./chunk-N3QJ7KIB.js";
13
+ } from "./chunk-VMQSIO3J.js";
14
14
  import {
15
15
  DEFAULT_CLIP_SEC,
16
16
  MEDIA_PRICING,
@@ -20,11 +20,11 @@ import {
20
20
  listMediaPrices,
21
21
  pricingFreshness,
22
22
  pricingGeneratedAt
23
- } from "./chunk-JCUF333L.js";
23
+ } from "./chunk-BOZYLPIM.js";
24
24
  import {
25
25
  PRICING,
26
26
  getPrice
27
- } from "./chunk-UCBMCVFU.js";
27
+ } from "./chunk-QVMGFHCF.js";
28
28
 
29
29
  // src/cost/default-hosts.ts
30
30
  var DEFAULT_BASE_URLS = {
@@ -3548,8 +3548,8 @@ var aiConfigSchema = z.object({
3548
3548
  import { randomUUID } from "crypto";
3549
3549
 
3550
3550
  // src/version.ts
3551
- var VERSION = "0.56.0";
3552
- var SDK_TAG = "@broberg/ai-sdk@0.56.0";
3551
+ var VERSION = "0.56.1";
3552
+ var SDK_TAG = "@broberg/ai-sdk@0.56.1";
3553
3553
 
3554
3554
  // src/cost/sinks/upmetrics.ts
3555
3555
  function isRetryableStatus(status) {
@@ -3890,12 +3890,12 @@ var DEFAULT_BFL_REFERENCE_SPEC = {
3890
3890
  model: "flux-2-max",
3891
3891
  transport: "http"
3892
3892
  };
3893
- var DEFAULT_OCR_SPEC = { provider: "mistral", model: "mistral-ocr-latest", transport: "http" };
3894
- var DEFAULT_MODERATION_SPEC = { provider: "mistral", model: "mistral-moderation-latest", transport: "http" };
3895
- var DEFAULT_JUDGE_SPEC = { provider: "typesafe", model: "jev-latest", transport: "http" };
3893
+ var DEFAULT_OCR_SPEC = { provider: "mistral", model: "mistral-ocr-4-1", transport: "http" };
3894
+ var DEFAULT_MODERATION_SPEC = { provider: "mistral", model: "mistral-moderation-2603", transport: "http" };
3895
+ var DEFAULT_JUDGE_SPEC = { provider: "typesafe", model: "jev-1.13.0", transport: "http" };
3896
3896
  var DEFAULT_PODCAST_SPEC = { provider: "elevenlabs", model: "eleven_v3", transport: "http" };
3897
3897
  var DEFAULT_TTS_SPEC = { provider: "elevenlabs", model: "eleven_multilingual_v2", transport: "http" };
3898
- var DEFAULT_BATCH_SPEC = { provider: "mistral", model: "mistral-small-latest", transport: "http" };
3898
+ var DEFAULT_BATCH_SPEC = { provider: "mistral", model: "mistral-small-2603", transport: "http" };
3899
3899
  var ROUTED_SPECS = [
3900
3900
  DEFAULT_IMAGE_SPEC,
3901
3901
  DEFAULT_LORA_IMAGE_SPEC,