Skip to content

docs: misleading free-tier auth error has no documented fix #52917

Closed as duplicate

Description

@ludogms

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:

  1. 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 OpenCode No stored Console credential. Run opencode auth login opencode (or /connect). Reports a missing credential, not a restricted origin.
  2. 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:

  1. Run OpenCode with no stored credential for the OpenCode Console provider — opencode auth list shows no Console entry.
  2. Pick any model that provider serves via /models and send a prompt.
  3. 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:

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

  1. added
    needs:complianceThis means the issue will auto-close after 2 hours.
    and removed
    needs:complianceThis means the issue will auto-close after 2 hours.
    on Oct 3, 2026
  2. github-actions commented on Oct 3, 2026

    @github-actions
    Contributor

    Thanks for updating the issue with a clear description, reproducible steps, and system details!

  3. ludogms commented on Oct 3, 2026

    @ludogms
    Author

    Rewrote the body to use the Bug Report template — the Summary heading is replaced by the required ### Description field, 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 from KITTY_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.

  4. moobyfr commented on Oct 3, 2026

    @moobyfr

    Go to /settings, scroll down to Permissions and go from prompt to auto-accept, this is a workaround, the time to wait for a fix

  5. its-tahir commented on Oct 21, 2026

    @its-tahir

    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 read permission. 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. Setting read to "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.

  6. neriousy commented on Oct 27, 2026

    @neriousy
    Member

    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 OpenCode error and what to check. If you still see it on the latest v2, please comment there with the details listed in that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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