From b267241e33b6b31431dce5ec7b2da4e83da96bad Mon Sep 17 00:00:00 2001 From: Thomas Byr Date: Fri, 28 Aug 2026 16:40:49 +0200 Subject: [PATCH] feat(pricing): add display pricing for Qwen 3.8 Flash and GLM 5.3 Flash Qwen/Qwen3.8-Flash lists $0.16 input, $0.47 output, and $0.016 cache read per million tokens, and z-ai/glm-5.3-flash lists $0.15, $0.50, and $0.03; the official pricing page documents no cache-write rate for either model. --- src/pricing.ts | 2 ++ tests/fixtures/commandcode-model-ids.json | 2 ++ tests/fixtures/commandcode-pricing.json | 2 ++ tests/test-pricing.ts | 12 ++++++++++++ 4 files changed, 18 insertions(+) diff --git a/src/pricing.ts b/src/pricing.ts index fddd2a3..71ba138 100644 --- a/src/pricing.ts +++ b/src/pricing.ts @@ -54,6 +54,7 @@ export const MODEL_COSTS: Readonly> = { }, "moonshotai/Kimi-K2.6": { input: 0.95, output: 4, cacheRead: 0.16, cacheWrite: 0 }, "moonshotai/Kimi-K2.5": { input: 0.6, output: 3, cacheRead: 0.1, cacheWrite: 0 }, + "z-ai/glm-5.3-flash": { input: 0.15, output: 0.5, cacheRead: 0.03, cacheWrite: 0 }, "zai-org/GLM-5.3": { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 }, "zai-org/GLM-5.2": { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 }, "zai-org/GLM-5.2-Fast": { input: 3, output: 10.25, cacheRead: 0.5, cacheWrite: 0 }, @@ -84,6 +85,7 @@ export const MODEL_COSTS: Readonly> = { }, "Qwen/Qwen3.8-Max": { input: 2, output: 6, cacheRead: 0.25, cacheWrite: 2.5 }, "Qwen/Qwen3.8-27B": { input: 0.4, output: 3, cacheRead: 0.04, cacheWrite: 0 }, + "Qwen/Qwen3.8-Flash": { input: 0.16, output: 0.47, cacheRead: 0.016, cacheWrite: 0 }, "Qwen/Qwen3.7-Max": { input: 2.5, output: 7.5, cacheRead: 0.5, cacheWrite: 3.13 }, "Qwen/Qwen3.7-Plus": { input: 0.4, diff --git a/tests/fixtures/commandcode-model-ids.json b/tests/fixtures/commandcode-model-ids.json index 2a69168..15c677c 100644 --- a/tests/fixtures/commandcode-model-ids.json +++ b/tests/fixtures/commandcode-model-ids.json @@ -24,6 +24,7 @@ "moonshotai/Kimi-K2.7-Code-Highspeed", "moonshotai/Kimi-K2.6", "moonshotai/Kimi-K2.5", + "z-ai/glm-5.3-flash", "zai-org/GLM-5.3", "zai-org/GLM-5.2", "zai-org/GLM-5.2-Fast", @@ -36,6 +37,7 @@ "xiaomi/mimo-v2.5", "Qwen/Qwen3.8-Max", "Qwen/Qwen3.8-27B", + "Qwen/Qwen3.8-Flash", "Qwen/Qwen3.7-Max", "Qwen/Qwen3.7-Plus", "Qwen/Qwen3.7-Flash", diff --git a/tests/fixtures/commandcode-pricing.json b/tests/fixtures/commandcode-pricing.json index c65ae0c..e8a45bb 100644 --- a/tests/fixtures/commandcode-pricing.json +++ b/tests/fixtures/commandcode-pricing.json @@ -19,6 +19,7 @@ "moonshotai/Kimi-K2.7-Code-Highspeed": [1.9, 8, 0.38, 0], "moonshotai/Kimi-K2.6": [0.95, 4, 0.16, 0], "moonshotai/Kimi-K2.5": [0.6, 3, 0.1, 0], + "z-ai/glm-5.3-flash": [0.15, 0.5, 0.03, 0], "zai-org/GLM-5.3": [1.4, 4.4, 0.26, 0], "zai-org/GLM-5.2": [1.4, 4.4, 0.26, 0], "zai-org/GLM-5.2-Fast": [3, 10.25, 0.5, 0], @@ -31,6 +32,7 @@ "xiaomi/mimo-v2.5": [0.14, 0.28, 0.0028, 0], "Qwen/Qwen3.8-Max": [2, 6, 0.25, 2.5], "Qwen/Qwen3.8-27B": [0.4, 3, 0.04, 0], + "Qwen/Qwen3.8-Flash": [0.16, 0.47, 0.016, 0], "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-Flash": [0.03, 0.13, 0.006, 0.038], diff --git a/tests/test-pricing.ts b/tests/test-pricing.ts index d7141a5..1cdc3c8 100644 --- a/tests/test-pricing.ts +++ b/tests/test-pricing.ts @@ -144,6 +144,18 @@ describe("MODEL_COSTS pricing overlay", () => { cacheRead: 0.04, cacheWrite: 0, }) + assertCost("Qwen/Qwen3.8-Flash", { + input: 0.16, + output: 0.47, + cacheRead: 0.016, + cacheWrite: 0, + }) + assertCost("z-ai/glm-5.3-flash", { + input: 0.15, + output: 0.5, + cacheRead: 0.03, + cacheWrite: 0, + }) assertCost("google/gemini-3.7-flash", { input: 0.75, output: 3.75,