Skip to content

[Bug] OpenCode Go — "Request blocked by upstream provider" (HTTP 401) on all models despite active subscription #39215

Description

@jcastillovnz

Description

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
  • Subscription: OpenCode Go (active, usage at 0%)
  • Account: jcastillovnz@gmail.com
  • API Key (last 4 chars): Z22l (newly generated on 2026-07-27)

Steps to Reproduce

  1. Open OpenCode or run a curl request against the Go endpoint.
  2. Send any chat/completion request to any model.
  3. Receive HTTP 401 with AuthError: Request blocked by upstream provider.

Plugins
None (clean config — only $schema and shell defined in opencode.jsonc)
OpenCode version
1.18.7
Steps to reproduce

  1. Open OpenCode Desktop (v1.18.7) or run a curl request against the Go endpoint.
  2. Send any chat/completion request to any model (tested: deepseek-v4-flash, glm-5, qwen3.6-plus, kimi-k2.7-code).
  3. Receive HTTP 401 with: {"type":"error","error":{"type":"AuthError","message":"Request blocked by upstream provider."}}
    Curl reproduction command:
    curl -s -w "\nHTTP: %{http_code}" "https://opencode.ai/zen/go/v1/chat/completions"
    -H "Authorization: Bearer sk-u9TS...Z22l"
    -H "Content-Type: application/json"
    -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"hi"}],"stream":false}'
    Key finding: GET /models returns HTTP 200 (key is valid), but POST /chat/completions returns HTTP 401 (blocked).
    Two different API Keys tested with the same result — this is an account-level block, not a key issue.
    Related issues: bug(opencode-go): All subscription models return "Request blocked by upstream provider" #38218, Request blocked by upstream provider. #38216, Request blocked by upstream provider. #38190, [Bug] OpenCode Go: return 401 Request blocked by upstream provider — chat/completions blocked while /v1/models works #38257
    Screenshot and/or share link

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions