Repository navigation
fix(providers): dispatch opencode-go qwen3.8-max unchanged - #14183
gonisulaimann wants to merge 1 commit into
Conversation
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
|
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. |
OpenCode Go ships the GA
qwen3.8-maxupstream, but the global deprecation map inmodelDeprecation.tsstill forwards it toqwen3.8-max-preview. That mapping predates the GA model (its own comment says to drop it once Alibaba ships a distinctqwen3.8-max— that condition is now met), so every request foropencode-go/qwen3.8-maxwas rewritten and rejected upstream with401 Model qwen3.8-max-preview is not supported.What changed:
open-sse/services/modelDeprecation.ts— removed the staleqwen3.8-max→qwen3.8-max-previewmapping.src/shared/constants/modelSpecs.ts—qwen3.8-maxgets 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) sohasKnownProviderModelalso holds for the direct path.Providers that legitimately expose the preview id are untouched:
qwen3.8-max-previewstill 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 theopencode-goprovider both return the id unchanged.qwen3.8-max-previewstill resolves on qoder and bailian-coding-plan, and both registries keep the preview row.qwen3.8-maxwith the routing flags above.qwen3.8-maxhas its ownMODEL_SPECSentry 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.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 --noEmitclean on the touched files; eslint clean; prettier clean.Fixes #14181