diff --git a/packages/types/src/__tests__/opencode-go.test.ts b/packages/types/src/__tests__/opencode-go.test.ts index 2a69eb7c00..7a253d156f 100644 --- a/packages/types/src/__tests__/opencode-go.test.ts +++ b/packages/types/src/__tests__/opencode-go.test.ts @@ -33,6 +33,7 @@ describe("opencode-go registry", () => { "mimo-v2.5-pro", "deepseek-v4-pro", "deepseek-v4-flash", + "deepseek-v4.1-flash", "omen-alpha", "grok-4.5", ] @@ -224,6 +225,19 @@ describe("opencode-go registry", () => { cacheReadsPrice: 0.19, }, }, + { + id: "deepseek-v4.1-flash", + expected: { + maxTokens: 384_000, + contextWindow: 1_000_000, + supportsImages: true, + supportsPromptCache: true, + supportsMaxTokens: true, + inputPrice: 0.3, + outputPrice: 1.2, + cacheReadsPrice: 0.006, + }, + }, { id: "longcat-2.0", expected: { @@ -444,6 +458,7 @@ describe("opencode-go registry", () => { it("DeepSeek entries expose supportsMaxTokens so the max-output slider is available", () => { expect(getOpencodeGoModelInfo("deepseek-v4-pro")?.supportsMaxTokens).toBe(true) expect(getOpencodeGoModelInfo("deepseek-v4-flash")?.supportsMaxTokens).toBe(true) + expect(getOpencodeGoModelInfo("deepseek-v4.1-flash")?.supportsMaxTokens).toBe(true) }) }) diff --git a/packages/types/src/providers/opencode-go.ts b/packages/types/src/providers/opencode-go.ts index b31db1bd99..17120858bc 100644 --- a/packages/types/src/providers/opencode-go.ts +++ b/packages/types/src/providers/opencode-go.ts @@ -465,6 +465,22 @@ export const opencodeGoModels: Record = { description: "DeepSeek-V4-Flash is DeepSeek's fast, cost-efficient V4 model supporting thinking and non-thinking modes. Available via the Opencode Go plan.", }, + "deepseek-v4.1-flash": { + maxTokens: 384_000, + contextWindow: 1_000_000, + supportsImages: true, + supportsPromptCache: true, + supportsMaxTokens: true, + supportsReasoningEffort: ["disable", "low", "medium", "high", "xhigh"], + preserveReasoning: true, + reasoningEffort: "high", + // Go has weekday peak/off-peak pricing; use peak rates until ModelInfo can express schedules. + inputPrice: 0.3, + outputPrice: 1.2, + cacheReadsPrice: 0.006, + description: + "DeepSeek V4.1 Flash is a fast, cost-efficient reasoning model with a 1M context window. Available via the Opencode Go plan.", + }, "deepseek-v4-flash-vision-exp": { maxTokens: 384_000, contextWindow: 1_000_000, diff --git a/src/api/providers/fetchers/__tests__/opencode-go.spec.ts b/src/api/providers/fetchers/__tests__/opencode-go.spec.ts index 6b5b9ba37a..07147734b0 100644 --- a/src/api/providers/fetchers/__tests__/opencode-go.spec.ts +++ b/src/api/providers/fetchers/__tests__/opencode-go.spec.ts @@ -170,6 +170,7 @@ describe("Opencode Go Fetchers", () => { "glm-5", "deepseek-v4-pro", "deepseek-v4-flash", + "deepseek-v4.1-flash", "deepseek-v4-flash-vision-exp", "qwen3.7-max", "qwen3.8-max", @@ -230,6 +231,19 @@ describe("Opencode Go Fetchers", () => { expect(info.supportsReasoningEffort).toEqual(["disable", "low", "medium", "high", "xhigh"]) }) + it("resolves DeepSeek V4.1 Flash to its 1M context when live metadata is absent", () => { + const info = parseOpencodeGoModel({ id: "deepseek-v4.1-flash" }) + expect(info.contextWindow).toBe(1_000_000) + expect(info.maxTokens).toBe(384_000) + expect(info.supportsPromptCache).toBe(true) + expect(info.supportsMaxTokens).toBe(true) + expect(info.supportsReasoningEffort).toEqual(["disable", "low", "medium", "high", "xhigh"]) + expect(info.supportsImages).toBe(true) + expect(info.inputPrice).toBe(0.3) + expect(info.outputPrice).toBe(1.2) + expect(info.cacheReadsPrice).toBe(0.006) + }) + it("resolves GLM-5.2 with its 1M context and High/Max reasoning effort", () => { const info = parseOpencodeGoModel({ id: "glm-5.2" }) expect(info.contextWindow).toBe(1_000_000)