From f6f0ab274d251c44fbd88844e1997e950ad19144 Mon Sep 17 00:00:00 2001 From: Patrick Wozniak Date: Thu, 20 Aug 2026 00:13:56 +0200 Subject: [PATCH] fix(models): refresh DeepSeek V4 pricing --- src/pricing.ts | 17 +++++++++-------- tests/fixtures/commandcode-pricing.json | 6 +++--- tests/test-pricing.ts | 14 ++++++++++---- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/pricing.ts b/src/pricing.ts index f13a69e..0dd9115 100644 --- a/src/pricing.ts +++ b/src/pricing.ts @@ -20,7 +20,7 @@ export interface TemporaryPricing { } 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 = { input: 0, @@ -61,17 +61,18 @@ export const MODEL_COSTS: Readonly> = { "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.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": { - input: 0.435, - output: 0.87, - cacheRead: 0.003625, + input: 0.66, + output: 1.98, + cacheRead: 0.022, cacheWrite: 0, }, "deepseek/deepseek-v4-flash": { - input: 0.14, - output: 0.28, - cacheRead: 0.0028, + input: 0.22, + output: 0.66, + cacheRead: 0.007, cacheWrite: 0, }, "Qwen/Qwen3.8-Max": { input: 2, output: 6, cacheRead: 0.25, cacheWrite: 2.5 }, diff --git a/tests/fixtures/commandcode-pricing.json b/tests/fixtures/commandcode-pricing.json index 786cec2..6a508fd 100644 --- a/tests/fixtures/commandcode-pricing.json +++ b/tests/fixtures/commandcode-pricing.json @@ -1,5 +1,5 @@ { - "verifiedAt": "2026-08-18", + "verifiedAt": "2026-08-20", "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.", "tiers": { @@ -25,8 +25,8 @@ "MiniMaxAI/MiniMax-M3": [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], - "deepseek/deepseek-v4-pro": [0.435, 0.87, 0.003625, 0], - "deepseek/deepseek-v4-flash": [0.14, 0.28, 0.0028, 0], + "deepseek/deepseek-v4-pro": [0.66, 1.98, 0.022, 0], + "deepseek/deepseek-v4-flash": [0.22, 0.66, 0.007, 0], "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-Plus": [0.4, 1.6, 0.08, 0.5], diff --git a/tests/test-pricing.ts b/tests/test-pricing.ts index c463fcf..6e17400 100644 --- a/tests/test-pricing.ts +++ b/tests/test-pricing.ts @@ -108,10 +108,16 @@ describe("MODEL_COSTS pricing overlay", () => { }) 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", { - input: 0.14, - output: 0.28, - cacheRead: 0.0028, + input: 0.22, + output: 0.66, + cacheRead: 0.007, cacheWrite: 0, }) assertCost("Qwen/Qwen3.7-Max", { @@ -163,7 +169,7 @@ describe("MODEL_COSTS pricing overlay", () => { it("tracks pricing provenance", () => { 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", () => {