@broberg/ai-sdk 0.55.0 → 0.55.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,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
|
|
@@ -484,4 +507,4 @@ export {
|
|
|
484
507
|
warnIfPricingStale,
|
|
485
508
|
resetPricingWarningForTests
|
|
486
509
|
};
|
|
487
|
-
//# sourceMappingURL=chunk-
|
|
510
|
+
//# sourceMappingURL=chunk-ZVKHZ4GJ.js.map
|