Repository navigation
Description
Environment
- opencode 1.18.29 and 1.18.32, both affected
- Windows 11 x64
- Built-in
opencodeprovider (zen Console), free-tier models - No custom agents, no plugins, no permissions config
What happens
With this in a project's opencode.jsonc:
{
"$schema": "https://opencode.ai/config.json",
"tools": {
"read": false
}
}every request to every zen free-tier model fails with:
Error from provider (Console): OpenCode's free tier can only be used from within OpenCode
The request comes from opencode itself. What changes is the tools array: with read disabled, the request sent to zen no longer contains it, and the free-tier gate rejects it as if it came from outside opencode. The gate runs on zen's side and I can't read its code, but the 9router maintainers bisected the same behaviour from their side: decolua/9router#4101 documents that free-tier requests with 0-3 tools, or missing the required tool set that includes read, get refused, while requests carrying it get 200.
Reproduction
- Empty project directory,
opencode.jsonccontaining only the config above. opencode run -m opencode/mimo-v2.6-flash-free "Reply with exactly: ok"gives the 403.- Delete the
"tools"block, or just the"read": falseline, and the same request succeeds.
Same client, same machine, same session throughout:
tools config |
Model | Result |
|---|---|---|
| none | mimo-v2.6-flash-free | 200 |
write/edit/apply_patch: false, read enabled |
mimo-v2.6-flash-free | 200 |
read: false only |
mimo-v2.6-flash-free | 403 |
read/write/edit/apply_patch: false (my actual repo config) |
mimo-v2.6-flash-free, ling-3.0-flash-fin-free, nemotron-3.5-lightning-free, big-pickle | 403 |
So disabling edit/write/apply_patch is harmless. The only thing that matters is read.
What I expected
The gate should not care which tools the config enables, or the tools.* option should say it breaks the free tier. As it stands, a supported, documented config option quietly kills every free model for the whole project, and the error message blames the client for something the user configured.
Why I disable it
I use the lineage-mcp server for file operations. Its read/write tools report line-level external changes and append the AGENTS.md instruction files from parent directories up the stack once per session. The built-in tools do neither. So "tools": { "read": false, ... } is not some exotic setup for me, it's the documented way to get the built-ins out of the way.
If I have the option to remove the read tool, why would removing it be a free-tier violation? A request with fewer tools is still a request from opencode.
Related
- policy: deny shell * on custom agent breaks free tier with "can only be used from within OpenCode" #50627 (deny shell permission on a custom agent, same gate, same error)
- subagents: explore agent denied free tier can only be used from within OpenCode while running inside the CLI — general works with identical models #49723 (explore subagent tripped by the same check while general works)
- [Bug] "OpenCode's free tier can only be used from within OpenCode" error when using Custom Agents #50081, Server (1.18.31): Free tier zen models fail - User-Agent not forwarded to zen API #49756 (same error, other request-shape triggers)
Workaround
Re-enable read in projects where you want free models. That's it.
Activity
github-actions commentedon Sep 25, 2026
This issue might be a duplicate of existing issues. Please check:
readorshellpermissions are denied, triggering the same free-tier error.Mike-Rice commentedon Sep 30, 2026
Same underlying mechanism, but keyed on
bashrather thanread: withholding thebashtool makes the gate reject. On opencode 1.18.33 (V1), built-inopencodeprovider,opencode/big-pickle, empty project:permission.bash: "ask"→ workspermission.bash: "deny"(ortools.bash: false) →Error: OpenCode's free tier can only be used from within OpenCodeSo it is the tools array, not the model identity — consistent with the bisect here. Cross-ref #50627 (which isolates the
bashtool specifically, including built-in agents likeplan).thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊
bas01f commentedon Oct 17, 2026
Hi!
i am having this issue as of today using opencode 1.18.35 tho