Skip to content

[Bug] OpenCode Go: return 401 Request blocked by upstream provider — chat/completions blocked while /v1/models works #38257

Closed as duplicate

Description

@lizijiangyyjx

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 curl to 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

Activity

  1. github-actions commented on Jul 22, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    These issues report the same symptom — chat/completions returning 401 Request blocked by upstream provider while /v1/models works fine — for Go subscription users starting today.

  2. gopalkalaleat-sudo commented on Jul 22, 2026

    @gopalkalaleat-sudo

    这没有办法解决么?

  3. Dante926 commented on Jul 22, 2026

    @Dante926

    这没有办法解决么?

    目前看来是 opencode 的模型服务提供有问题了。只能等官方解决了

  4. xiaoyixiaoba commented on Jul 22, 2026

    @xiaoyixiaoba

    Is it possible that the account has been disabled? I noticed that this issue doesn’t occur in all accounts.
    是不是账号被禁用了?我发现并非所有账号都出现这个问题

  5. Dante926 commented on Jul 22, 2026

    @Dante926

    Is it possible that the account has been disabled? I noticed that this issue doesn’t occur in all accounts.账户可能被禁用了吗?我注意到这个问题并非所有账户都会出现。 是不是账号被禁用了?我发现并非所有账号都出现这个问题

    看起来不像是账号禁用的问题。opencode 不像 anthropic 和 OpenAI 属于商业 AI 范畴,禁用账号是出于政策原因。我身边也有朋友是订阅了 GO 还正常能用的,现在还不完全知道问题所在

  6. SZipC commented on Jul 22, 2026

    @SZipC

    是否有可能该帐户已被禁用?我注意到这个问题并不是所有账户都会出现。账户可能被取消了吗?我注意到这个问题并不是所有账户都会出现。是不是账号被取消了?我发现并不是所有账户都出现这个问题

    看起来不是账号取消的问题。opencode 不是 anthropic 和 OpenAI 属于商业 AI 星球,取消账号是因为政策原因。我身边也有朋友是订阅了 GO 还能正常用的,现在完全不知道问题在哪里

    我看有很多人提这个问题,但是我现在还没有看到解决方法或者是原因,我甚至不知道是不是我账号的原因

  7. tcszh commented on Jul 22, 2026

    @tcszh

    I have the same problem in Uganda.

  8. Dante926 commented on Jul 22, 2026

    @Dante926

    是否有可能该帐户已被禁用?我注意到这个问题并不是所有账户都会出现。账户可能被取消了吗?我注意到这个问题并不是所有账户都会出现。是不是账号被取消了?我发现并不是所有账户都出现这个问题

    看起来不是账号取消的问题。opencode 不是 anthropic 和 OpenAI 属于商业 AI 星球,取消账号是因为政策原因。我身边也有朋友是订阅了 GO 还能正常用的,现在完全不知道问题在哪里

    我看有很多人提这个问题,但是我现在还没有看到解决方法或者是原因,我甚至不知道是不是我账号的原因

    别怀疑自己,这大面积的 401.一定是服务商有问题了

  9. angellfear commented on Jul 22, 2026

    @angellfear

    +1

  10. Tangmjiu commented on Jul 22, 2026

    @Tangmjiu

    +1

  11. gopalkalaleat-sudo commented on Jul 22, 2026

    @gopalkalaleat-sudo

    Is it possible that the account has been disabled? I noticed that this issue doesn’t occur in all accounts. 是不是账号被禁用了?我发现并非所有账号都出现这个问题

    看起来不像是ban账号,我看有人说他支付宝支付的也401了

    Image
  12. Tangmjiu commented on Jul 22, 2026

    @Tangmjiu

    Is it possible that the account has been disabled? I noticed that this issue doesn’t occur in all accounts. 是不是账号被禁用了?我发现并非所有账号都出现这个问题

    看起来不像是ban账号,我看有人说他支付宝支付的也401了

    Image

    现在官方也没出来回应,也不知道想干什么,目前网上关于这个报错的信息就那几个文章

  13. gopalkalaleat-sudo commented on Jul 22, 2026

    @gopalkalaleat-sudo

    Is it possible that the account has been disabled? I noticed that this issue doesn’t occur in all accounts. 是不是账号被禁用了?我发现并非所有账号都出现这个问题

    看起来不像是ban账号,我看有人说他支付宝支付的也401了
    Image

    现在官方也没出来回应,也不知道想干什么,目前网上关于这个报错的信息就那几个文章
    没办法的事,歪果仁的服务意识真的很一般

  14. Tangmjiu commented on Jul 22, 2026

    @Tangmjiu

    Is it possible that the account has been disabled? I noticed that this issue doesn’t occur in all accounts. 是不是账号被禁用了?我发现并非所有账号都出现这个问题

    看起来不像是ban账号,我看有人说他支付宝支付的也401了
    Image

    现在官方也没出来回应,也不知道想干什么,目前网上关于这个报错的信息就那几个文章
    没办法的事,歪果仁的服务意识真的很一般

    Deepseek 早上联网搜索也爆了,但是很快就解决了,这帮老外真的是,无语😓

  15. 26 remaining items

  16. suse-coder commented on Jul 30, 2026

    @suse-coder

    same problem still. Please urgently fix.

  17. juanmah98 commented on Jul 31, 2026

    @juanmah98

    API key authenticates successfully (opencode models lists 60+ Zen models) but all chat completions fail with AuthError: Request blocked by upstream provider. Direct curl confirms same error without OpenCode. Recreated account, new keys — identical result. Direct provider keys (DeepSeek, Anthropic) work fine.

  18. winqihe commented on Aug 2, 2026

    @winqihe

    Image 我也是遇到这个,现在是什么情况,有官方出来说下吗

  19. Sanjay-doppalapudi commented on Aug 6, 2026

    @Sanjay-doppalapudi

    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.

  20. BeliliFahem commented on Aug 7, 2026

    @BeliliFahem

    Same issue here — paying OpenCode Go subscriber, all Go-tier models blocked since 2026-07-22 while free models work.

    Verified reproduction (own account):

    • GET /zen/go/v1/models → 200 OK (key valid, full model list)
    • POST /zen/go/v1/chat/completions (model deepseek-v4-flash) → 401 {"type":"error","error":{"type":"AuthError","message":"Request blocked by upstream provider."}}

    Account state: Go subscription active, all usage limits (hourly/weekly/monthly) sufficient, API key valid — also tried a freshly generated key, same result. /v1/models works while chat/completions is blocked, so the key itself is fine; the block happens server-side on the upstream provider call.

    Affected models (all same error): deepseek-v4-pro, deepseek-v4-flash, kimi-k2.6, glm-5.2, minimax-m3, etc.

    Paying users are currently unable to use the service they subscribe to. Any update / ETA on a fix, and will there be compensation (prorated refund) for the downtime?

  21. chanada440824 commented on Aug 9, 2026

    @chanada440824

    Hi, I'm experiencing the same issue and I've gathered additional evidence.

    Account: subscribed to OpenCode Go

    • Workspace: "default" (top-left of console)
    • Go page shows subscription as ACTIVE
    • API key is active in the console, and it matches what's stored in auth.json

    I verified with curl directly (no client involved):

    1. GET https://opencode.ai/zen/go/v1/models → HTTP 200 (OK)

    2. POST https://opencode.ai/zen/go/v1/chat/completions
      with "Authorization: Bearer " → HTTP 401
      {"type":"error","error":{"type":"AuthError","message":"Invalid API key."}}

    3. POST https://opencode.ai/zen/v1/chat/completions (free model, same key)
      → HTTP 401 Invalid API key. (free models fail too)

    4. Also observed during an outage window (Aug 9, ~06:00-14:00 UTC?):
      even requests WITHOUT any API key returned HTTP 500
      {"type":"error","error":{"type":"error","message":"Internal server error"}}
      The gateway recovered later and now returns 401 again.

    My key, workspace, and subscription all look correct on the console side,
    so this appears to be a server-side account/subscription issue, not a
    client configuration problem. Please check whether my account/subscription
    was flagged on the backend. Could I get my subscription activated or
    extended? I've already paid but can't use any Go models.

    Windows, OpenCode 1.18.15, subscription via GitHub account
    chanada0824@outlook.com.

  22. huashuhuashu720 commented on Aug 9, 2026

    @huashuhuashu720
  23. winqihe commented on Aug 12, 2026

    @winqihe

    你们都是怎么处理的呀,这个月到期了,后面一直用不上

  24. chanada440824 commented on Aug 19, 2026

    @chanada440824
  25. huashuhuashu720 commented on Aug 19, 2026

    @huashuhuashu720
  26. zxc8976 commented on Aug 24, 2026

    @zxc8976

    I’m experiencing the same issue as of Aug 24, 2026.

    My OpenCode Go subscription/workspace is active, but multiple Go models all return HTTP 401 with an account-blocked response.

    Tested models include Ox Alpha Free, Muse, and MiMo. All three fail with the same account-level response, so this does not appear to be a model-specific failure.

    Workspace: wrk_01KNNJ7DYWHXV1VZKNMYFBVHFP

    Cloudflare Ray IDs:
    a302c84b794ca344-SEA
    a302c84f3e0a935e-SEA
    a302c851edf4a32e-SEA

    I have already contacted help@anoma.ly and requested a manual review.

    No API keys or OAuth credentials are included here.

    Could the OpenCode team please confirm whether this is an automated account-level enforcement issue and manually review the affected workspace?

  27. huashuhuashu720 commented on Aug 24, 2026

    @huashuhuashu720
  28. zxc8976 commented on Aug 24, 2026

    @zxc8976

    你可以思考一下你是否有以下的問題,比如說使用登入的帳號,例如Google帳號,風控評價等級高,或者說分發使用,亦或者是購買的低價帳號,尤其是購買的低價帳號,很有可能是做黑產的人透過盜刷信用卡的方式充值的。
    …

    ---原文--- 寄件者:@.> 日期:2026年8月24日 星期一 下午10:12 收件者:@.> 副本:@.@.> 主題:回覆:[anomalyco/opencode] [Bug] OpenCode Go:返回 401 要求上游/els可以正常工作(問題#38257) zxc8976 發表了評論 ( anomalyco/opencode#38257 ) 我從 2026 年 8 月 24 日起也遇到了同樣的問題。我的 OpenCode Go 訂閱/工作區處於啟動狀態,但多個 Go 模型都會回傳 HTTP 401 錯誤,並提示帳戶被封鎖。測試的模型包括 Ox Alpha Free、Muse 和 MiMo。這三個模型都傳回相同的帳戶層級回應,因此這似乎不是模型特有的問題。工作區:wrk_01KNNJ7DYWHXV1VZKNMYFBVHFP Cloudflare Ray ID:a302c84b794ca344-SEA a302c84f3e0a935e-SEA a302c851edf4a32e-SEA 我已聯繫 @Sea. 並請求人工審核此處未包含任何 API 金鑰或 OAuth 憑證。 OpenCode 團隊能否確認這是否是自動帳戶層級強制執行問題,並手動審核受影響的工作區? — 直接回覆此郵件,在 GitHub 上查看,或取消訂閱。您收到此郵件是因為您發表了評論。郵件 ID:@.***>

    我是自己的帳號並且使用自己的信用卡購買 已經用了4個月 只是這幾天ox alpha高頻率使用而我在discord跟rebbit也看到這兩天有其他人發生類似狀況

  29. neriousy commented on Oct 1, 2026

    @neriousy
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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