Repository navigation
Description
Description
With no stored OpenCode Console credential, every model request fails with:
AI.Error.Authentication: Error from provider (Console):
OpenCode's free tier can only be used from within OpenCode
The user is inside OpenCode, so the wording is wrong. This is an authentication failure that reads like a CORS/origin/install problem, which sends readers down the wrong path. The string free tier appears nowhere in the V2 docs, and the error text doesn't name the command that fixes it. I only found the fix in a third-party comment.
Two suggestions:
-
Add a row to the "Errors" table in
/docs/providers/— the place a reader hitting this would look:Error or symptom Check OpenCode's free tier can only be used from within OpenCodeNo stored Console credential. Run opencode auth login opencode(or/connect). Reports a missing credential, not a restricted origin. -
Put the recovery command in the runtime error text so the failure is self-describing when it appears outside the docs.
Plugins
None configured.
OpenCode version
2.0.22 (channel latest)
Steps to reproduce
Deterministic path:
- Run OpenCode with no stored credential for the OpenCode Console provider —
opencode auth listshows no Console entry. - Pick any model that provider serves via
/modelsand send a prompt. - The request fails with the error above.
Also seen without any config change: a working session began failing once a previously stored Console credential stopped being accepted.
Recovery, confirmed working:
opencode auth login opencode # OAuth flow, stores the credential
opencode auth list # Console entry then shows "stored"Screenshot and/or share link
No screenshot (headless session). Redacted excerpt from ~/.local/share/opencode/log/opencode.log:
level=ERROR message="Failed to drain Session"
cause="AI.Error: Error from provider (Console): OpenCode's free tier can only
be used from within OpenCode ... [cause]: AI.Error.Authentication"
role=server
Operating System
Debian 13 (trixie), kernel 6.12.111+deb13-amd64, x86_64
Terminal
Kitty on GNOME — TERM=xterm-256color, COLORTERM=truecolor, TERMINFO=/usr/lib/kitty/terminfo
Related issues
Flagged as a possible duplicate of #49433 and #52905. Both report the same error string, so this may be closed as a duplicate. The delta here is the diagnosis and the documentation gap, neither of which the other reports contain:
- Error from provider (Console): OpenCode's free tier can only be used from within OpenCode #49433 states the error with no repro and no resolution.
- [BUG] Official OpenCode Desktop 2.0.22 rejects free-tier models with "can only be used from within OpenCode" #52905 is scoped to the Desktop app on Windows.
What this report adds: the failure is an absent Console credential rather than an origin restriction, the one-command fix, and a verified search showing the error is absent from the V2 docs (checked /docs/providers/, /cli/providers/, /console/, /console/go/, /troubleshooting/, /models/, /console/inference/ — the string free tier appears on none of them). That last point is the actual ask; the error itself is already reported.
Activity
github-actions commentedon Oct 3, 2026
Thanks for updating the issue with a clear description, reproducible steps, and system details!
ludogms commentedon Oct 3, 2026
Rewrote the body to use the Bug Report template — the
Summaryheading is replaced by the required### Descriptionfield, and every template field is now filled (Plugins,OpenCode version,Steps to reproduce,Screenshot and/or share link,Operating System,Terminal). The environment values are measured, not assumed; the terminal is Kitty, detected fromKITTY_PID/TERMINFO=/usr/lib/kitty/terminfo.On the duplicate flag: agreed this overlaps #49433 and #52905 on the error string, so I've added a section spelling out the delta — the credential-vs-origin diagnosis, the one-command fix, and the verified absence of the error from the V2 docs. The documentation gap is the actual ask; the error itself is already on file.
moobyfr commentedon Oct 3, 2026
Go to
/settings, scroll down to Permissions and go fromprompttoauto-accept, this is a workaround, the time to wait for a fixits-tahir commentedon Oct 21, 2026
One data point on the cause: on v2.1.2, signed out with no config, free models worked for me (
opencode run --standalone, opencode/deepseek-v4.1-flash-free). On that version, a missing Console credential alone didn't produce this message.What did produce it: a denied
readpermission. I reproduced it with"permission": { "read": "deny" },{ "*": "deny" },"tools": { "read": false }, an agent-level read deny, and a read deny in a project's opencode.json. Settingreadto"ask"fixes it on the next request (table in #51241).So the docs row should list both causes: no login, and a read deny. It should point to
opencode debug config, which shows the rule and the file it comes from. The error says "only be used from within OpenCode", so people already in OpenCode don't think to check permissions.neriousy commentedon Oct 27, 2026
Please upgrade to the latest OpenCode v2 (currently 2.1.4) from https://opencode.ai/v2/docs.
Closing this as a duplicate of #59387, the main issue for free tier problems. That issue now covers the
OpenCode's free tier can only be used from within OpenCodeerror and what to check. If you still see it on the latest v2, please comment there with the details listed in that issue.