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 — "Request blocked by upstream provider" (HTTP 401) on all models despite active subscription #39215
I have an active OpenCode Go subscription, but all API requests to /chat/completions are being rejected with:
{"type":"error","error":{"type":"AuthError","message":"Request blocked by upstream provider."}}
` HTTP Status: 401
This affects all models (DeepSeek, GLM, Qwen, Kimi) on both the Go (/zen/go/v1) and Zen (/zen/v1) endpoints. The issue has persisted for multiple days.
Environment
OS: macOS
App: OpenCode Desktop (/Applications/OpenCode.app) — Electron
N/A — Error is in API response, not UI. Full log excerpt:
timestamp=2026-07-27T23:28:08.897Z level=ERROR providerID=opencode-go modelID=deepseek-v4-flash error.error="AI_APICallError: Request blocked by upstream provider."
Operating System
macOS 26.5.2 (Build 25F84)
Terminal
zsh (default macOS terminal)
These issues describe the same or very similar symptoms. Please search existing issues before filing new ones, and consider adding a thumbs-up reaction or a comment to an existing issue instead.
Root cause traced to source in #38218 (comment) — short version: this string is thrown by the workspace.isBlocked check in packages/console/app/src/routes/zen/util/handler.ts (added in c40e3e7, 2026-07-21). No upstream provider is contacted; the request is refused at opencode's edge (~114 ms, same latency as the local invalid-key path), and the same models answer anonymously in the same second. Key rotation, cache clearing, and re-login cannot help. #40944 proposes a distinct error message for this case so it stops presenting as a vendor outage.
Fresh reproducible occurrence on 2026-08-30 UTC, affecting both Go and Zen inference while credential-authenticated catalogs remain available.
Direct minimal probe results at 2026-08-30 01:06:46 UTC:
GET https://opencode.ai/zen/go/v1/models -> HTTP 200
POST https://opencode.ai/zen/go/v1/chat/completions with deepseek-v4-flash -> HTTP 401
GET https://opencode.ai/zen/v1/models -> HTTP 200
POST https://opencode.ai/zen/v1/messages with claude-sonnet-5 -> HTTP 401
The inference probes were deliberately small: one plain text turn per provider, no tools, no streaming, no retries, and no capability/load test. A catalog request was made only after the inference 401 to distinguish invalid credentials from an inference-only block. Balances/subscriptions are active. Reissuing credentials did not resolve the condition.
This strongly suggests an account/workspace or upstream inference-policy block rather than an invalid key, model typo, endpoint mismatch, or insufficient balance. The same integration had previously completed live turns with nonzero usage before transitioning to this state.
Could a maintainer please clarify:
Which policy or automated risk/compliance condition causes authenticated catalogs to remain HTTP 200 while all paid inference is HTTP 401?
Is direct use of the documented Go/Zen endpoints from a custom coding-agent gateway permitted, including small tool, cancellation, and resume compatibility checks?
What is the private support/appeal channel where I can provide the account email, workspace ID, request IDs, and API-key identifiers without posting credentials publicly?
Could the API return a bounded machine-readable reason (for example account_suspended, workspace_blocked, or upstream_policy_blocked) instead of a generic 401 so clients do not misdiagnose this as an invalid key?
I will not post API keys or full account identifiers in this public issue, but can provide them privately to the team.
Closing as a duplicate of #38218. Same "Request blocked by upstream provider" 401. This error comes from OpenCode's own gateway (a blocked workspace), not from an upstream provider. Account unblocks and refunds are handled per workspace, so please contact support (help@anoma.ly) with your workspace ID. You may also want to edit your email out of the issue body.
Activity
github-actions commentedon Jul 28, 2026
This issue might be a duplicate of existing issues. Please check:
These issues describe the same or very similar symptoms. Please search existing issues before filing new ones, and consider adding a thumbs-up reaction or a comment to an existing issue instead.
Sanjay-doppalapudi commentedon Aug 6, 2026
Root cause traced to source in #38218 (comment) — short version: this string is thrown by the
workspace.isBlockedcheck inpackages/console/app/src/routes/zen/util/handler.ts(added in c40e3e7, 2026-07-21). No upstream provider is contacted; the request is refused at opencode's edge (~114 ms, same latency as the local invalid-key path), and the same models answer anonymously in the same second. Key rotation, cache clearing, and re-login cannot help. #40944 proposes a distinct error message for this case so it stops presenting as a vendor outage.OdinManiac commentedon Aug 30, 2026
Fresh reproducible occurrence on 2026-08-30 UTC, affecting both Go and Zen inference while credential-authenticated catalogs remain available.
Direct minimal probe results at 2026-08-30 01:06:46 UTC:
GET https://opencode.ai/zen/go/v1/models-> HTTP 200POST https://opencode.ai/zen/go/v1/chat/completionswithdeepseek-v4-flash-> HTTP 401GET https://opencode.ai/zen/v1/models-> HTTP 200POST https://opencode.ai/zen/v1/messageswithclaude-sonnet-5-> HTTP 401The inference probes were deliberately small: one plain text turn per provider, no tools, no streaming, no retries, and no capability/load test. A catalog request was made only after the inference 401 to distinguish invalid credentials from an inference-only block. Balances/subscriptions are active. Reissuing credentials did not resolve the condition.
This strongly suggests an account/workspace or upstream inference-policy block rather than an invalid key, model typo, endpoint mismatch, or insufficient balance. The same integration had previously completed live turns with nonzero usage before transitioning to this state.
Could a maintainer please clarify:
account_suspended,workspace_blocked, orupstream_policy_blocked) instead of a generic 401 so clients do not misdiagnose this as an invalid key?I will not post API keys or full account identifiers in this public issue, but can provide them privately to the team.
neriousy commentedon Oct 1, 2026
Closing as a duplicate of #38218. Same "Request blocked by upstream provider" 401. This error comes from OpenCode's own gateway (a blocked workspace), not from an upstream provider. Account unblocks and refunds are handled per workspace, so please contact support (help@anoma.ly) with your workspace ID. You may also want to edit your email out of the issue body.