Repository navigation
feat(opencode-go): register 6 missing models from upstream catalog - #1510
Conversation
Add glm-5.1, kimi-k2.6, mimo-v2-pro, mimo-v2-omni, qwen3.6-plus, qwen3.5-plus to opencode-go provider. Extend executor tests with new model routing cases. - glm-5.1: contextLength 204800 (Z.AI official) - remaining 5 models: inherit defaultContextLength 200000 - MiniMax models preserve targetFormat:claude routing - All 6 new models route to /chat/completions (default openai format)
There was a problem hiding this comment.
Code Review
This pull request adds several new models to the provider registry, including GLM-5.1, Kimi K2.6, MiMo V2, and Qwen 3.x variants, along with corresponding unit tests. Feedback suggests increasing the context lengths for the MiMo and Qwen models to align with higher-tier limits. Additionally, the manual model registration in the unit tests should be removed as it is redundant and bypasses the actual registry configuration.
| { id: "mimo-v2-pro", name: "MiMo V2 Pro" }, | ||
| { id: "mimo-v2-omni", name: "MiMo V2 Omni" }, | ||
| { id: "qwen3.6-plus", name: "Qwen 3.6 Plus" }, |
There was a problem hiding this comment.
The context lengths for mimo-v2-pro, mimo-v2-omni, and qwen3.6-plus appear inconsistent with their counterparts in the opencode-zen provider (lines 666-669), which support up to 1,048,576 tokens. Since opencode-go is typically the higher-tier endpoint, these should likely be updated to match the higher limits available in the free tier.
| { id: "mimo-v2-pro", name: "MiMo V2 Pro" }, | |
| { id: "mimo-v2-omni", name: "MiMo V2 Omni" }, | |
| { id: "qwen3.6-plus", name: "Qwen 3.6 Plus" }, | |
| { id: "mimo-v2-pro", name: "MiMo V2 Pro", contextLength: 1048576 }, | |
| { id: "mimo-v2-omni", name: "MiMo V2 Omni", contextLength: 262144 }, | |
| { id: "qwen3.6-plus", name: "Qwen 3.6 Plus", contextLength: 1048576 }, |
| // Register new models | ||
| registerModel("opencode-go", { id: "glm-5.1", name: "GLM-5.1", contextLength: 204800 }); | ||
| registerModel("opencode-go", { id: "kimi-k2.6", name: "Kimi K2.6" }); | ||
| 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: "qwen3.6-plus", name: "Qwen 3.6 Plus" }); | ||
| registerModel("opencode-go", { id: "qwen3.5-plus", name: "Qwen 3.5 Plus" }); | ||
|
|
| registerModel("opencode-go", { id: "glm-5.1", name: "GLM-5.1" }); | ||
|
|
9bd7cb7
into
cheaper-inference:release/v3.7.0
|
Thanks @kang-heewon for this great contribution! 🎉 It's now officially merged into the release/v3.7.0 branch. It will be part of the next release. We appreciate your effort! |
Upstream returns 401 "Model qwen3.x-* is not supported for format oa-compat" when hitting /chat/completions for qwen3.5-plus / qwen3.6-plus / qwen3.7-max on opencode-go. Same upstream behavior already documented for opencode-zen via Issue cheaper-inference#2292. - Adds `targetFormat: "claude"` to the three qwen entries in the opencode-go provider registry so requests route through /messages with the anthropic-version header. - Replaces the previous `qwen3.5-plus` / `qwen3.6-plus` rows in the PR cheaper-inference#1510 executor test (they registered the models without targetFormat, which now conflicts with the registry default). - Adds a new test asserting all three qwen ids route to /zen/go/v1/messages and carry the anthropic-version: 2023-06-01 header. Fork-only commit on chatlabel/patches — upstream PR cheaper-inference#2790 is still open and does not yet include this fix.
Upstream opencode-go returns 401 "Model qwen3.x-* is not supported for format oa-compat" when qwen3.6-plus / qwen3.5-plus are sent to /chat/completions, matching the behavior already documented for the same model family on opencode-zen (Issue cheaper-inference#2292). - Adds `targetFormat: "claude"` to the qwen entries in the opencode-go provider registry so requests route through /messages with the anthropic-version: 2023-06-01 header instead of /chat/completions. - Replaces the qwen rows in the PR cheaper-inference#1510 executor test (they registered the models without targetFormat and asserted chat/completions, which is now incorrect). - Adds a new test asserting both qwen ids route to /zen/go/v1/messages and carry the anthropic-version header. Reproduces with `curl https://opencode.ai/zen/go/v1/chat/completions -d '{"model":"qwen3.6-plus", ...}'` (server side error precedes auth). No executor or translator code changed — the existing claude targetFormat handling for minimax-m2.5 / m2.7 on opencode-go already covers this path.
…heaper-inference#1510) Integrated into release/v3.7.0
…heaper-inference#1510) Integrated into release/v3.7.0
Summary
opencode-goproviderNew Models
glm-5.1kimi-k2.6mimo-v2-promimo-v2-omniqwen3.6-plusqwen3.5-plusDetails
OpencodeExecutoralready handles/chat/completions(openai default) and/messages(claude targetFormat) routingtargetFormat: "claude"preserved — Anthropic format routing maintained/v1/chat/completions(proxy handles DashScope translation internally)provider === "opencode-go"check intranslator/index.tsretained)Verification
npm run typecheck:core— exit 0opencode-executor.test.ts— 12 pass, 0 failnpm run lint— clean (prettier + eslint)providerRegistry.ts,opencode-executor.test.ts