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
Thanks for the report! The issue body is empty, and several different problems produce Upstream request failed: Invalid credential. To tell which one this is, could you share:
Your OpenCode version (opencode --version), your OS, how you installed it, and whether you use the TUI, opencode run, the desktop app or something else.
The provider and model you're using (e.g. opencode/... free models, opencode-go/..., or another provider), and whether every model fails or only some.
How you're authenticated: the output of opencode auth list with keys and emails removed, whether OPENCODE_API_KEY is set (just yes or no, please don't paste the value), and any provider/providers entry in your opencode.json/opencode.jsonc (keys removed), especially a baseURL.
What you did right before the error appeared and when it started (for example, after an update or after opencode auth login/logout).
You can reply here with the details or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done.
These existing issues show the same error. They're ordered from most to least likely, so please check whether one of them already covers your problem:
all models "Error: Upstream request failed: Invalid credential" #54833: every model fails with this error on 2.0.27, even when not signed in. The cause was on the service side (a new inference endpoint). Some users fixed it by setting "provider": { "opencode": { "options": { "baseURL": "https://opencode.ai/zen/v1" } } } in opencode.json
We're closing this for now. The issue only has a title, and we haven't heard back since we asked for your version, provider/model and auth setup. Several different problems cause Upstream request failed: Invalid credential, so we can't tell which one this is without those details.
If none of these match, reply here with your opencode --version, OS, provider and model, and what you did before the error. We can reopen it then, or you can open a new issue with those details.
Activity
opencode-agent commentedon Oct 18, 2026
Thanks for the report! The issue body is empty, and several different problems produce
Upstream request failed: Invalid credential. To tell which one this is, could you share:opencode --version), your OS, how you installed it, and whether you use the TUI,opencode run, the desktop app or something else.opencode/...free models,opencode-go/..., or another provider), and whether every model fails or only some.opencode auth listwith keys and emails removed, whetherOPENCODE_API_KEYis set (just yes or no, please don't paste the value), and anyprovider/providersentry in youropencode.json/opencode.jsonc(keys removed), especially abaseURL.opencode auth login/logout).You can reply here with the details or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done.
These existing issues show the same error. They're ordered from most to least likely, so please check whether one of them already covers your problem:
"provider": { "opencode": { "options": { "baseURL": "https://opencode.ai/zen/v1" } } }inopencode.jsonbaseURLforopencode-gois ignored on 2.0.31, so requests still go to opencode.ai and fail with this erroropencode auth login/logout, the background service keeps sending an empty API keyopencode runfails with this erroropencode-agent commentedon Oct 21, 2026
We're closing this for now. The issue only has a title, and we haven't heard back since we asked for your version, provider/model and auth setup. Several different problems cause
Upstream request failed: Invalid credential, so we can't tell which one this is without those details.If you're still seeing it, these may help:
"provider": { "opencode": { "options": { "baseURL": "https://opencode.ai/zen/v1" } } }inopencode.jsonbaseURLforopencode-gois ignoredopencode auth login/logoutIf none of these match, reply here with your
opencode --version, OS, provider and model, and what you did before the error. We can reopen it then, or you can open a new issue with those details.