Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions packages/types/src/__tests__/opencode-go.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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)
})
})

Expand Down
16 changes: 16 additions & 0 deletions packages/types/src/providers/opencode-go.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,22 @@ export const opencodeGoModels: Record<string, ModelInfo> = {
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,
Expand Down
10 changes: 10 additions & 0 deletions src/api/providers/fetchers/__tests__/opencode-go.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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)
Expand Down
Loading