Skip to content

fix(providers): dispatch opencode-go qwen3.8-max unchanged - #14183

Closed
gonisulaimann wants to merge 1 commit into
diegosouzapw:release/v3.8.51from
gonisulaimann:fix/qwen3-8-max-ga-14181
Closed

gonisulaimann wants to merge 1 commit into
diegosouzapw:release/v3.8.51from
gonisulaimann:fix/qwen3-8-max-ga-14181

Conversation

@gonisulaimann

Copy link
Copy Markdown
Contributor

OpenCode Go ships the GA qwen3.8-max upstream, but the global deprecation map in modelDeprecation.ts still forwards it to qwen3.8-max-preview. That mapping predates the GA model (its own comment says to drop it once Alibaba ships a distinct qwen3.8-max — that condition is now met), so every request for opencode-go/qwen3.8-max was rewritten and rejected upstream with 401 Model qwen3.8-max-preview is not supported.

What changed:

  • open-sse/services/modelDeprecation.ts — removed the stale qwen3.8-max → qwen3.8-max-preview mapping.
  • src/shared/constants/modelSpecs.ts — qwen3.8-max gets its own spec with the same 1M-context envelope, so the context-preflight coverage the rewrite used to provide is preserved through the spec itself; the preview spec no longer aliases the GA id.
  • open-sse/config/providers/registry/opencode/go/index.ts — registered the GA row with the qwen routing flags (targetFormat: "claude", supportsReasoning: true, supportsVision: false) so hasKnownProviderModel also holds for the direct path.

Providers that legitimately expose the preview id are untouched: qwen3.8-max-preview still resolves and dispatches on qoder and bailian-coding-plan.

Tests (tests/unit/qwen3-8-max-ga-14181.test.ts, written first — all four failed on the base tip):

  • resolveModelAlias("qwen3.8-max") and with the opencode-go provider both return the id unchanged.
  • qwen3.8-max-preview still resolves on qoder and bailian-coding-plan, and both registries keep the preview row.
  • opencode-go declares qwen3.8-max with the routing flags above.
  • qwen3.8-max has its own MODEL_SPECS entry and the preview spec no longer aliases the GA id.

Results:

  • node --import tsx/esm --test tests/unit/qwen3-8-max-ga-14181.test.ts — 4/4 pass.
  • Related suites (model-deprecation, model-deprecation-aliases-11503, resolve-model-alias-index-8697, bailian-coding-plan-provider, qwen-cloud-token-plan-discovery, model-capabilities-registry) — 135/135 pass.
  • tsc --noEmit clean on the touched files; eslint clean; prettier clean.

Fixes #14181

The global deprecation map still forwarded qwen3.8-max to
qwen3.8-max-preview. That was added when Alibaba only exposed the
preview id, but opencode-go now ships the GA model upstream, so every
request for it was rewritten and rejected with 401 Model
qwen3.8-max-preview is not supported.

Drop the stale mapping, give qwen3.8-max its own MODEL_SPECS entry so
the 1M-context preflight coverage is preserved, stop the preview spec
from aliasing the GA id, and register the GA row on opencode-go with
the qwen routing flags. qoder and bailian-coding-plan keep serving
qwen3.8-max-preview.

Fixes diegosouzapw#14181
@gonisulaimann

Copy link
Copy Markdown
Contributor Author

Closing in favor of #14242, which fixes the same issue and does it more correctly.

When I re-verified the registries at the current tip, the ground truth is: qoder and bailian-coding-plan serve only qwen3.8-max-preview, while qwen-cloud-token-plan, alibaba, qwen-cloud, kilocode, clinepass and xkiro list the GA id. My branch deleted the global mapping outright - which fixes opencode-go but would regress bare-id qwen3.8-max requests against qoder and bailian. #14242 keeps the rewrite for the preview-only providers and lets the provider-aware exemption from #11503 pass the GA id through on opencode-go, which is the mechanism the repo already built for exactly this. Its test suite also pins the qoder rewrite staying intact, which mine asserted away.

The parts of my branch that were right (the GA MODEL_SPECS row, the opencode-go registry entry) are both in #14242, so nothing is lost here.

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.

fix(opencode-go): stop rewriting qwen3.8-max to preview

1 participant