anomalyco / anomalyco/opencode
[Bug] OpenCode Go: return 401 Request blocked by upstream provider — chat/completions blocked while /v1/models works
@StarpTech is already working on this.
Since Jul 22, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Starting today (2026-07-22), all models under my OpenCode Go subscription are returning 401 Request blocked by upstream provider when calling the chat/completions endpoint. The /v1/models endpoint works fine.
This appears to be a server-side issue affecting Go subscriptions, not a client configuration problem.
Account Details
- Subscription: OpenCode Go
- Expiry: 2026-08-13
- Console status: All usage limits (5h / weekly / monthly) show sufficient balance
- API Key: Valid (tested with newly created key, same result)
Affected Models
All of the following models return the same error:
| Model | Result |
|---|---|
deepseek-v4-flash |
❌ 401 |
kimi-k2.6 |
❌ 401 |
glm-5.2 |
❌ 401 |
mimo-v2.5 |
❌ 401 |
Reproduction Steps
Step 1: List models (works)
curl -H "Authorization: Bearer $OPENCODE_API_KEY" \
https://opencode.ai/zen/go/v1/models
Result: 200 OK — returns full model list including all 4 models above.
Step 2: Chat completion (fails)
curl -X POST https://opencode.ai/zen/go/v1/chat/completions \
-H "Authorization: Bearer $OPENCODE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"hello"}]}'
Result:
{"type":"error","error":{"type":"AuthError","message":"Request blocked by upstream provider."}}
What I've Verified
- API Key is valid and active
- Base URL is correct (
https://opencode.ai/zen/go/v1) - Tested directly with
curlto eliminate client-side issues - Created a brand new API Key — same result
- All models affected, not just one
- Console shows sufficient usage quota remaining
Related Issues
Possibly related to #21097 and #20984 which report similar symptoms.
Expected Behavior
chat/completions should return a valid response when the API Key is valid, subscription is active, and usage quotas are not exceeded.
Actual Behavior
All chat/completions requests return 401 Request blocked by upstream provider, while GET /v1/models works fine with the same key.
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.
Assessment
This issue has not been assessed yet.