Repository navigation
fix(catalog): route opencode-go muse-spark to responses api - #8980
Merged
Merged
Conversation
The OpenCode Go gateway serves muse-spark-1.2 and muse-spark-1.2-contributor only at /zen/go/v1/responses, but the /zen/go/v1/models discovery omits the provider.npm hint, so the resolver fell through to openai-completions. The completions parser then closed the stream without a finish_reason on every tool-call turn. Pin both ids to openai-responses in OPENCODE_GO_API_RESOLUTION, mirroring the existing deepseek-v4-flash override, and add a resolver regression. Fixes #8957
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
bchap1n
added a commit
to bchap1n/oh-my-pi
that referenced
this pull request
Aug 20, 2026
Console Go gateway at /zen/go/v1/responses only allows tool_choice auto; forced named choices (think) 400. Downgrade via compat flag so mapOpenAIResponsesToolChoiceForTools returns auto. Fixes forced think 400 for muse-spark-1.2-contributor on opencode-go/zen. Separate from can1357#8980 (API pin) and can1357#8999 (thinking levels).
This was referenced Aug 23, 2026
darsrc
pushed a commit
to darsrc/dar-oh-my-pi
that referenced
this pull request
Oct 10, 2026
darsrc
pushed a commit
to darsrc/dar-oh-my-pi
that referenced
this pull request
Oct 10, 2026
Console Go gateway at /zen/go/v1/responses only allows tool_choice auto; forced named choices (think) 400. Downgrade via compat flag so mapOpenAIResponsesToolChoiceForTools returns auto. Fixes forced think 400 for muse-spark-1.2-contributor on opencode-go/zen. Separate from can1357#8980 (API pin) and can1357#8999 (thinking levels).
can1357
deleted the
farm/0fcd16ec/fix-opencode-go-muse-spark-responses
branch
November 2, 2026 23:09
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.
Repro
opencode-go/muse-spark-1.2throwsOpenAI completions stream closed before a finish_reason was receivedon every tool-call turn (reported by @Ayush12358; also hit by @AIast0r and @veermetri05). Invoking theopencode-godescriptor resolver reproduces the misroute:Cause
The OpenCode Go gateway serves Muse Spark 1.2 (and
muse-spark-1.2-contributor) only athttps://opencode.ai/zen/go/v1/responses(OpenAI Responses transport,@ai-sdk/openaiper the Go endpoints table).OPENCODE_GO_API_RESOLUTIONinpackages/catalog/src/provider-models/openai-compat.tsonly maps a model toopenai-responseswhen the discovered/zen/go/v1/modelsmetadata carriesprovider.npm === "@ai-sdk/openai". That hint is absent for the muse-spark ids, so they fall through to the defaultopenai-completions; omp POSTs to/v1/chat/completions, and the completions stream parser (packages/ai/src/providers/openai-completions.ts) throws when the stream closes with nofinish_reason.Fix
muse-spark-1.2andmuse-spark-1.2-contributortoopenai-responsesinOPENCODE_GO_API_RESOLUTION, mirroring the existingdeepseek-v4-flashoverride.packages/catalog/test/opencode-provider.test.tsasserting both ids resolve to{ api: "openai-responses", baseUrl: "https://opencode.ai/zen/go/v1" }.packages/catalog[Unreleased] > Fixed.No
models.jsonregen: opencode-go uses authoritative runtime discovery and has no bundled muse-spark entry, so the resolution rules govern this at runtime.Verification
bun test test/opencode-provider.test.ts test/issue-1617-repro.test.ts test/meta-provider.test.ts(packages/catalog) — 12 pass, 0 fail. The new resolver test fails before the override and passes after.Fixes #8957