From 42171bf16e18078a794476af76f8b10235d10222 Mon Sep 17 00:00:00 2001 From: Tommy Liu Date: Mon, 17 Aug 2026 17:27:17 -0400 Subject: [PATCH] fix(catalog): add deepseek-v4-pro-0813 discovery limits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alibaba Token Plan advertises both dated DeepSeek V4 snapshots, but only deepseek-v4-flash-0731 had an entry in ALIBABA_TOKEN_PLAN_DISCOVERED_MODEL_LIMITS. deepseek-v4-pro-0813 is not in ALIBABA_TOKEN_PLAN_STATIC_MODELS either (only the undated deepseek-v4-pro is), so it fell through to `contextWindow: null` / `maxTokens: null` — the #7486 symptom, still live for this one id. Reasoning already worked: the `normalizedId.startsWith("deepseek-v4")` branch gives it reasoning: true and the high/max effort ladder. Only the limits were missing, so this is a one-entry fix at 1M context / 384K output, matching both deepseek-v4-pro and deepseek-v4-flash-0731. Extends the existing discovery test to advertise the id and assert its limits and thinking config. Verified the test fails without the source change (contextWindow/maxTokens come back null) and passes with it. Refs #8847 --- packages/catalog/CHANGELOG.md | 4 ++++ packages/catalog/src/provider-models/openai-compat.ts | 4 ++++ packages/catalog/test/alibaba-token-plan.test.ts | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/catalog/CHANGELOG.md b/packages/catalog/CHANGELOG.md index 288b1940c..329e47a30 100644 --- a/packages/catalog/CHANGELOG.md +++ b/packages/catalog/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Fixed + +- Fixed `deepseek-v4-pro-0813` surfacing from Alibaba Token Plan discovery with `contextWindow`/`maxTokens` of `null`. The dated DeepSeek V4 Pro snapshot was missing from `ALIBABA_TOKEN_PLAN_DISCOVERED_MODEL_LIMITS`, so unlike its `deepseek-v4-flash-0731` sibling it fell through to unknown limits ([#8847](https://github.com/can1357/oh-my-pi/issues/8847)). + ## [17.3.6] - 2026-08-17 ### Changed diff --git a/packages/catalog/src/provider-models/openai-compat.ts b/packages/catalog/src/provider-models/openai-compat.ts index 8ade9a049..13656c3b6 100644 --- a/packages/catalog/src/provider-models/openai-compat.ts +++ b/packages/catalog/src/provider-models/openai-compat.ts @@ -2980,6 +2980,10 @@ export const ALIBABA_TOKEN_PLAN_DISCOVERED_MODEL_LIMITS: Readonly { }, { id: "deepseek-v4-flash", owned_by: "qwencloud" }, { id: "deepseek-v4-flash-0731", owned_by: "qwencloud" }, + { id: "deepseek-v4-pro-0813", owned_by: "qwencloud" }, { id: "kimi-k2.7-code", owned_by: "qwencloud" }, { id: "MiniMax-M2.5", owned_by: "qwencloud" }, { id: "qwen3.6-plus", owned_by: "qwencloud" }, @@ -106,6 +107,7 @@ describe("QwenCloud Token Plan provider", () => { "deepseek-v3.2", "deepseek-v4-flash", "deepseek-v4-flash-0731", + "deepseek-v4-pro-0813", "future-chat-model", "glm-5", "glm-5.1", @@ -122,6 +124,7 @@ describe("QwenCloud Token Plan provider", () => { ["qwen3.8-max", 1_000_000, 131_072], ["deepseek-v4-flash", 1_000_000, 384_000], ["deepseek-v4-flash-0731", 1_000_000, 384_000], + ["deepseek-v4-pro-0813", 1_000_000, 384_000], ["deepseek-v3.2", 131_072, 65_536], ["glm-5.1", 202_752, 128_000], ["glm-5", 202_752, 16_384], @@ -133,7 +136,7 @@ describe("QwenCloud Token Plan provider", () => { for (const [id, contextWindow, maxTokens] of expectedLimits) { expect(models?.find(model => model.id === id)).toMatchObject({ contextWindow, maxTokens }); } - for (const id of ["deepseek-v4-flash", "deepseek-v4-flash-0731"]) { + for (const id of ["deepseek-v4-flash", "deepseek-v4-flash-0731", "deepseek-v4-pro-0813"]) { expect(models?.find(model => model.id === id)).toMatchObject({ reasoning: true, thinking: {