anomalyco / anomalyco/opencode

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

Open
#39,215 3 comments 3 reactions 1 assignee View on GitHub

@MrMushrooooom is already working on this.

Since Jul 28, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

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: #38218, #38216, #38190, #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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.