Repository navigation
fix(providers): stop rewriting GA qwen3.8-max to preview on opencode-go (#14181) - #14242
Merged
diegosouzapw merged 1 commit intoSep 22, 2026
Conversation
…go (diegosouzapw#14181) OpenCode Go now serves a GA qwen3.8-max, but the built-in deprecation table (written when the model shipped only under the -preview id) rewrote it to qwen3.8-max-preview before dispatch, and the upstream rejects the preview id with a 401. The provider-aware exemption in resolveModelAlias never fired because the opencode-go static registry lacked the GA id. - declare qwen3.8-max in the opencode-go registry (qwen family there is text-only and routes through the Claude translator per diegosouzapw#2292) - give the GA model its own MODEL_SPECS row instead of aliasing it to the preview spec The rewrite stays for preview-only providers (qoder, bailian-coding-plan, qwen-cloud-token-plan) and for callers with no provider in hand.
This was referenced Sep 21, 2026
Merged
Owner
|
Thanks @xiechimon — merging via the release merge-train. Validated in local merge-train (mt-train10c) on the devbox @ train tip 4d841aa1c740bbaa03868dc0a403c62099a99a42 with the 72 sibling PRs of this batch: typecheck:core, file-size, complexity, cognitive-complexity, changelog-integrity green; changed-area node:test 831/831 (0 failing) and vitest 480/482 — the two reds are |
diegosouzapw
merged commit Sep 22, 2026
83a6e9a
into
diegosouzapw:release/v3.8.51
7 of 16 checks passed
diegosouzapw
added a commit
that referenced
this pull request
Sep 22, 2026
`qwen38-max-bare-id-alias.test.ts` asserted `MODEL_SPECS["qwen3.8-max"] === undefined`, guarding against a second source of truth for what was then the SAME model published under two ids (the preview row carried `aliases: ["qwen3.8-max"]`). That premise expired in #14181/#14242 (83a6e9a, "stop rewriting GA qwen3.8-max to preview on opencode-go"): OpenCode Go ships a GA `qwen3.8-max` that answers 401 on the `-preview` id, so the two ids are now two DISTINCT models and the commit deliberately gave the GA one its own MODEL_SPECS row while dropping the alias from the preview row. The production change is correct; the assertion is the stale side. Replaced it with the invariant this file actually exists to protect — NEITHER id may fall through to contextManager's `default: 128000` — plus a guard that the preview row does not re-declare the bare id as an alias, which is what would silently collapse the two rows back into one. No assertion was removed or weakened. ℹ pass 5 / ℹ fail 0 (node --import tsx/esm --test)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
OpenCode Go now serves a GA
qwen3.8-max(it shows up as an imported model), but OmniRoute's built-in deprecation table (written when the model shipped only under the-previewid) rewrote it toqwen3.8-max-previewbefore dispatch. The upstream rejects the preview id with401 Model qwen3.8-max-preview is not supported.The provider-aware exemption in
resolveModelAlias(#11503) never fired here: the opencode-go static registry didn't declare the GA id, sohasKnownProviderModel("opencode-go", "qwen3.8-max")returned false and the global rewrite applied.Changes
qwen3.8-maxin the opencode-go registry. Qwen models on opencode-go are text-only and route through the Claude translator ([BUG] + [FIX] opencode-zen: upstream returns wrong format (Claude) on OpenAI endpoint + rejects non-streaming for some models #2292, [BUG] qwen3.7-max (opencode-go) returns 500 on image inputs — upstream model does not support vision #2822); the new entry follows that. Base id only, upstream doesn't advertise effort-tier variants.MODEL_SPECSrow instead of aliasing it to the preview spec (same limits: 1M context, 65k output).The built-in rewrite stays for providers that only serve the preview id (qoder, bailian-coding-plan, qwen-cloud-token-plan) and for callers with no provider in hand.
Verification
tests/unit/14181-opencode-go-qwen-ga-alias.test.ts, 4 cases: the registry declares the GA id with the qwen family flags;resolveModelAlias("qwen3.8-max", "opencode-go")returns the id unchanged; preview-only providers (qoder) and no-provider callers still resolve to the preview id; the GA id resolves to its own spec row.prettier --check,eslint,typecheck:coreclean on all touched files.Fixes #14181