@broberg/ai-sdk 0.55.0 → 0.55.2

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,6 +1,7 @@
1
1
  // src/cost/pricing.ts
2
2
  var V = "2026-06-02";
3
3
  var MS = "2026-06-04-mistral.ai";
4
+ var AN = "2026-10-08-platform.claude.com";
4
5
  var PRICING = {
5
6
  // Anthropic (direct API). DEFAULT_TIER_MAP: fast/cheap=haiku, smart/vision=sonnet, powerful=opus.
6
7
  // $1.00/$5.00 — Anthropic's published Haiku 4.5 rate, confirmed against the
@@ -36,6 +37,28 @@ var PRICING = {
36
37
  cacheWritePer1M: 6.25,
37
38
  version: "2026-09-03"
38
39
  },
40
+ // F075 — the rest of what Anthropic's /v1/models lists for our key, read 2026-10-08
41
+ // from platform.claude.com/docs/en/about-claude/pricing. Cache-read is NOT 0.1x
42
+ // everywhere: Opus/Sonnet 5.5 are 0.05x and Fable 5.1 is 0.025x. cacheWrite is the
43
+ // 5-minute rate (the only one the SDK writes).
44
+ "anthropic:claude-fable-5-1": { inputPer1M: 10, outputPer1M: 50, cacheReadPer1M: 0.25, cacheWritePer1M: 12.5, version: AN },
45
+ "anthropic:claude-fable-5": { inputPer1M: 10, outputPer1M: 50, cacheReadPer1M: 1, cacheWritePer1M: 12.5, version: AN },
46
+ "anthropic:claude-opus-5-5": { inputPer1M: 4, outputPer1M: 20, cacheReadPer1M: 0.2, cacheWritePer1M: 5, version: AN },
47
+ "anthropic:claude-opus-5": { inputPer1M: 5, outputPer1M: 25, cacheReadPer1M: 0.5, cacheWritePer1M: 6.25, version: AN },
48
+ "anthropic:claude-opus-4-7": { inputPer1M: 5, outputPer1M: 25, cacheReadPer1M: 0.5, cacheWritePer1M: 6.25, version: AN },
49
+ "anthropic:claude-opus-4-6": { inputPer1M: 5, outputPer1M: 25, cacheReadPer1M: 0.5, cacheWritePer1M: 6.25, version: AN },
50
+ "anthropic:claude-opus-4-5": { inputPer1M: 5, outputPer1M: 25, cacheReadPer1M: 0.5, cacheWritePer1M: 6.25, version: AN },
51
+ "anthropic:claude-sonnet-5-5": { inputPer1M: 2, outputPer1M: 10, cacheReadPer1M: 0.1, cacheWritePer1M: 2.5, version: AN },
52
+ "anthropic:claude-sonnet-5": { inputPer1M: 2, outputPer1M: 10, cacheReadPer1M: 0.2, cacheWritePer1M: 2.5, version: AN },
53
+ "anthropic:claude-sonnet-4-5": { inputPer1M: 3, outputPer1M: 15, cacheReadPer1M: 0.3, cacheWritePer1M: 3.75, version: AN },
54
+ "anthropic:claude-haiku-5-5": {
55
+ inputPer1M: 0.1,
56
+ outputPer1M: 0.5,
57
+ cacheReadPer1M: 0.01,
58
+ cacheWritePer1M: 0.125,
59
+ version: AN,
60
+ longPrompt: { aboveTokens: 1e5, inputPer1M: 0.5, outputPer1M: 2.5, cacheReadPer1M: 0.05, cacheWritePer1M: 0.625 }
61
+ },
39
62
  // OpenAI. embedding default tier = text-embedding-3-small (no output tokens).
40
63
  // Cached input is 50% of the input rate — $1.25 vs $2.50 (gpt-4o) and $0.075 vs
41
64
  // $0.15 (gpt-4o-mini), read from developers.openai.com/api/docs/pricing on
@@ -131,8 +154,12 @@ var PRICING = {
131
154
  "mistral:mistral-medium-latest": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: MS },
132
155
  "mistral:mistral-medium-3.5": { inputPer1M: 1.5, cacheReadPer1M: 0.15, outputPer1M: 7.5, version: MS },
133
156
  "mistral:mistral-medium-3": { inputPer1M: 0.4, cacheReadPer1M: 0.04, outputPer1M: 2, version: "2026-06-04-or-xref" },
134
- "mistral:mistral-small-latest": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.3, version: MS },
135
- "mistral:mistral-small-2603": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.3, version: MS },
157
+ // F076.1 — Small 4 (2603) is $0.15/$0.60, measured 2026-10-08 on
158
+ // docs.mistral.ai/models/mistral-small-4-0-26-03 AND OpenRouter's mistral-small-2603.
159
+ // This row said $0.10/$0.30 (Small 3's price, carried over when -latest moved to
160
+ // 2603), so the fleet's fast/cheap tiers were booked at about half their cost.
161
+ "mistral:mistral-small-latest": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.6, version: "2026-10-08-docs.mistral.ai" },
162
+ "mistral:mistral-small-2603": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.6, version: "2026-10-08-docs.mistral.ai" },
136
163
  "mistral:ministral-3b-latest": { inputPer1M: 0.1, cacheReadPer1M: 0.01, outputPer1M: 0.1, version: MS },
137
164
  "mistral:ministral-8b-latest": { inputPer1M: 0.15, cacheReadPer1M: 0.015, outputPer1M: 0.15, version: MS },
138
165
  "mistral:ministral-14b-latest": { inputPer1M: 0.2, cacheReadPer1M: 0.02, outputPer1M: 0.2, version: MS },
@@ -484,4 +511,4 @@ export {
484
511
  warnIfPricingStale,
485
512
  resetPricingWarningForTests
486
513
  };
487
- //# sourceMappingURL=chunk-DFTCHTLQ.js.map
514
+ //# sourceMappingURL=chunk-L62RFOK6.js.map