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
- Connect OpenCode Zen via
/connect with a valid API key
- Run any Zen model:
opencode run "hola" --model opencode/deepseek-v4-pro
- 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.
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
/connectwith a valid API keyopencode run "hola" --model opencode/deepseek-v4-pro