Repository navigation
fix(provider): align opencode-go model protocols with zen and upstream - #1409
Merged
Merged
Conversation
Contributor
|
No changes needed from you. A maintainer will review this pull request. |
TheGreatAxios
force-pushed
the
cl-10534-model-protocols
branch
from
October 12, 2026 05:44
2ec64df to
63fb3e8
Compare
TheGreatAxios
commented
Oct 12, 2026
TheGreatAxios
left a comment
Collaborator
Author
There was a problem hiding this comment.
Review · Comment
Aligns the opencode-go protocol map with the live Go gateway endpoint table and wires those ids through the existing runtime routing.
Findings
No findings. Checked packages/opencode-go/src/models.ts against the live Go endpoint table. grok-4.5 is responses. MiniMax and qwen3.8-max stay messages. New ids use the same PROTOCOL_BY_ID array that feeds resolveGoEndpoint.
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.
Reconcile opencode-go vs zen model protocol disagreement (CL-10534)
packages/opencode-go/src/models.tsandpackages/zen/src/models.tsshare the same model-catalog architecture but disagreed on protocol for overlapping model ids. Live re-verification against the upstream gateway docs (both fetched 11/10/2026; Go docs last updated Oct 11, 2026) shows the two gateways are not protocol-identical: the Go gateway and the Zen gateway serve some of the same model ids over different wire protocols. Each package's protocol map must match its own gateway.Live re-check of the five flipped models
grok-4.5chat-completionsresponsesgrok-4.7,grok-4.6) =/zen/go/v1/responses/zen/v1/responsesresponsesminimax-m3messageschat-completions/zen/go/v1/messages/zen/v1/chat/completionsminimax-m2.7messageschat-completions/zen/go/v1/messages/zen/v1/chat/completionsminimax-m2.5messageschat-completions/zen/v1/chat/completionsqwen3.8-maxmessageschat-completions/zen/go/v1/messages/zen/v1/chat/completionsBottom line: the four reverted flips were wrong because the PR's first pass used the Zen gateway as the single source of truth; the Go gateway actually serves MiniMax and Qwen3.8 Max over the Anthropic Messages API.
grok-4.5staysresponses(Go Grok family protocol + Zen live docs).Missed adjacent live Go models — added to the fallback seed
The packaged fallback missed 16 models present in the live Go catalog. Added with protocols straight from the live Go docs endpoint table:
grok-4.7,grok-4.6,gpt-6-lunaclaude-haiku-5-5,qwen3.8-flashglm-5.3-flash,glm-5.3,longcat-2.0,longcat-2.5-preview-free,step-5-preview-free,deepseek-v4.1-flash,deepseek-v4-flash-vision-exp,mimo-v2.6-flash,mimo-v2.6-pro,hy4-preview,space-bunnyNet change vs main
grok-4.5:chat-completions→responses(confirmed)minimax-m3,minimax-m2.7,minimax-m2.5,qwen3.8-max: unchanged from main (messages) — the v1 flips were revertedTests pinning the corrected mapping
packages/opencode-go/src/endpoint.test.ts: pinsprotocolForGoModel+resolveGoEndpointfor the confirmed flip (grok-4.5→ responses), the reverted mappings (MiniMax family,qwen3.8-max→ messages/anthropic), and every newly-added live model.src/config/inference-sources.test.ts:minimax-m3andqwen3.8-maxroute to theopencode-go-messagessource (https://opencode.ai/zen/go).src/provider/cache-ttl.test.ts,src/session/cache-ttl-resume.test.ts: Anthropic-protocol representative staysminimax-m3.Verification (all clean)
bun test packages/opencode-go/src packages/zen/src— 44 pass, 0 failbun run typecheck— cleanoxfmt --check+oxlinton changed files — cleanLive sources: https://opencode.ai/docs/go/ (endpoint table, last updated Oct 11, 2026) and https://opencode.ai/docs/zen/ — both fetched 11/10/2026.