You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
All paid OpenCode Zen models fail with 'Upstream request failed' — free models work #36506
All paid OpenCode Zen models (e.g., opencode/MiniMax-M3, opencode/deepseek-v4-flash, etc.) fail with "Error from provider (Console): Upstream request failed". Free Zen models (e.g., opencode/big-pickle, opencode/deepseek-v4-flash-free) work fine. OpenCode Go models also work fine.
Environment
OpenCode version: latest (just upgraded)
OS: Linux (Pop!_OS)
Zen balance: $19.60 (from $52 total deposits, see payment history below)
Free models work: ✅ yes
Paid models fail: ❌ all of them
Payment History
Date
Amount
Jul 12, 1:13 PM
$10.00
Jul 7, 10:47 AM
$12.00
Jun 9, 5:18 PM
$5.00
May 4, 3:48 PM
$10.00
Apr 30, 10:16 PM
$10.00
Apr 6, 1:38 PM
$5.00
Total deposited: $52.00 | Remaining balance: $19.60
Steps to Reproduce
Connect OpenCode Zen provider via /connect
Select any paid Zen model (e.g., opencode/MiniMax-M3)
Send a message
Observe error: "Error from provider (Console): Upstream request failed"
Suspected Root Cause
This looks similar to issue #28129 where upstream provider accounts used by the Zen backend are depleted or restricted. Free models use different upstream providers (NVIDIA, Cohere, etc.) which is why they still work. The Zen backend's upstream accounts for paid models need to be refilled.
Logs
Available at ~/.local/share/opencode/log/ on request.
Environment: macOS (Darwin arm64), OpenCode 1.18.3 (just upgraded from 1.17.11), Zen provider connected via API key from opencode.ai/auth
Balance: Positive ($19.60+ remaining)
Key findings:
Direct curl to https://opencode.ai/zen/v1/chat/completions with a paid model (both deepseek-v4-flash and claude-sonnet-5) works fine with HTTP 200 — the upstream Zen API itself is healthy.
The same paid model fails when called through the opencode client — same API key, same model.
Free models (deepseek-v4-flash-free) work fine through both curl and the client.
The client logs show: failed to load OpenCode provider config — HttpClientError: StatusCode: non 2xx status code (401 GET https://console.opencode.ai/api/config) — the Zen API key (sk-...) is rejected by the Console API.
So the flow seems to be:
Free models (cost=0) → skip billing validation → call Zen API directly → ✅ works
Paid models (cost>0) → client tries to validate via console.opencode.ai/api/config → gets 401 → returns "Upstream request failed" without ever hitting the Zen API
This matches the theory in the issue — the routing/billing validation layer between the client and the Zen API is broken, not the Zen API itself. cc @fwang@StarpTech
Debug Info - Previously I only started the sessions with the MCP connected where it failed, started this session without MCP and it was successful. Connected the MCP mid-session and it failed. Then I switched to DS4Flash in the same session with the MCP still connected as a test and it worked. Only Kimi K3 seems to have issues with it:
The paid/free split makes it worth separating account entitlement from the paid-model upstream pool. Capture a request ID and the resolved provider/model route for one paid failure and one free success; the decisive question is whether paid requests reach a selected upstream and fail there, or are rejected before routing. That also lets the client return a meaningful unavailable/entitlement error instead of a generic “Upstream request failed.”
Errors in the log (~/.local/share/opencode/log/opencode.log) are all AI_APICallError: Upstream request failed: Endpoint is unavailable. clustered for 8 minutes, then stopped.
The paid/free split and the remaining Zen balance make this look more like a provider/accounting boundary than a model capability issue. I’d capture upstream status/request IDs and whether any balance was reserved before retrying; for users, a clearly reported compatible-provider fallback is safer than silently replaying a failed paid request. Full disclosure: I’m building Your Model, an OpenAI-compatible multi-provider API. If an external endpoint would help isolate this, I’m happy to provide test credits.
Reacted by twsl, Alejandro Maguey, Daniel Radu and cado
The paid/free split and the remaining Zen balance make this look more like a provider/accounting boundary than a model capability issue. I’d capture upstream status/request IDs and whether any balance was reserved before retrying; for users, a clearly reported compatible-provider fallback is safer than silently replaying a failed paid request. Full disclosure: I’m building Your Model, an OpenAI-compatible multi-provider API. If an external endpoint would help isolate this, I’m happy to provide test credits.
I disagree it is an upstream issue, as it happens consistently across multiple providers models on the OpenCode gateway. I dislike you're using this legitimate issue to sell whats effectively a competitor to OpenCode Zen
Thanks for the report, and sorry for the disruption. This was a temporary problem with the hosted service or an upstream model provider, and it has since recovered. You can see live status and past incidents at https://status.opencode.ai. If you still see this now, please open a new issue with the time (with timezone), model, and request ID from the console logs.
Activity
matiasfha commentedon Jul 16, 2026
Same issue here. Adding more diagnostic data:
Environment: macOS (Darwin arm64), OpenCode 1.18.3 (just upgraded from 1.17.11), Zen provider connected via API key from
opencode.ai/authBalance: Positive ($19.60+ remaining)
Key findings:
curltohttps://opencode.ai/zen/v1/chat/completionswith a paid model (bothdeepseek-v4-flashandclaude-sonnet-5) works fine with HTTP 200 — the upstream Zen API itself is healthy.deepseek-v4-flash-free) work fine through both curl and the client.failed to load OpenCode provider config — HttpClientError: StatusCode: non 2xx status code (401 GET https://console.opencode.ai/api/config)— the Zen API key (sk-...) is rejected by the Console API.So the flow seems to be:
console.opencode.ai/api/config→ gets 401 → returns "Upstream request failed" without ever hitting the Zen APIThis matches the theory in the issue — the routing/billing validation layer between the client and the Zen API is broken, not the Zen API itself. cc @fwang @StarpTech
StarpTech commentedon Jul 16, 2026
Hi, in case of issues, please upgrade to the latest version and share the information behind
/debugcommand. Thank you!matiasfha commentedon Jul 16, 2026
Running latest versions
Version: 1.18.3 (latest)
Date: 2026-07-16T22:04:10.321Z
OS: macOS 24.6.0 (arm64)
Terminal: xterm-kitty
Session ID: n/a
Model: opencode/deepseek-v4-flash
StarpTech commentedon Jul 16, 2026
You need to run
/debugin the next session where you experience the issue.matiasfha commentedon Jul 17, 2026
Thas was run starting a session
This is for a new session
royhananwar commentedon Jul 17, 2026
got same issue but with opencode go kimi 3 model
StarpTech commentedon Jul 17, 2026
@royhananwar Hello, after inspection, we see the following provider error
Do you overwrite it? I tried Kimi K3, and it works fine.
alpharald commentedon Jul 18, 2026
Kimi K3 seems to fail for me with the 'Error from provider (Console Go): Upstream request failed' message whenever I am connected to the xcode MCP.
opencode.config:
Debug Info - Previously I only started the sessions with the MCP connected where it failed, started this session without MCP and it was successful. Connected the MCP mid-session and it failed. Then I switched to DS4Flash in the same session with the MCP still connected as a test and it worked. Only Kimi K3 seems to have issues with it:
I also just realized the macOS version is stated as 25.5.0 in the debug info but it actually is 26.5.2.
royhananwar commentedon Jul 18, 2026
@StarpTech Hey, I didn’t change or overwrite anything.
I tried on 2 different environments, one is my laptop and the second one is my server
I just installed opencode on my server and tried kimi 3 have the same results like in my laptop.
any idea why the temperature is not 1 ?
I actually don’t know where to change the temperature model 😅
xiaob1n commentedon Jul 27, 2026
same with kimi 2.7 code
Version: 1.18.4 (latest)
Date: 2026-07-27T01:28:14.423Z
OS: macOS 25.5.0 (arm64)
Terminal: Apple_Terminal 470.2
Session ID: ses_05ed3a17bffeODhuDTa1EYbvXK
Model: cliproxyapi/kimi-k2.7-code
AhmadEltobshy commentedon Aug 17, 2026
I’m experiencing a similar issue today, and it seems to affect Qwen models and a few other models as well.
At first, I thought the OpenCode server was down because I kept getting:
However, when I switched to Zen - DeepSeek V4 Flash Free, everything worked fine.
Here’s my debug information:
Version: 1.18.18 (latest)
Date: 2026-08-17T00:49:08.129Z
OS: Windows 10.0.22631 (x64)
Terminal: unknown
Session ID:
ses_ff2f4e1a4ffeIUYrddDK3ITJFlModel:
opencode-go/qwen3.7-plusTriumph1701 commentedon Aug 17, 2026
The paid/free split makes it worth separating account entitlement from the paid-model upstream pool. Capture a request ID and the resolved provider/model route for one paid failure and one free success; the decisive question is whether paid requests reach a selected upstream and fail there, or are rejected before routing. That also lets the client return a meaningful unavailable/entitlement error instead of a generic “Upstream request failed.”
lukeocodes commentedon Aug 18, 2026
Happening today still. Doesn't feel like a CLI issue, but a service one. If I let it retry enough, eventually requests go through.
Version: 1.18.15 (latest)
Date: 2026-08-18T12:19:37.341Z
OS: macOS 25.5.0 (arm64)
Terminal: ghostty 1.3.1
Session ID: ses_feb30583affeGHPjORYcbWZnq8
Model: opencode/deepseek-v4-flash
lukeocodes commentedon Aug 18, 2026
Errors in the log (~/.local/share/opencode/log/opencode.log) are all
AI_APICallError: Upstream request failed: Endpoint is unavailable.clustered for 8 minutes, then stopped.Triumph1701 commentedon Aug 22, 2026
The paid/free split and the remaining Zen balance make this look more like a provider/accounting boundary than a model capability issue. I’d capture upstream status/request IDs and whether any balance was reserved before retrying; for users, a clearly reported compatible-provider fallback is safer than silently replaying a failed paid request. Full disclosure: I’m building Your Model, an OpenAI-compatible multi-provider API. If an external endpoint would help isolate this, I’m happy to provide test credits.
lukeocodes commentedon Aug 24, 2026
I disagree it is an upstream issue, as it happens consistently across multiple providers models on the OpenCode gateway. I dislike you're using this legitimate issue to sell whats effectively a competitor to OpenCode Zen
neriousy commentedon Oct 21, 2026
Thanks for the report, and sorry for the disruption. This was a temporary problem with the hosted service or an upstream model provider, and it has since recovered. You can see live status and past incidents at https://status.opencode.ai. If you still see this now, please open a new issue with the time (with timezone), model, and request ID from the console logs.