@broberg/ai-sdk 0.78.2 → 0.78.4
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-3XKXXCSZ.js → chunk-GNT442QJ.js} +2 -2
- package/dist/{chunk-6RR4NHF2.js → chunk-JIYS3PCG.js} +2 -2
- package/dist/{chunk-XKLF7UUR.js → chunk-SXRPHH7E.js} +18 -7
- package/dist/chunk-SXRPHH7E.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/pricing.js +2 -2
- package/dist/registry.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-XKLF7UUR.js.map +0 -1
- /package/dist/{chunk-3XKXXCSZ.js.map → chunk-GNT442QJ.js.map} +0 -0
- /package/dist/{chunk-6RR4NHF2.js.map → chunk-JIYS3PCG.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PRICING,
|
|
3
3
|
stripDatedSuffix
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SXRPHH7E.js";
|
|
5
5
|
|
|
6
6
|
// src/cost/media-pricing.ts
|
|
7
7
|
var MEDIA_PRICING_CHECKED_AT = "2026-11-17";
|
|
@@ -475,4 +475,4 @@ export {
|
|
|
475
475
|
resetPricingWarningForTests,
|
|
476
476
|
cheapestModels
|
|
477
477
|
};
|
|
478
|
-
//# sourceMappingURL=chunk-
|
|
478
|
+
//# sourceMappingURL=chunk-GNT442QJ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getPrice
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SXRPHH7E.js";
|
|
4
4
|
|
|
5
5
|
// src/routing/latest.ts
|
|
6
6
|
var CHECKED = "2026-11-28";
|
|
@@ -357,4 +357,4 @@ export {
|
|
|
357
357
|
resolveModel,
|
|
358
358
|
describeTier
|
|
359
359
|
};
|
|
360
|
-
//# sourceMappingURL=chunk-
|
|
360
|
+
//# sourceMappingURL=chunk-JIYS3PCG.js.map
|
|
@@ -42,6 +42,8 @@ var PRICING = {
|
|
|
42
42
|
// from platform.claude.com/docs/en/about-claude/pricing. Cache-read is NOT 0.1x
|
|
43
43
|
// everywhere: Opus/Sonnet 5.5 are 0.05x and Fable 5.1 is 0.025x. cacheWrite is the
|
|
44
44
|
// 5-minute rate (the only one the SDK writes).
|
|
45
|
+
// F099.1 — listed by Anthropic /v1/models, was unpriced (booked $0). Provider's own figures, read 2026-11-28.
|
|
46
|
+
"anthropic:claude-fable-5-2": { inputPer1M: 8, outputPer1M: 40, cacheReadPer1M: 0.2, cacheWritePer1M: 10, version: "2026-11-28-anthropic" },
|
|
45
47
|
"anthropic:claude-fable-5-1": { inputPer1M: 10, outputPer1M: 50, cacheReadPer1M: 0.25, cacheWritePer1M: 12.5, version: AN },
|
|
46
48
|
"anthropic:claude-fable-5": { inputPer1M: 10, outputPer1M: 50, cacheReadPer1M: 1, cacheWritePer1M: 12.5, version: AN },
|
|
47
49
|
"anthropic:claude-opus-5-5": { inputPer1M: 4, outputPer1M: 20, cacheReadPer1M: 0.2, cacheWritePer1M: 5, version: AN },
|
|
@@ -158,9 +160,10 @@ var PRICING = {
|
|
|
158
160
|
"openrouter:google/gemini-2.5-flash": { inputPer1M: 0.3, outputPer1M: 2.5, version: V },
|
|
159
161
|
// Ground-truth from OpenRouter /api/v1/models, re-read 2026-10-20 (F067.7; was 0.21/0.84).
|
|
160
162
|
"openrouter:minimax/minimax-m2.7": {
|
|
161
|
-
inputPer1M: 0.
|
|
162
|
-
outputPer1M: 1.
|
|
163
|
-
version: "2026-
|
|
163
|
+
inputPer1M: 0.6,
|
|
164
|
+
outputPer1M: 1.8,
|
|
165
|
+
version: "2026-11-28-openrouter-catalogue"
|
|
166
|
+
// F099.1 — was 0.3/1.2
|
|
164
167
|
},
|
|
165
168
|
// DeepSeek V4 (CN-hosted — NOT GDPR-safe; non-personal-data workloads only).
|
|
166
169
|
// On 2026-05-22 DeepSeek made the "75% off" promo the permanent official price.
|
|
@@ -170,7 +173,8 @@ var PRICING = {
|
|
|
170
173
|
// Re-read from OpenRouter /api/v1/models 2026-10-02 (F067.5). These moved three
|
|
171
174
|
// times in a month (Sep 3: pro 1.02, Oct 1: flash 0.042, Oct 2: flash 0.028) — an
|
|
172
175
|
// OpenRouter call books usage.cost from the response anyway; this row is the fallback.
|
|
173
|
-
"openrouter:deepseek/deepseek-v4-pro": { inputPer1M: 0.
|
|
176
|
+
"openrouter:deepseek/deepseek-v4-pro": { inputPer1M: 0.39053, outputPer1M: 1.5791, version: "2026-11-28-openrouter-catalogue" },
|
|
177
|
+
// F099.1 — was 0.2088/0.4176
|
|
174
178
|
// F067.7: flash re-read 2026-10-20 — rose from 0.028/0.056.
|
|
175
179
|
"openrouter:openai/gpt-6-astra": { inputPer1M: 10, outputPer1M: 50, version: "2026-11-05-openrouter-live" },
|
|
176
180
|
"openrouter:openai/gpt-6.1-sol": { inputPer1M: 2, outputPer1M: 10, version: "2026-11-05-openrouter-live" },
|
|
@@ -180,9 +184,11 @@ var PRICING = {
|
|
|
180
184
|
"openrouter:anthropic/claude-haiku-5.5": { inputPer1M: 0.1, outputPer1M: 0.5, cacheReadPer1M: 0.01, version: "2026-11-14-openrouter-catalogue" },
|
|
181
185
|
"openrouter:anthropic/claude-sonnet-5.5": { inputPer1M: 2, outputPer1M: 10, cacheReadPer1M: 0.1, version: "2026-11-14-openrouter-catalogue" },
|
|
182
186
|
"openrouter:anthropic/claude-opus-5.5": { inputPer1M: 4, outputPer1M: 20, cacheReadPer1M: 0.2, version: "2026-11-14-openrouter-catalogue" },
|
|
183
|
-
"openrouter:deepseek/deepseek-v4-flash-0731": { inputPer1M: 0.
|
|
187
|
+
"openrouter:deepseek/deepseek-v4-flash-0731": { inputPer1M: 0.0456, outputPer1M: 0.3, cacheReadPer1M: 0.035, version: "2026-11-28-openrouter-catalogue" },
|
|
188
|
+
// F099.1 — input was 0.0434
|
|
184
189
|
"openrouter:deepseek/deepseek-v4.1-flash-1017": { inputPer1M: 0.15, outputPer1M: 0.6, version: "2026-11-05-openrouter-live" },
|
|
185
|
-
"openrouter:deepseek/deepseek-v4-flash": { inputPer1M: 0.
|
|
190
|
+
"openrouter:deepseek/deepseek-v4-flash": { inputPer1M: 0.09, outputPer1M: 0.18, version: "2026-11-28-openrouter-catalogue" },
|
|
191
|
+
// F099.1 — was 0.091/0.182
|
|
186
192
|
// DeepSeek DIRECT API (provider "deepseek", F030 non-PII secondary). Rates from
|
|
187
193
|
// api-docs.deepseek.com 2026-06-30 ($0.14/$0.28 per 1M; both map to deepseek-v4-flash).
|
|
188
194
|
// `deepseek-chat` (non-thinking) + `deepseek-reasoner` (thinking) DEPRECATE 2026-07-24.
|
|
@@ -295,6 +301,11 @@ var PRICING = {
|
|
|
295
301
|
// Embeddings (F016.5) — per input token.
|
|
296
302
|
"mistral:mistral-embed": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0, version: MS },
|
|
297
303
|
"mistral:codestral-embed": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0, version: MS },
|
|
304
|
+
// F099.1 — measured 2026-11-28 against Mistral's own /v1/models for our key: devstral-latest,
|
|
305
|
+
// open-mistral-nemo, mistral-moderation-latest and pixtral-large-latest are no longer listed
|
|
306
|
+
// (moderation: use mistral-moderation-2603). The rows STAY priced on purpose — a call to a
|
|
307
|
+
// retired id fails, but a stored usage record or a stale caller must not book $0. The pricing
|
|
308
|
+
// API already marks them upstream:"gone" and hides them by default.
|
|
298
309
|
// F048 — reported by upmetrics as an unknown model (6 calls). Official mistral.ai/pricing.
|
|
299
310
|
"mistral:pixtral-large-latest": { inputPer1M: 2, cacheReadPer1M: 0.2, outputPer1M: 6, version: "2026-09-03" }
|
|
300
311
|
};
|
|
@@ -314,4 +325,4 @@ export {
|
|
|
314
325
|
stripDatedSuffix,
|
|
315
326
|
getPrice
|
|
316
327
|
};
|
|
317
|
-
//# sourceMappingURL=chunk-
|
|
328
|
+
//# sourceMappingURL=chunk-SXRPHH7E.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 // F099.1 — listed by Anthropic /v1/models, was unpriced (booked $0). Provider's own figures, read 2026-11-28.\n \"anthropic:claude-fable-5-2\": { inputPer1M: 8, outputPer1M: 40, cacheReadPer1M: 0.2, cacheWritePer1M: 10, version: \"2026-11-28-anthropic\" },\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-20 (F067.7; was 0.21/0.84).\n \"openrouter:minimax/minimax-m2.7\": {\n inputPer1M: 0.6,\n outputPer1M: 1.8,\n version: \"2026-11-28-openrouter-catalogue\", // F099.1 — was 0.3/1.2\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.39053, outputPer1M: 1.5791, version: \"2026-11-28-openrouter-catalogue\" }, // F099.1 — was 0.2088/0.4176\n // F067.7: flash re-read 2026-10-20 — rose from 0.028/0.056.\n \"openrouter:openai/gpt-6-astra\": { inputPer1M: 10, outputPer1M: 50, version: \"2026-11-05-openrouter-live\" },\n \"openrouter:openai/gpt-6.1-sol\": { inputPer1M: 2, outputPer1M: 10, version: \"2026-11-05-openrouter-live\" },\n // F097 — EU-served DeepSeek (OpenRouter catalogue via inventory 2026-11-14); calls book OpenRouter's reported usage.cost anyway.\n // F097 — Claude 5.5 via OpenRouter EU (backs claude-*-latest). OpenRouter catalogue via\n // inventory 2026-11-14 = Anthropic list price; calls book OpenRouter's reported usage.cost.\n \"openrouter:anthropic/claude-haiku-5.5\": { inputPer1M: 0.1, outputPer1M: 0.5, cacheReadPer1M: 0.01, version: \"2026-11-14-openrouter-catalogue\" },\n \"openrouter:anthropic/claude-sonnet-5.5\": { inputPer1M: 2, outputPer1M: 10, cacheReadPer1M: 0.1, version: \"2026-11-14-openrouter-catalogue\" },\n \"openrouter:anthropic/claude-opus-5.5\": { inputPer1M: 4, outputPer1M: 20, cacheReadPer1M: 0.2, version: \"2026-11-14-openrouter-catalogue\" },\n \"openrouter:deepseek/deepseek-v4-flash-0731\": { inputPer1M: 0.0456, outputPer1M: 0.3, cacheReadPer1M: 0.035, version: \"2026-11-28-openrouter-catalogue\" }, // F099.1 — input was 0.0434\n \"openrouter:deepseek/deepseek-v4.1-flash-1017\": { inputPer1M: 0.15, outputPer1M: 0.6, version: \"2026-11-05-openrouter-live\" },\n \"openrouter:deepseek/deepseek-v4-flash\": { inputPer1M: 0.09, outputPer1M: 0.18, version: \"2026-11-28-openrouter-catalogue\" }, // F099.1 — was 0.091/0.182\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 // F081 — Microsoft-Decision-1, Azure retail prices API (prices.azure.com, read\n // 2026-10-26): ONE meter, \"Microsoft Decision 1 1M Tokens\" = $0.042, effective\n // 2026-10-01, same in swedencentral as everywhere. A single meter does not say output\n // is free, so output is priced at the same rate — at ~3 output tokens per call that\n // over-counts by a rounding error rather than risking an under-count.\n \"microsoft-decision:microsoft-decision-1-v1\": { inputPer1M: 0.042, outputPer1M: 0.042, version: \"2026-10-26-azure-retail\" },\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 // F088 — measured 2026-11-05: reachable with our GEMINI_API_KEY; price = OpenRouter's\n // live google/gemini-4-argon row (passes Google's list price through).\n \"gemini:gemini-4-argon\": { inputPer1M: 2, outputPer1M: 10, version: \"2026-11-05-openrouter-live\" },\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 // F085.1 — Mistral News 29/10 2026 («Le Chonk»): \"Starting today, Mistral Large 4 is priced at\n // $0.70 input / M, $0.07 cached input / M, and $2.10 output / M tokens.\" Was 1.36/4.18 (8/10).\n \"mistral:mistral-large-4\": { inputPer1M: 0.7, cacheReadPer1M: 0.07, outputPer1M: 2.1, version: \"2026-10-29-mistral-news-mail\" },\n \"mistral:mistral-large-4-0\": { inputPer1M: 0.7, cacheReadPer1M: 0.07, outputPer1M: 2.1, version: \"2026-10-29-mistral-news-mail\" },\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 // F085.4 — Z.ai GLM 5.3 served by Mistral. Mistral deprecation mail 2026-10-30: \"$1.4 per 1M\n // input tokens, $0.14 per 1M cached input tokens, and $4.4 per 1M output tokens\". Aliases per\n // /v1/models (measured 30/10): zai-glm-5, zai-glm-latest → zai-glm-5-3.\n \"mistral:zai-glm-5-3\": { inputPer1M: 1.4, cacheReadPer1M: 0.14, outputPer1M: 4.4, version: \"2026-10-30-mistral-deprecation-mail\" },\n \"mistral:zai-glm-5\": { inputPer1M: 1.4, cacheReadPer1M: 0.14, outputPer1M: 4.4, version: \"2026-10-30-mistral-deprecation-mail\" },\n \"mistral:zai-glm-latest\": { inputPer1M: 1.4, cacheReadPer1M: 0.14, outputPer1M: 4.4, version: \"2026-10-30-mistral-deprecation-mail\" },\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 // F099.1 — measured 2026-11-28 against Mistral's own /v1/models for our key: devstral-latest,\n // open-mistral-nemo, mistral-moderation-latest and pixtral-large-latest are no longer listed\n // (moderation: use mistral-moderation-2603). The rows STAY priced on purpose — a call to a\n // retired id fails, but a stored usage record or a stale caller must not book $0. The pricing\n // API already marks them upstream:\"gone\" and hides them by default.\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+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;AAAA,EAOA,8BAA8B,EAAE,YAAY,GAAG,aAAa,IAAI,gBAAgB,KAAK,iBAAiB,IAAI,SAAS,uBAAuB;AAAA,EAC1I,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,IAAI,gBAAgB,KAAK,iBAAiB,MAAM,SAAS,GAAG;AAAA,EACrH,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|
|
|
1596
1596
|
* wires the live adapters. */
|
|
1597
1597
|
declare const stubProviders: Record<string, ProviderAdapter>;
|
|
1598
1598
|
|
|
1599
|
-
declare const VERSION: "0.78.
|
|
1600
|
-
declare const SDK_TAG: "@broberg/ai-sdk@0.78.
|
|
1599
|
+
declare const VERSION: "0.78.4";
|
|
1600
|
+
declare const SDK_TAG: "@broberg/ai-sdk@0.78.4";
|
|
1601
1601
|
|
|
1602
1602
|
/** Built-in defaults. Every entry is overridable via AiConfig.defaults or a
|
|
1603
1603
|
* per-call override.
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
resolveModel,
|
|
16
16
|
resolveTier,
|
|
17
17
|
setAvailability
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JIYS3PCG.js";
|
|
19
19
|
import {
|
|
20
20
|
DEFAULT_CLIP_SEC,
|
|
21
21
|
MEDIA_PRICING,
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
listMediaPrices,
|
|
28
28
|
pricingFreshness,
|
|
29
29
|
pricingGeneratedAt
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-GNT442QJ.js";
|
|
31
31
|
import {
|
|
32
32
|
PRICING,
|
|
33
33
|
getPrice
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-SXRPHH7E.js";
|
|
35
35
|
|
|
36
36
|
// src/search/brave.ts
|
|
37
37
|
async function braveSearch(req, apiKey, f) {
|
|
@@ -4592,8 +4592,8 @@ var aiConfigSchema = z.object({
|
|
|
4592
4592
|
import { randomUUID } from "crypto";
|
|
4593
4593
|
|
|
4594
4594
|
// src/version.ts
|
|
4595
|
-
var VERSION = "0.78.
|
|
4596
|
-
var SDK_TAG = "@broberg/ai-sdk@0.78.
|
|
4595
|
+
var VERSION = "0.78.4";
|
|
4596
|
+
var SDK_TAG = "@broberg/ai-sdk@0.78.4";
|
|
4597
4597
|
|
|
4598
4598
|
// src/cost/sinks/upmetrics.ts
|
|
4599
4599
|
function isRetryableStatus(status) {
|