Skip to content

fix(providers): route opencode-go/muse-spark-1.3-contributor to Responses API - #12675

Closed
bacnh85 wants to merge 2 commits into
diegosouzapw:release/v3.8.51from
bacnh85:fix/opencode-go-muse-spark-1-3-12674
Closed

bacnh85 wants to merge 2 commits into
diegosouzapw:release/v3.8.51from
bacnh85:fix/opencode-go-muse-spark-1-3-12674

Conversation

@bacnh85

@bacnh85 bacnh85 commented Sep 4, 2026

Copy link
Copy Markdown

Fixes #12674.

Upstream (opencode.ai/zen/go) serves Muse Spark only on the Responses API (/v1/responses); direct /v1/chat/completions returns 500 for both 1.2 and 1.3 (verified same key, same server). The 1.2 family has registry targetFormat: "openai-responses" entries, but 1.3 (upstream release 2026-09-02) was never added, so resolveOpencodeTargetFormat() falls back to "openai" and the request 500s (retried 3x, account cooldown, (reset after 3s)).

Changes

  • open-sse/config/providers/registry/opencode/go/index.ts: 1.3 base + minimal/low/medium/high/xhigh effort aliases (no max), each contextLength 1048576 / maxOutputTokens 131072 / supportsReasoning+vision+audio+video / targetFormat openai-responses, mirroring the 1.2 block. Specs verified via opencode models opencode-go --refresh --verbose (same effort set, limits, and $0.10/$0.20 pricing as 1.2).
  • open-sse/executors/opencode.ts: EFFORT_TIERS["muse-spark-1.3-contributor"] = ["minimal","low","medium","high","xhigh"] so suffixed aliases parse and get reasoning_effort injection.
  • tests/unit/opencode-go-muse-spark-1-3-12674.test.ts: registry entries, executor URL resolution, parseEffortLevel (incl. max→null), Go-only scoping.

Verification

  • New test file: 9/9 pass.
  • Neighbors opencode-go-effort-aliases-8353, opencode-muse-spark-responses-10867, opencode-target-format-alias-11045, opencode-muse-spark-min-output, opencode-session-fingerprint-headers-10571: 64/64 pass.
  • check-provider-consistency: OK.

Out of scope (noted in #12674): bare muse-spark-1.3-contributor combo path also tries command-code/meta/... → 502 empty response; may need the same treatment in that provider.

…nses API

Upstream serves Muse Spark only on /v1/responses; without a registry
targetFormat entry the executor falls back to /chat/completions and the
upstream returns 500 (same class as diegosouzapw#12196). Add base + minimal/low/medium/
high/xhigh effort aliases (verified via `opencode models opencode-go
--refresh --verbose`) with targetFormat openai-responses, register the
effort tiers for alias parsing, and cover with regression tests.

Fixes diegosouzapw#12674
maxmad64bis pushed a commit to maxmad64bis/OmniRoute that referenced this pull request Sep 12, 2026
… Zen, OpenCode and OpenCode Go

Muse Spark 1.3 is only served on the Responses API, like 1.2. None of the
1.3 ids were registered with targetFormat "openai-responses", so the
executor fell back to /chat/completions and the upstream answered 500.

- opencode-go: muse-spark-1.3-contributor and its minimal/low/medium/high/xhigh
  effort aliases, plus the 1.3 effort tiers in the executor (from diegosouzapw#12675).
- opencode-zen and opencode: muse-spark-1.3 and muse-spark-1.3-contributor-free.
- All 1.3 entries declare contextLength 1048576 and maxOutputTokens 131072,
  matching the published OpenCode catalog and the 1.2 entries, instead of the
  200000 provider default.

Builds on diegosouzapw#12675, and on the same fix proposed in diegosouzapw#12973 and diegosouzapw#13111.

Co-authored-by: bacnh85 <mail@bacnh.com>
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks — this is a very thorough writeup (the upstream curl reproduction really nails the root cause), and you get credit as the original reporter of #12674. Your changelog fragment is also the only one of the three PRs on this issue that included one — we're planning to carry it forward.

The maintainer's follow-up on the issue asked to also cover the opencode-zen and base opencode registries, which your PR intentionally left out of scope. PR #13111 covers all three, so we're planning to merge that one and give you credit for the original diagnosis + changelog fragment. Let us know if you'd rather extend this PR instead.

Triage note: this is the review recommendation — the close itself happens only after the maintainer's per-PR sign-off (and, where a superseding PR is named, after it has landed). Nothing is being closed by this comment.

diegosouzapw pushed a commit that referenced this pull request Sep 15, 2026
… Zen, OpenCode and OpenCode Go (#13471)

Registers Muse Spark 1.3 (with its effort aliases) on OpenCode Zen, OpenCode and OpenCode Go with `targetFormat: openai-responses` and a 1M context window, so the model no longer falls back to `/chat/completions` (#12674, #12698). Superset of #12675, #12973 and #13111, whose authors are credited in the PR.

Validated first on the combined board of all 38 PRs of this batch (10 merged as-is, 28 after the maintainer rework) on top of release/v3.8.51 c0f92ec: typecheck:core, check:open-sse-typecheck and check:dashboard-typecheck clean; ESLint clean on every changed file; file-size (rebaselined for the combined growth), complexity, cognitive-complexity, changelog-integrity, docs-counts, docs-sync, migration-numbering and i18n new-key gates green; 735 focused node:test cases with the only batch-caused failure (a flag-count assertion) fixed. Then re-validated alone on the fresh release tip right before this merge: ESLint on the changed files, typecheck:core, check:open-sse-typecheck, the file-size/complexity/changelog gates and this PR's own tests.

Thanks @maxmad64bis!
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for catching this! Muse Spark 1.3 routing through the Responses API landed via #13471, which covers OpenCode Zen, OpenCode and OpenCode Go plus the effort aliases and credits the parallel reports. The registry entries, getTokenLimit and resolveOpencodeTargetFormat are all covered by its tests, so this PR is now redundant. Closing as covered by #13471.

muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
… Zen, OpenCode and OpenCode Go (diegosouzapw#13471)

Registers Muse Spark 1.3 (with its effort aliases) on OpenCode Zen, OpenCode and OpenCode Go with `targetFormat: openai-responses` and a 1M context window, so the model no longer falls back to `/chat/completions` (diegosouzapw#12674, diegosouzapw#12698). Superset of diegosouzapw#12675, diegosouzapw#12973 and diegosouzapw#13111, whose authors are credited in the PR.

Validated first on the combined board of all 38 PRs of this batch (10 merged as-is, 28 after the maintainer rework) on top of release/v3.8.51 d61b804: typecheck:core, check:open-sse-typecheck and check:dashboard-typecheck clean; ESLint clean on every changed file; file-size (rebaselined for the combined growth), complexity, cognitive-complexity, changelog-integrity, docs-counts, docs-sync, migration-numbering and i18n new-key gates green; 735 focused node:test cases with the only batch-caused failure (a flag-count assertion) fixed. Then re-validated alone on the fresh release tip right before this merge: ESLint on the changed files, typecheck:core, check:open-sse-typecheck, the file-size/complexity/changelog gates and this PR's own tests.

Thanks @maxmad64bis!
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(providers): opencode-go/muse-spark-1.3-contributor routed to /chat/completions, upstream serves it only on Responses

2 participants