anomalyco / anomalyco/opencode
OpenCode Go: "Upstream request failed: Endpoint is unavailable" for qwen/grok models (server-side, not client network)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Summary
OpenCode Go (Zen gateway) returns server_error: Error from provider (Console Go): Upstream request failed: Endpoint is unavailable. for qwen3.7-plus / qwen3.7-max / grok-4.5, while other Go models (kimi-k3, glm-5.2, minimax-m3, gpt-5.6-luna) work fine with the same API key. This is reproducible via direct curl calls to the gateway — not a client-side network/proxy issue.
Environment
- opencode CLI version: 1.18.11 (Windows 10, win32-x64)
- Auth: opencode-go provider, type "api" (Go subscription, bound via /connect)
- Default model: qwen3.7-plus
Reproduction (curl, no SDK involved)
POST https://opencode.ai/zen/go/v1/chat/completions
Authorization: Bearer
Content-Type: application/json
{"model":"qwen3.7-plus","messages":[{"role":"user","content":"hi"}],"stream":false,"max_tokens":16}
Actual response
{"error":{"type":"server_error","message":"Error from provider (Console Go): Upstream request failed: Endpoint is unavailable."}}
Observations
- Same error with and without HTTP proxy; gateway is reachable from here (HTTP 200 on /zen/go/v1/models).
- Model matrix with the same key:
- WORKS: kimi-k3, glm-5.2, minimax-m3, gpt-5.6-luna
- FAILS: qwen3.7-plus, qwen3.7-max, grok-4.5 -> "Upstream request failed: Endpoint is unavailable."
- The error string is NOT present in the opencode client binary, so it originates from the gateway's upstream provider ("Console Go").
- opencode log (opencode.log) shows:
AI_APICallError: Upstream request failed: Endpoint is unavailable.with providerID=opencode-go modelID=qwen3.7-plus, every request, 100% failure rate.
Expected
Chat completions succeed for all models listed in the Go model catalog.
Severity
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
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.
Research direction
Start by reproducing the POST request against https://opencode.ai/zen/go/v1/chat/completions with the listed failing and working models, then compare the opencode.log providerID and modelID entries. Done means qwen3.7-plus, qwen3.7-max, and grok-4.5 return successful chat completions through the Go gateway rather than the upstream endpoint error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100