@broberg/ai-sdk 0.61.1 → 0.62.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.
- package/dist/{chunk-QVMGFHCF.js → chunk-D332SR5V.js} +72 -2
- package/dist/chunk-D332SR5V.js.map +1 -0
- package/dist/{chunk-BOZYLPIM.js → chunk-DLBOYUNF.js} +10 -10
- package/dist/chunk-DLBOYUNF.js.map +1 -0
- package/dist/{chunk-VMQSIO3J.js → chunk-KWHOVIZO.js} +39 -8
- package/dist/chunk-KWHOVIZO.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +23 -6
- package/dist/index.js.map +1 -1
- package/dist/pricing.d.ts +1 -1
- package/dist/pricing.js +2 -2
- package/dist/{registry-VqJrONWk.d.ts → registry-BEyz-O5V.d.ts} +15 -0
- package/dist/registry.d.ts +1 -1
- package/dist/registry.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-BOZYLPIM.js.map +0 -1
- package/dist/chunk-QVMGFHCF.js.map +0 -1
- package/dist/chunk-VMQSIO3J.js.map +0 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
var V = "2026-06-02";
|
|
3
3
|
var MS = "2026-06-04-mistral.ai";
|
|
4
4
|
var AN = "2026-10-08-platform.claude.com";
|
|
5
|
+
var OAI = "2026-10-11-developers.openai.com";
|
|
5
6
|
var PRICING = {
|
|
6
7
|
// Anthropic (direct API). DEFAULT_TIER_MAP: fast/cheap=haiku, smart/vision=sonnet, powerful=opus.
|
|
7
8
|
// $1.00/$5.00 — Anthropic's published Haiku 4.5 rate, confirmed against the
|
|
@@ -71,6 +72,75 @@ var PRICING = {
|
|
|
71
72
|
"openai:text-embedding-3-large": { inputPer1M: 0.13, outputPer1M: 0, version: V },
|
|
72
73
|
"openai:gpt-4o": { inputPer1M: 2.5, cacheReadPer1M: 1.25, outputPer1M: 10, version: "2026-08-27-developers.openai.com" },
|
|
73
74
|
"openai:gpt-4o-mini": { inputPer1M: 0.15, cacheReadPer1M: 0.075, outputPer1M: 0.6, version: "2026-08-27-developers.openai.com" },
|
|
75
|
+
// F022.6 — chat models offered to pickers. Official standard (non-batch, non-flex)
|
|
76
|
+
// rates from developers.openai.com/api/docs/pricing, read 2026-10-11. Long context
|
|
77
|
+
// = >272K input tokens, as the page states for every model that has one. Dated ids
|
|
78
|
+
// (gpt-5.4-mini-2026-03-17) price through stripDatedSuffix.
|
|
79
|
+
"openai:gpt-5.4-nano": { inputPer1M: 0.2, cacheReadPer1M: 0.02, outputPer1M: 1.25, version: OAI },
|
|
80
|
+
"openai:gpt-5.4-mini": { inputPer1M: 0.75, cacheReadPer1M: 0.075, outputPer1M: 4.5, version: OAI },
|
|
81
|
+
"openai:gpt-5.5": {
|
|
82
|
+
inputPer1M: 5,
|
|
83
|
+
cacheReadPer1M: 0.5,
|
|
84
|
+
outputPer1M: 30,
|
|
85
|
+
version: OAI,
|
|
86
|
+
longPrompt: { aboveTokens: 272e3, inputPer1M: 10, cacheReadPer1M: 1, outputPer1M: 45 }
|
|
87
|
+
},
|
|
88
|
+
"openai:gpt-6-luna": {
|
|
89
|
+
inputPer1M: 0.1,
|
|
90
|
+
cacheReadPer1M: 0.01,
|
|
91
|
+
cacheWritePer1M: 0.125,
|
|
92
|
+
outputPer1M: 0.5,
|
|
93
|
+
version: OAI,
|
|
94
|
+
longPrompt: { aboveTokens: 272e3, inputPer1M: 0.2, cacheReadPer1M: 0.02, cacheWritePer1M: 0.25, outputPer1M: 0.75 }
|
|
95
|
+
},
|
|
96
|
+
"openai:gpt-6-sol": {
|
|
97
|
+
inputPer1M: 2,
|
|
98
|
+
cacheReadPer1M: 0.2,
|
|
99
|
+
cacheWritePer1M: 2.5,
|
|
100
|
+
outputPer1M: 10,
|
|
101
|
+
version: OAI,
|
|
102
|
+
longPrompt: { aboveTokens: 272e3, inputPer1M: 4, cacheReadPer1M: 0.4, cacheWritePer1M: 5, outputPer1M: 15 }
|
|
103
|
+
},
|
|
104
|
+
"openai:gpt-6.1-sol": {
|
|
105
|
+
inputPer1M: 2,
|
|
106
|
+
cacheReadPer1M: 0.1,
|
|
107
|
+
cacheWritePer1M: 2.5,
|
|
108
|
+
outputPer1M: 10,
|
|
109
|
+
version: OAI,
|
|
110
|
+
longPrompt: { aboveTokens: 272e3, inputPer1M: 4, cacheReadPer1M: 0.2, cacheWritePer1M: 5, outputPer1M: 15 }
|
|
111
|
+
},
|
|
112
|
+
"openai:gpt-6-astra": {
|
|
113
|
+
inputPer1M: 10,
|
|
114
|
+
cacheReadPer1M: 1,
|
|
115
|
+
cacheWritePer1M: 12.5,
|
|
116
|
+
outputPer1M: 50,
|
|
117
|
+
version: OAI,
|
|
118
|
+
longPrompt: { aboveTokens: 272e3, inputPer1M: 20, cacheReadPer1M: 2, cacheWritePer1M: 25, outputPer1M: 75 }
|
|
119
|
+
},
|
|
120
|
+
"openai:gpt-5.6-luna": {
|
|
121
|
+
inputPer1M: 0.2,
|
|
122
|
+
cacheReadPer1M: 0.02,
|
|
123
|
+
cacheWritePer1M: 0.25,
|
|
124
|
+
outputPer1M: 1.2,
|
|
125
|
+
version: OAI,
|
|
126
|
+
longPrompt: { aboveTokens: 272e3, inputPer1M: 0.4, cacheReadPer1M: 0.04, cacheWritePer1M: 0.5, outputPer1M: 1.8 }
|
|
127
|
+
},
|
|
128
|
+
"openai:gpt-5.6-terra": {
|
|
129
|
+
inputPer1M: 2,
|
|
130
|
+
cacheReadPer1M: 0.2,
|
|
131
|
+
cacheWritePer1M: 2.5,
|
|
132
|
+
outputPer1M: 12,
|
|
133
|
+
version: OAI,
|
|
134
|
+
longPrompt: { aboveTokens: 272e3, inputPer1M: 4, cacheReadPer1M: 0.4, cacheWritePer1M: 5, outputPer1M: 18 }
|
|
135
|
+
},
|
|
136
|
+
"openai:gpt-5.6-sol": {
|
|
137
|
+
inputPer1M: 4,
|
|
138
|
+
cacheReadPer1M: 0.4,
|
|
139
|
+
cacheWritePer1M: 5,
|
|
140
|
+
outputPer1M: 20,
|
|
141
|
+
version: OAI,
|
|
142
|
+
longPrompt: { aboveTokens: 272e3, inputPer1M: 8, cacheReadPer1M: 0.8, cacheWritePer1M: 10, outputPer1M: 30 }
|
|
143
|
+
},
|
|
74
144
|
// Whisper is priced per MINUTE — see MEDIA_PRICING in ./media-pricing.ts. It used to
|
|
75
145
|
// sit here as 0/0 "so token-based compute never charges it", and inwardly that worked.
|
|
76
146
|
// Outwardly it did not: getModelPrice("whisper-1") answered `{unit:"per_1m_tokens",
|
|
@@ -201,7 +271,7 @@ var PRICING = {
|
|
|
201
271
|
"mistral:pixtral-large-latest": { inputPer1M: 2, cacheReadPer1M: 0.2, outputPer1M: 6, version: "2026-09-03" }
|
|
202
272
|
};
|
|
203
273
|
function stripDatedSuffix(model) {
|
|
204
|
-
return model.replace(
|
|
274
|
+
return model.replace(/-(\d{8}|\d{4}-\d{2}-\d{2})$/, "");
|
|
205
275
|
}
|
|
206
276
|
function getPrice(provider, model) {
|
|
207
277
|
const exact = PRICING[`${provider}:${model}`];
|
|
@@ -216,4 +286,4 @@ export {
|
|
|
216
286
|
stripDatedSuffix,
|
|
217
287
|
getPrice
|
|
218
288
|
};
|
|
219
|
-
//# sourceMappingURL=chunk-
|
|
289
|
+
//# sourceMappingURL=chunk-D332SR5V.js.map
|
|
@@ -0,0 +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. */\nconst OAI = \"2026-10-11-developers.openai.com\";\n\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 // F022.6 — chat models offered to pickers. Official standard (non-batch, non-flex)\n // rates from developers.openai.com/api/docs/pricing, read 2026-10-11. Long context\n // = >272K input tokens, as the page states for every model that has one. Dated ids\n // (gpt-5.4-mini-2026-03-17) price through stripDatedSuffix.\n \"openai:gpt-5.4-nano\": { inputPer1M: 0.2, cacheReadPer1M: 0.02, outputPer1M: 1.25, version: OAI },\n \"openai:gpt-5.4-mini\": { inputPer1M: 0.75, cacheReadPer1M: 0.075, outputPer1M: 4.5, version: OAI },\n \"openai:gpt-5.5\": {\n inputPer1M: 5, cacheReadPer1M: 0.5, outputPer1M: 30, version: OAI,\n longPrompt: { aboveTokens: 272_000, inputPer1M: 10, cacheReadPer1M: 1, outputPer1M: 45 },\n },\n \"openai:gpt-6-luna\": {\n inputPer1M: 0.1, cacheReadPer1M: 0.01, cacheWritePer1M: 0.125, outputPer1M: 0.5, version: OAI,\n longPrompt: { aboveTokens: 272_000, inputPer1M: 0.2, cacheReadPer1M: 0.02, cacheWritePer1M: 0.25, outputPer1M: 0.75 },\n },\n \"openai:gpt-6-sol\": {\n inputPer1M: 2, cacheReadPer1M: 0.2, cacheWritePer1M: 2.5, outputPer1M: 10, version: OAI,\n longPrompt: { aboveTokens: 272_000, inputPer1M: 4, cacheReadPer1M: 0.4, cacheWritePer1M: 5, outputPer1M: 15 },\n },\n \"openai:gpt-6.1-sol\": {\n inputPer1M: 2, cacheReadPer1M: 0.1, cacheWritePer1M: 2.5, outputPer1M: 10, version: OAI,\n longPrompt: { aboveTokens: 272_000, inputPer1M: 4, cacheReadPer1M: 0.2, cacheWritePer1M: 5, outputPer1M: 15 },\n },\n \"openai:gpt-6-astra\": {\n inputPer1M: 10, cacheReadPer1M: 1, cacheWritePer1M: 12.5, outputPer1M: 50, version: OAI,\n longPrompt: { aboveTokens: 272_000, inputPer1M: 20, cacheReadPer1M: 2, cacheWritePer1M: 25, outputPer1M: 75 },\n },\n \"openai:gpt-5.6-luna\": {\n inputPer1M: 0.2, cacheReadPer1M: 0.02, cacheWritePer1M: 0.25, outputPer1M: 1.2, version: OAI,\n longPrompt: { aboveTokens: 272_000, inputPer1M: 0.4, cacheReadPer1M: 0.04, cacheWritePer1M: 0.5, outputPer1M: 1.8 },\n },\n \"openai:gpt-5.6-terra\": {\n inputPer1M: 2, cacheReadPer1M: 0.2, cacheWritePer1M: 2.5, outputPer1M: 12, version: OAI,\n longPrompt: { aboveTokens: 272_000, inputPer1M: 4, cacheReadPer1M: 0.4, cacheWritePer1M: 5, outputPer1M: 18 },\n },\n \"openai:gpt-5.6-sol\": {\n inputPer1M: 4, cacheReadPer1M: 0.4, cacheWritePer1M: 5, outputPer1M: 20, version: OAI,\n longPrompt: { aboveTokens: 272_000, inputPer1M: 8, cacheReadPer1M: 0.8, cacheWritePer1M: 10, outputPer1M: 30 },\n },\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 // Anthropic dates as -YYYYMMDD; OpenAI as -YYYY-MM-DD (F022.6).\n return model.replace(/-(\\d{8}|\\d{4}-\\d{2}-\\d{2})$/, \"\");\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;AAIX,IAAM,MAAM;AAEL,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+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,EAAE,YAAY,MAAM,gBAAgB,OAAO,aAAa,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;AAEtD,SAAO,MAAM,QAAQ,+BAA+B,EAAE;AACxD;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,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PRICING,
|
|
3
3
|
stripDatedSuffix
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D332SR5V.js";
|
|
5
5
|
|
|
6
6
|
// src/cost/media-pricing.ts
|
|
7
|
-
var MEDIA_PRICING_CHECKED_AT = "2026-
|
|
7
|
+
var MEDIA_PRICING_CHECKED_AT = "2026-10-11";
|
|
8
8
|
var VEO_PER_SEC = {
|
|
9
9
|
"veo-3.1-generate-preview": { usd: 0.4, source: "ai.google.dev/gemini-api/docs/pricing \u2014 video with audio, 720p/1080p (4K = 0.60)" },
|
|
10
10
|
"veo-3.1-fast-generate-preview": { usd: 0.1, source: "ai.google.dev/gemini-api/docs/pricing \u2014 720p (1080p = 0.12, 4K = 0.30)" },
|
|
@@ -35,7 +35,7 @@ var MEDIA_PRICING = {
|
|
|
35
35
|
// `costBasis: "estimated"`. Override per call with config.pricePerImage.
|
|
36
36
|
"fal:fal-ai/flux/schnell": { unit: "per_image", usd: 3e-3, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "fal.ai pricing \u2014 estimate, billed by megapixel" },
|
|
37
37
|
"fal:fal-ai/flux/dev": { unit: "per_image", usd: 0.025, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "fal.ai pricing \u2014 estimate, billed by megapixel" },
|
|
38
|
-
"fal:fal-ai/flux-lora": { unit: "per_image", usd: 0.
|
|
38
|
+
"fal:fal-ai/flux-lora": { unit: "per_image", usd: 0.035, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "fal.ai/models/fal-ai/flux-lora \u2014 $0.035/MP (was 0.025 until 2026-10-11), billed by megapixel" },
|
|
39
39
|
"fal:fal-ai/flux-pro": { unit: "per_image", usd: 0.05, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "fal.ai pricing \u2014 estimate, billed by megapixel" },
|
|
40
40
|
"fal:fal-ai/flux-pro/v1.1": { unit: "per_image", usd: 0.04, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "fal.ai pricing \u2014 estimate, billed by megapixel" },
|
|
41
41
|
// BFL — the fallback only. BFL RETURNS the real billed cost in credits, so a
|
|
@@ -62,17 +62,17 @@ var MEDIA_PRICING = {
|
|
|
62
62
|
"openrouter:recraft/recraft-v4.1-pro-vector": { unit: "per_image", usd: 0.3, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "openrouter.ai/api/v1/models, measured 2026-09-27 \u2014 image_token 7.186e-5 x 4175; fallback when usage.cost is omitted" },
|
|
63
63
|
"openrouter:recraft/recraft-v4.1-pro": { unit: "per_image", usd: 0.21, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "openrouter.ai/api/v1/models, measured 2026-09-27 \u2014 image_token 5.030e-5 x 4175; fallback when usage.cost is omitted" },
|
|
64
64
|
// Speech OUT — billed per 1000 characters of input text.
|
|
65
|
-
"azure:tts": { unit: "per_1k_chars", usd: 0.
|
|
66
|
-
"elevenlabs:tts": { unit: "per_1k_chars", usd: 0.
|
|
65
|
+
"azure:tts": { unit: "per_1k_chars", usd: 0.015, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "prices.azure.com retail API, westeurope \u2014 S1 Neural TTS $15/1M chars (HD voices $22/1M)" },
|
|
66
|
+
"elevenlabs:tts": { unit: "per_1k_chars", usd: 0.08, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "elevenlabs.io/pricing/api \u2014 v3 Text to Speech $0.08/1k chars (the adapter uses eleven_v3)" },
|
|
67
67
|
// Translation — per 1000 characters. Free tier (":fx" key, within quota) is truly $0;
|
|
68
68
|
// this rate only bites past the Pro allowance.
|
|
69
69
|
"deepl:translate": { unit: "per_1k_chars", usd: 0.0217, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "deepl.com/pro-api \u2014 ESTIMATE, conflicting tier reports; verify before a budget decision" },
|
|
70
70
|
// Speech IN — billed per audio-minute.
|
|
71
|
-
"azure:stt": { unit: "per_min", usd:
|
|
71
|
+
"azure:stt": { unit: "per_min", usd: 6e-3, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "prices.azure.com retail API, westeurope \u2014 Fast Transcription $0.36/hour; the adapter calls transcriptions:transcribe (fast). $1/h was the real-time rate we do not use" },
|
|
72
72
|
"openai:whisper-1": { unit: "per_min", usd: 6e-3, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "openai.com/api/pricing \u2014 Whisper" },
|
|
73
|
-
"mistral:voxtral-mini-latest": { unit: "per_min", usd:
|
|
74
|
-
"mistral:voxtral-mini-2507": { unit: "per_min", usd: 2e-3, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "mistral.ai/pricing \u2014 Voxtral" },
|
|
75
|
-
"mistral:voxtral-mini-2602": { unit: "per_min", usd:
|
|
73
|
+
"mistral:voxtral-mini-latest": { unit: "per_min", usd: 3e-3, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "docs.mistral.ai/models/voxtral-mini-transcribe-26-02 \u2014 alias of voxtral-mini-2602, $0.003/min" },
|
|
74
|
+
"mistral:voxtral-mini-2507": { unit: "per_min", usd: 2e-3, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "mistral.ai/pricing \u2014 Voxtral; deprecated 2026-02-27, docs no longer show a price (NOT re-verifiable 2026-10-11)" },
|
|
75
|
+
"mistral:voxtral-mini-2602": { unit: "per_min", usd: 3e-3, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "docs.mistral.ai/models/voxtral-mini-transcribe-26-02 \u2014 $0.003/min (was 0.002 until 2026-10-11)" },
|
|
76
76
|
// OCR — per page.
|
|
77
77
|
"mistral:ocr": { unit: "per_page", usd: 4e-3, checkedAt: MEDIA_PRICING_CHECKED_AT, source: "Mistral mail 2026-09-30 (OCR 4.1): $4/1000 pages direct; $2/1000 is the Batch-API price, which ai.ocr does not use" },
|
|
78
78
|
// A flat fee per training run, not per anything produced.
|
|
@@ -325,4 +325,4 @@ export {
|
|
|
325
325
|
warnIfPricingStale,
|
|
326
326
|
resetPricingWarningForTests
|
|
327
327
|
};
|
|
328
|
-
//# sourceMappingURL=chunk-
|
|
328
|
+
//# sourceMappingURL=chunk-DLBOYUNF.js.map
|