From b11c71259086c61e0dd02d3df90573b2a5fe95d2 Mon Sep 17 00:00:00 2001 From: Amp Date: Wed, 16 Sep 2026 11:52:11 +0000 Subject: [PATCH 1/2] fix(opencode-go): add DeepSeek V4.1 Flash metadata Amp-Thread-ID: https://ampcode.com/threads/T-01a0aa02-b6de-7763-97b8-1650ea4b46da --- packages/types/src/__tests__/opencode-go.test.ts | 2 ++ packages/types/src/providers/opencode-go.ts | 16 ++++++++++++++++ .../fetchers/__tests__/opencode-go.spec.ts | 10 ++++++++++ 3 files changed, 28 insertions(+) diff --git a/packages/types/src/__tests__/opencode-go.test.ts b/packages/types/src/__tests__/opencode-go.test.ts index 2a69eb7c00..6209c564c1 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", ] @@ -444,6 +445,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..7652e89e60 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: false, + 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..32b1cc8d19 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,15 @@ 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"]) + }) + 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) From da7e4fd651c06b23e43f38fcbfa744a67c8e5544 Mon Sep 17 00:00:00 2001 From: PierrunoYT Date: Wed, 16 Sep 2026 16:57:49 +0200 Subject: [PATCH 2/2] fix(opencode-go): enable DeepSeek Flash vision --- packages/types/src/__tests__/opencode-go.test.ts | 13 +++++++++++++ packages/types/src/providers/opencode-go.ts | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/types/src/__tests__/opencode-go.test.ts b/packages/types/src/__tests__/opencode-go.test.ts index 6209c564c1..7a253d156f 100644 --- a/packages/types/src/__tests__/opencode-go.test.ts +++ b/packages/types/src/__tests__/opencode-go.test.ts @@ -225,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: { diff --git a/packages/types/src/providers/opencode-go.ts b/packages/types/src/providers/opencode-go.ts index 7652e89e60..17120858bc 100644 --- a/packages/types/src/providers/opencode-go.ts +++ b/packages/types/src/providers/opencode-go.ts @@ -468,7 +468,7 @@ export const opencodeGoModels: Record = { "deepseek-v4.1-flash": { maxTokens: 384_000, contextWindow: 1_000_000, - supportsImages: false, + supportsImages: true, supportsPromptCache: true, supportsMaxTokens: true, supportsReasoningEffort: ["disable", "low", "medium", "high", "xhigh"],