anomalyco / anomalyco/opencode
[Bug] Zen API: `muse-spark-1.2-contributor-free` returns HTTP 500 for every request via API key, while other free models work
@MrMushrooooom is already working on this.
Since Aug 27, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Summary
The model muse-spark-1.2-contributor-free is advertised in GET https://opencode.ai/zen/v1/models, but every POST /v1/chat/completions request for it returns:
{"type":"error","error":{"type":"error","message":"Internal server error"}}
with HTTP 500. This is 100% reproducible (15+ attempts over ~2 hours).
Other free models on the same key, at the same moment, return HTTP 200 normally. The same model works in the OpenCode desktop app under the same account, so the failure appears specific to the Zen API key path for this one model.
Environment
- Endpoint:
https://opencode.ai/zen/v1 - Auth: Zen API key (
Authorization: Bearer <key>) - Account: logged in via GitHub
- Client:
curlfrom a Linux container (also reproduced through Hermes Agent's OpenAI-compatible client)
Reproduction
curl -s -w "\nHTTP=%{http_code}" https://opencode.ai/zen/v1/chat/completions \
-H "Authorization: Bearer $OPENCODE_ZEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"muse-spark-1.2-contributor-free","messages":[{"role":"user","content":"dis PONG"}],"max_tokens":40}'
Result: HTTP=500, {"type":"error","error":{"type":"error","message":"Internal server error"}}
Control tests (same key, same session)
| Request | Result |
|---|---|
hy3-free |
200 OK |
laguna-s-2.1-free |
200 OK |
nemotron-3-ultra-free |
200 OK |
mimo-v2.5-free |
200, then FreeUsageLimitError (expected quota behaviour) |
claude-haiku-4-5 (paid) |
401 CreditsError — "No payment method" (clean, correct error) |
muse-spark-1.2 (paid) |
401 CreditsError (clean, correct error) |
muse-spark-1.2-contributor-free |
500 generic, always |
The paid-model responses show the API returns precise, typed errors when a refusal is legitimate (billing). The contributor-free model instead returns an untyped 500, which looks like an unhandled server-side exception rather than an intentional refusal.
Variations tried — all return the same 500
- with
max_tokens: 20,max_tokens: 2000, and with nomax_tokensfield - with
"stream": true - with
"variant": "xhigh"(the variant the desktop app records for this model) - with
"reasoning_effort": "xhigh" - endpoint
POST /v1/messageswithx-api-key+anthropic-versionheaders - endpoint
POST /v1/messageswithAuthorization: Bearer - model id
opencode/muse-spark-1.2-contributor-free(prefixed)
Note: muse-spark-1.2-contributor-free:xhigh returns a different, correctly-typed error — {"type":"ModelError","message":"Model ... is not supported"} — confirming model-id validation happens before the crash, and that the bare id is the recognised one.
Note: POST /v1/messages returns 500 for every model tested (including hy3-free), so that endpoint appears unrelated / not supported.
Desktop app comparison
In the OpenCode desktop app, the same account can select and use this model. The app stores its selection as:
{"providerID":"opencode","modelID":"muse-spark-1.2-contributor-free","variant":"xhigh"}
So the model id matches exactly what the API rejects. The difference is the authentication path: desktop session (GitHub OAuth) vs Zen API key.
Expected behaviour
Either the model serves requests via the Zen API key like the other -free models, or it returns a typed, documented error explaining the requirement (e.g. an enrolment or consent flag). Note there is no visible "contributor programme" opt-in in the account settings, so if one is required it is not discoverable.
Impact
The model cannot be used by any API client (agents, SDKs, self-hosted tools) — only inside the desktop app.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.