You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] opencode-go qwen3.7-max intermittently returns 500 Internal server error on text requests #30310
opencode-go/qwen3.7-max intermittently returns HTTP 500 Internal server error via https://opencode.ai/zen/go/v1/messages, even for normal text-only requests.
This is not the oa-compat 401 issue; this is a direct /v1/messages 500 from the OpenCode Go endpoint.
OpenCode version
1.15.11
Environment
OS: Windows 11
Network: mainland China, proxy/TUN in use (Mihomo)
Provider: opencode-go
Model: qwen3.7-max
Steps to reproduce
Start OpenCode with model opencode-go/qwen3.7-max
Send a normal text prompt (no image attachments)
Observe repeated failures from https://opencode.ai/zen/go/v1/messages
Actual behavior
Intermittent repeated failures with:
statusCode: 500
responseBody: {"type":"error","error":{"type":"error","message":"Internal server error"}}
From local OpenCode logs (~/.local/share/opencode/log/2026-06-02T015530.log), multiple consecutive failures occurred around 2026-06-02T01:56:45Z to 01:57:15Z, all for providerID=opencode-go modelID=qwen3.7-max, all targeting:
Possible root cause found: session_id header triggers 500
Identified a specific trigger for these 500s on the opencode-go API. The session_id HTTP header — sent when a client enables session affinity — causes the opencode-go backend to return HTTP 500.
Tested against https://opencode.ai/zen/go/v1/chat/completions:
Requests without the session_id header → 200 (even with thinking + stream + cache retention params)
Requests with the session_id header → 500 (even with a minimal body of just model, messages, max_tokens)
The x-client-request-id and x-session-affinity headers alone do not trigger the error — only session_id does.
This would explain the "intermittent" pattern: clients that send session affinity headers via compat flags (like sendSessionAffinityHeaders: true) hit the 500, while those that do not succeed normally. The fix would be on the opencode-go API side to ignore or gracefully handle the session_id header rather than returning a server error.
Activity
SodiqovSardor commentedon Jun 2, 2026
yea yea im getting the same error on me its literally saying
SodiqovSardor commentedon Jun 2, 2026
Error: 401 Invalid API-key provided. For details, see:
https://www.alibabacloud.com/help/en/model-studio/error-code#apikey-error
this
dwizzle204 commentedon Jul 8, 2026
Possible root cause found:
session_idheader triggers 500Identified a specific trigger for these 500s on the opencode-go API. The
session_idHTTP header — sent when a client enables session affinity — causes the opencode-go backend to return HTTP 500.Tested against
https://opencode.ai/zen/go/v1/chat/completions:session_idheader → 200 (even with thinking + stream + cache retention params)session_idheader → 500 (even with a minimal body of just model, messages, max_tokens)The
x-client-request-idandx-session-affinityheaders alone do not trigger the error — onlysession_iddoes.This would explain the "intermittent" pattern: clients that send session affinity headers via compat flags (like
sendSessionAffinityHeaders: true) hit the 500, while those that do not succeed normally. The fix would be on the opencode-go API side to ignore or gracefully handle thesession_idheader rather than returning a server error.Morteza363831 commentedon Sep 6, 2026
I have got similar exception when using qwen 3.8 flash .
details :
How can i fix it ?
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊