Skip to content

Free-tier models rejected with FreeTierError in plan agent, same models work in build agent #53885

Closed as not planned

Description

@AlexanderKuzikov

Description

Free-tier models (opencode/*-free, opencode/big-pickle) are rejected with FreeTierError when used by the plan agent, while the identical models work fine in the build agent — same machine, same official client, same session timeframe.

This looks like the free-tier entitlement check misclassifying the plan-agent request path, same signature as #49723 (which was about the explore agent).

Repro (CLI, deterministic, 3 runs in a row)

> plan · mimo-v2.6-flash-free
Error: Error from provider (Console): OpenCode's free tier can only be used from within OpenCode

> plan · muse-spark-1.3-contributor-free
Error: Error from provider (Console): OpenCode's free tier can only be used from within OpenCode

> build · mimo-v2.6-flash-free
ОК

Commands:

  1. opencode run --agent plan --model opencode/mimo-v2.6-flash-free "Ответь одним словом: ОК" → FreeTierError
  2. opencode run --agent plan --model opencode/muse-spark-1.3-contributor-free "Ответь одним словом: ОК" → FreeTierError
  3. opencode run --model opencode/mimo-v2.6-flash-free "Ответь одним словом: ОК" (build, default) → OK

Log excerpt (opencode.log)

level=ERROR message="stream error" providerID=opencode modelID=muse-spark-1.3-contributor-free small=false agent=plan mode=primary error.error="AI_APICallError: Error from provider (Console): OpenCode's free tier can only be used from within OpenCode"
level=ERROR message="stream error" providerID=opencode modelID=mimo-v2.6-flash-free small=false agent=plan mode=primary error.error="AI_APICallError: Error from provider (Console): OpenCode's free tier can only be used from within OpenCode"

Environment

  • OpenCode CLI 1.18.35 (npm, latest at time of report)
  • OpenCode Desktop 1.18.35
  • Windows (win32), node v24.15.0
  • No custom opencode.json; auth has only third-party provider keys (free tier used keyless, as designed)

Expected

Plan agent with free-tier models is accepted the same way build agent is — or the error message states the actual restriction instead of claiming the request comes from outside OpenCode.

Activity

  1. opencode-agent commented on Oct 8, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report and the clear repro steps!

    OpenCode 1.18.35 is v1, and v1 only gets fixes for critical bugs (data loss, security problems, or breakage with no workaround). Free-tier models still work in the build agent, so this one is unlikely to be fixed in v1. We'd recommend upgrading to v2 (@opencode/cli), where active development happens.

    The same error is already tracked in these issues, ordered by how closely they match:

    Until then, a workaround: commenters on #49723 found the rejection seems to happen when an agent's shell/bash permission is denied or restricted, and removing that restriction made it work for them. Using the build agent (or a non-free model) for planning also works.

    If you think this is critical, or you can reproduce it on v2, please reply here with the v2 version and steps, ideally on #49723 so it's all in one place.

  2. opencode-agent commented on Oct 9, 2026

    @opencode-agent
    Contributor

    Closing as not planned. This was reported on OpenCode 1.18.35 (v1), and v1 only gets fixes for critical bugs. Free-tier models still work in the build agent, so this one doesn't qualify. We left the issue open for a day in case it turned out to be critical or also happened on v2, and haven't heard back.

    The free-tier rejection itself is still tracked in #49723 (see also #50627 and #52880). Until it's fixed, commenters there report that removing shell/bash permission restrictions from the agent avoids the error.

    If you can reproduce this on v2 (@opencode/cli), please add the version and steps to #49723. Thanks again for the clear report!

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions