Merge pull request #2790 from jeferssonlemes/feat/opencode-go-missing-models

feat(opencode-go): register 4 missing models from upstream catalog
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-05-27 10:42:14 -03:00
committed by GitHub
3 changed files with 43 additions and 0 deletions

View File

@@ -1288,10 +1288,14 @@ export const REGISTRY: Record<string, RegistryEntry> = {
{ 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 },
],

View File

@@ -217,6 +217,15 @@ export const MODEL_SPECS: Record<string, ModelSpec> = {
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<string, ModelSpec> = {
supportsTools: true,
supportsVision: true,
},
"mimo-v2-pro": {
maxOutputTokens: 131072,
contextWindow: 262144,
supportsTools: true,
supportsVision: true,
},
"mimo-v2-omni": {
maxOutputTokens: 131072,
contextWindow: 262144,

View File

@@ -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", () => {