fix(models): refresh DeepSeek V4 pricing

This commit is contained in:
Patrick Wozniak
2026-08-20 00:13:56 +02:00
parent ed29c59f31
commit f6f0ab274d
3 changed files with 22 additions and 15 deletions
+9 -8
View File
@@ -20,7 +20,7 @@ export interface TemporaryPricing {
} }
export const PRICING_SOURCE_URL = "https://commandcode.ai/docs/resources/pricing-limits" export const PRICING_SOURCE_URL = "https://commandcode.ai/docs/resources/pricing-limits"
export const PRICING_LAST_VERIFIED = "2026-08-18" export const PRICING_LAST_VERIFIED = "2026-08-20"
export const ZERO_MODEL_COST: CommandCodeModelCost = { export const ZERO_MODEL_COST: CommandCodeModelCost = {
input: 0, input: 0,
@@ -61,17 +61,18 @@ export const MODEL_COSTS: Readonly<Record<string, CommandCodeModelCost>> = {
"MiniMaxAI/MiniMax-M3": { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, "MiniMaxAI/MiniMax-M3": { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 },
"MiniMaxAI/MiniMax-M2.7": { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 }, "MiniMaxAI/MiniMax-M2.7": { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 },
"MiniMaxAI/MiniMax-M2.5": { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0 }, "MiniMaxAI/MiniMax-M2.5": { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0 },
// Permanent 75% discount. // DeepSeek V4 uses time-dependent rates. Display the documented off-peak
// rates, which apply for 17 hours per day; the Usage page remains authoritative.
"deepseek/deepseek-v4-pro": { "deepseek/deepseek-v4-pro": {
input: 0.435, input: 0.66,
output: 0.87, output: 1.98,
cacheRead: 0.003625, cacheRead: 0.022,
cacheWrite: 0, cacheWrite: 0,
}, },
"deepseek/deepseek-v4-flash": { "deepseek/deepseek-v4-flash": {
input: 0.14, input: 0.22,
output: 0.28, output: 0.66,
cacheRead: 0.0028, cacheRead: 0.007,
cacheWrite: 0, cacheWrite: 0,
}, },
"Qwen/Qwen3.8-Max": { input: 2, output: 6, cacheRead: 0.25, cacheWrite: 2.5 }, "Qwen/Qwen3.8-Max": { input: 2, output: 6, cacheRead: 0.25, cacheWrite: 2.5 },
+3 -3
View File
@@ -1,5 +1,5 @@
{ {
"verifiedAt": "2026-08-18", "verifiedAt": "2026-08-20",
"source": "https://commandcode.ai/docs/resources/pricing-limits", "source": "https://commandcode.ai/docs/resources/pricing-limits",
"tierPolicy": "Use request-wide input tiers; the highest threshold exceeded by input plus cache tokens applies to the full request.", "tierPolicy": "Use request-wide input tiers; the highest threshold exceeded by input plus cache tokens applies to the full request.",
"tiers": { "tiers": {
@@ -25,8 +25,8 @@
"MiniMaxAI/MiniMax-M3": [0.3, 1.2, 0.06, 0], "MiniMaxAI/MiniMax-M3": [0.3, 1.2, 0.06, 0],
"MiniMaxAI/MiniMax-M2.7": [0.3, 1.2, 0.06, 0], "MiniMaxAI/MiniMax-M2.7": [0.3, 1.2, 0.06, 0],
"MiniMaxAI/MiniMax-M2.5": [0.3, 1.2, 0.03, 0], "MiniMaxAI/MiniMax-M2.5": [0.3, 1.2, 0.03, 0],
"deepseek/deepseek-v4-pro": [0.435, 0.87, 0.003625, 0], "deepseek/deepseek-v4-pro": [0.66, 1.98, 0.022, 0],
"deepseek/deepseek-v4-flash": [0.14, 0.28, 0.0028, 0], "deepseek/deepseek-v4-flash": [0.22, 0.66, 0.007, 0],
"Qwen/Qwen3.8-Max": [2, 6, 0.25, 2.5], "Qwen/Qwen3.8-Max": [2, 6, 0.25, 2.5],
"Qwen/Qwen3.7-Max": [2.5, 7.5, 0.5, 3.13], "Qwen/Qwen3.7-Max": [2.5, 7.5, 0.5, 3.13],
"Qwen/Qwen3.7-Plus": [0.4, 1.6, 0.08, 0.5], "Qwen/Qwen3.7-Plus": [0.4, 1.6, 0.08, 0.5],
+10 -4
View File
@@ -108,10 +108,16 @@ describe("MODEL_COSTS pricing overlay", () => {
}) })
it("matches corrected official rates", () => { it("matches corrected official rates", () => {
assertCost("deepseek/deepseek-v4-pro", {
input: 0.66,
output: 1.98,
cacheRead: 0.022,
cacheWrite: 0,
})
assertCost("deepseek/deepseek-v4-flash", { assertCost("deepseek/deepseek-v4-flash", {
input: 0.14, input: 0.22,
output: 0.28, output: 0.66,
cacheRead: 0.0028, cacheRead: 0.007,
cacheWrite: 0, cacheWrite: 0,
}) })
assertCost("Qwen/Qwen3.7-Max", { assertCost("Qwen/Qwen3.7-Max", {
@@ -163,7 +169,7 @@ describe("MODEL_COSTS pricing overlay", () => {
it("tracks pricing provenance", () => { it("tracks pricing provenance", () => {
assert.equal(PRICING_SOURCE_URL, "https://commandcode.ai/docs/resources/pricing-limits") assert.equal(PRICING_SOURCE_URL, "https://commandcode.ai/docs/resources/pricing-limits")
assert.equal(PRICING_LAST_VERIFIED, "2026-08-18") assert.equal(PRICING_LAST_VERIFIED, "2026-08-20")
}) })
it("fails once temporary pricing needs review", () => { it("fails once temporary pricing needs review", () => {