Skip to content

[Zen] AuthError: "Request blocked by upstream provider" — all Zen models broken, account recreated #39827

Description

@juanmah98

Description

All OpenCode Zen models return AuthError: Request blocked by upstream provider.every single model, both paid and free. This is NOT a client-side issue. Direct provider API keys (DeepSeek, Anthropic) work perfectly.

Steps to reproduce

  1. Connect OpenCode Zen via /connect with a valid API key
  2. Run any Zen model:
    opencode run "hola" --model opencode/deepseek-v4-pro
  3. Or test the Zen API directly with curl:
curl -H "Authorization: Bearer <zen-api-key>" \
     -H "Content-Type: application/json" \
     -d '{"model":"gpt-5.4-nano","messages":[{"role":"user","content":"hola"}]}' \
     https://opencode.ai/zen/v1/chat/completions
4. Response: {"type":"error","error":{"type":"AuthError","message":"Request blocked by upstream provider."}}

Zen models should respond normally with valid API keys.

All Zen models return the same AuthError — including:
- opencode/gpt-5.4-nano (auto-used for session titles)
- opencode/deepseek-v4-pro (paid)
- opencode/minimax-m3-free (free)
Environment
- OS: Windows 11
- OpenCode version: 1.18.9 (latest)
- Shell: PowerShell 7

What I've already tried (none helped)
- Recreated Zen account from scratch
- Generated new API keys multiple times
- Cleared OpenCode cache (%USERPROFILE%\.cache\opencode)
- Cleared OpenCode storage (%USERPROFILE%\.local\share\opencode)
- Tested with curl directly (bypassing OpenCode entirely) — same error
- Rolled back to older OpenCode version — same error
- Direct provider APIs work fine (DeepSeek direct key, Anthropic direct key)

Evidence
OpenCode log:
level=ERROR providerID=opencode modelID=gpt-5.4-nano
error="AI_APICallError: Request blocked by upstream provider."

Direct curl:
{"type":"error","error":{"type":"AuthError","message":"Request blocked by upstream provider."}}

Root cause analysis
Since ALL Zen models fail (different upstream providers: OpenAI, DeepSeek, MiniMax, etc.) and even a fresh account with new keys fails identically, the issue is likely in Zen's authentication/billing gateway layer — possibly a corrupted tenant state or a platform-side block.


*** UPDATE *** 31/07/26
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.

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