From e9ead52a4226f456d5dada8ddcc4687d4195a477 Mon Sep 17 00:00:00 2001 From: Jefersson Lemes Date: Wed, 27 May 2026 10:20:25 -0300 Subject: [PATCH] feat(opencode-go): register 4 missing models from upstream catalog Add qwen3.7-max, mimo-v2-pro, mimo-v2-omni, hy3-preview to the opencode-go provider. Extend executor tests and model specs. - Registry now matches live https://opencode.ai/zen/go/v1/models response (16 models). Previously, four models returned by the upstream API were absent from the static registry, so requests to them failed model resolution before reaching the executor. - qwen3.7-max: inherits defaultContextLength 200000; model spec mirrors qwen3.6-plus (Bailian multimodal, thinking + tools + vision). - mimo-v2-pro: spec mirrors mimo-v2-omni (262144 ctx, 131072 maxOut, tools + vision). - mimo-v2-omni: registry entry only (spec already present upstream). - hy3-preview: registry entry only; falls back to __default__ spec. - All four route to /chat/completions (default openai format), matching the existing opencode-go executor behavior. --- open-sse/config/providerRegistry.ts | 4 ++++ src/shared/constants/modelSpecs.ts | 15 +++++++++++++++ tests/unit/opencode-executor.test.ts | 24 ++++++++++++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/open-sse/config/providerRegistry.ts b/open-sse/config/providerRegistry.ts index 02b40ebf9a..ddbbe4550b 100644 --- a/open-sse/config/providerRegistry.ts +++ b/open-sse/config/providerRegistry.ts @@ -1288,10 +1288,14 @@ export const REGISTRY: Record = { { id: "kimi-k2.5", name: "Kimi K2.5" }, { id: "mimo-v2.5-pro", name: "MiMo-V2.5-Pro" }, { id: "mimo-v2.5", name: "MiMo-V2.5" }, + { id: "mimo-v2-pro", name: "MiMo-V2-Pro" }, + { id: "mimo-v2-omni", name: "MiMo-V2-Omni" }, { id: "minimax-m2.7", name: "MiniMax M2.7", targetFormat: "claude" }, { id: "minimax-m2.5", name: "MiniMax M2.5", targetFormat: "claude" }, + { id: "qwen3.7-max", name: "Qwen3.7 Max" }, { id: "qwen3.6-plus", name: "Qwen3.6 Plus" }, { id: "qwen3.5-plus", name: "Qwen3.5 Plus" }, + { id: "hy3-preview", name: "Hunyuan3 Preview" }, { id: "deepseek-v4-pro", name: "DeepSeek V4 Pro", supportsReasoning: true }, { id: "deepseek-v4-flash", name: "DeepSeek V4 Flash", supportsReasoning: true }, ], diff --git a/src/shared/constants/modelSpecs.ts b/src/shared/constants/modelSpecs.ts index 89bed6cf96..23785f561a 100644 --- a/src/shared/constants/modelSpecs.ts +++ b/src/shared/constants/modelSpecs.ts @@ -217,6 +217,15 @@ export const MODEL_SPECS: Record = { aliases: ["kimi-k2.6-thinking", "kimi-for-coding"], }, + // ── Qwen3.7 Max (Bailian multimodal — text/image/video) ───────── + "qwen3.7-max": { + maxOutputTokens: 8192, + contextWindow: 200000, + supportsThinking: true, + supportsTools: true, + supportsVision: true, + }, + // ── Xiaomi MiMo V2.5 (1M context, consensus across 7+ sync sources) ── "mimo-v2.5-pro": { maxOutputTokens: 131072, @@ -230,6 +239,12 @@ export const MODEL_SPECS: Record = { supportsTools: true, supportsVision: true, }, + "mimo-v2-pro": { + maxOutputTokens: 131072, + contextWindow: 262144, + supportsTools: true, + supportsVision: true, + }, "mimo-v2-omni": { maxOutputTokens: 131072, contextWindow: 262144, diff --git a/tests/unit/opencode-executor.test.ts b/tests/unit/opencode-executor.test.ts index 986fc94bbe..d17243783a 100644 --- a/tests/unit/opencode-executor.test.ts +++ b/tests/unit/opencode-executor.test.ts @@ -253,6 +253,30 @@ describe("OpencodeExecutor", () => { }); assert.deepEqual(fetchCalls[0].options.headers, result.headers); }); + + it("routes opencode-go catalog-only models to chat completions", async () => { + // Register new models + registerModel("opencode-go", { id: "qwen3.7-max", name: "Qwen3.7 Max" }); + registerModel("opencode-go", { id: "mimo-v2-pro", name: "MiMo-V2-Pro" }); + registerModel("opencode-go", { id: "mimo-v2-omni", name: "MiMo-V2-Omni" }); + registerModel("opencode-go", { id: "hy3-preview", name: "Hunyuan3 Preview" }); + + // qwen3.7-max + const qwen37 = await goExecutor.execute(createInput("qwen3.7-max")); + assert.equal(qwen37.url, "https://opencode.ai/zen/go/v1/chat/completions"); + + // mimo-v2-pro + const mimoPro = await goExecutor.execute(createInput("mimo-v2-pro")); + assert.equal(mimoPro.url, "https://opencode.ai/zen/go/v1/chat/completions"); + + // mimo-v2-omni + const mimoOmni = await goExecutor.execute(createInput("mimo-v2-omni")); + assert.equal(mimoOmni.url, "https://opencode.ai/zen/go/v1/chat/completions"); + + // hy3-preview + const hy3 = await goExecutor.execute(createInput("hy3-preview")); + assert.equal(hy3.url, "https://opencode.ai/zen/go/v1/chat/completions"); + }); }); describe("user-agent forwarding", () => {