Skip to content

feat(opencode-go): register 6 missing models from upstream catalog - #1510

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.7.0from
kang-heewon:feat/opencode-go-models-update
Apr 22, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.7.0from
kang-heewon:feat/opencode-go-models-update

Conversation

@kang-heewon

Copy link
Copy Markdown
Contributor

Summary

  • Add 6 missing models to the opencode-go provider
  • Expands opencode-go model catalog from 4 to 10 models

New Models

Model ID Name contextLength targetFormat
glm-5.1 GLM-5.1 204800 (default openai)
kimi-k2.6 Kimi K2.6 200000 (default) (default openai)
mimo-v2-pro MiMo V2 Pro 200000 (default) (default openai)
mimo-v2-omni MiMo V2 Omni 200000 (default) (default openai)
qwen3.6-plus Qwen 3.6 Plus 200000 (default) (default openai)
qwen3.5-plus Qwen 3.5 Plus 200000 (default) (default openai)

Details

  • No executor/translator changes — existing OpencodeExecutor already handles /chat/completions (openai default) and /messages (claude targetFormat) routing
  • MiniMax targetFormat: "claude" preserved — Anthropic format routing maintained
  • Qwen models — uses default openai format since opencode-go proxies through /v1/chat/completions (proxy handles DashScope translation internally)
  • All opencode-go models are treated as reasoning models (existing provider === "opencode-go" check in translator/index.ts retained)

Verification

  • ✅ npm run typecheck:core — exit 0
  • ✅ opencode-executor.test.ts — 12 pass, 0 fail
  • ✅ npm run lint — clean (prettier + eslint)
  • ✅ any-budget — pass
  • ✅ 2 changed files: providerRegistry.ts, opencode-executor.test.ts

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)

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +642 to +644
{ 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" },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
{ 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 },

Comment on lines +190 to +197
// 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" });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Manually registering models that are already defined in the REGISTRY is redundant. Removing these calls ensures the test actually verifies the configuration in providerRegistry.ts rather than a local mock state.

Comment on lines +224 to +225
registerModel("opencode-go", { id: "glm-5.1", name: "GLM-5.1" });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This registerModel call is redundant as glm-5.1 is already included in the provider's model list in providerRegistry.ts.

@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.7.0 April 22, 2026 15:09
@diegosouzapw
diegosouzapw merged commit 9bd7cb7 into cheaper-inference:release/v3.7.0 Apr 22, 2026
2 checks passed
@diegosouzapw

Copy link
Copy Markdown
Collaborator

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!

@diegosouzapw diegosouzapw mentioned this pull request Apr 22, 2026
jeferssonlemes added a commit to jeferssonlemes/OmniRoute that referenced this pull request May 27, 2026
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.
jeferssonlemes added a commit to jeferssonlemes/OmniRoute that referenced this pull request May 27, 2026
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.
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants