OpenCode Go: no model can be selected, and the engine is gated on a subscription the CLI does not require
Summary
The OpenCode Go engine cannot run a turn. Every model id it offers is rejected by the CLI, so the engine is unusable as shipped in 0.1.22.
The id mismatch is the visible failure, but it follows from a design choice worth revisiting: the driver is modeled on the Go subscription rather than on the OpenCode CLI. Those are not the same product, and the CLI is the one the driver actually talks to.
Every model id is rejected
server/drivers/acp/opencode-go.ts prefixes its ids with opencode-go/:
default: "opencode-go/minimax-m3",
options: ids.map((id) => ({ id: `opencode-go/${id}`, ... }))
The CLI has no such provider, and says so:
session/set_config_option { configId: "model", value: "opencode-go/minimax-m3" }
-32602 Invalid params: model not found: opencode-go/minimax-m3
data: { providerId: "opencode-go", modelId: "opencode-go/minimax-m3" }
Its OpenCode-hosted provider is called opencode:
$ opencode models | grep -c '^opencode-go/'
0
$ opencode models | grep '^opencode/'
opencode/big-pickle
opencode/deepseek-v4-flash-free
opencode/hy3-free
opencode/laguna-s-2.1-free
opencode/mimo-v2.5-free
opencode/nemotron-3-ultra-free
opencode/nemotron-3.5-lightning-free
All three defaults (opencode-go/minimax-m3, opencode-go/kimi-k3, opencode-go/glm-5.2) name a provider that does not exist, so the picker offers nothing that can be selected.
The same literal is reused for auth, so hasStoredOpenCodeGoAuth() reads auth.json["opencode-go"], a key the CLI does not write either.
The engine is built around the subscription, not the CLI
This is the part that matters more than the prefix.
The driver treats OpenCode as if it were the Go subscription service. It fetches its catalog from https://opencode.ai/zen/go/v1/models, and it gates availability on the Zen credential:
isAuthenticated: (env) => Boolean(env.OPENCODE_API_KEY) || hasStoredOpenCodeGoAuth(env)
ModelPicker greys the engine out when that returns false. So a user with a working OpenCode install and no Zen subscription sees a disabled engine.
But the CLI is a general agent harness. It serves whatever providers the user has configured, and it needs no Zen key to do it. On a machine with no OPENCODE_API_KEY set at all:
$ echo "${OPENCODE_API_KEY:-(unset)}"
(unset)
$ opencode models | wc -l
474
$ opencode models | awk -F/ '{print $1}' | sort | uniq -c | sort -rn
352 openrouter
48 openai
40 google
15 anthropic
7 opencode
5 ollama
4 deepseek
...
Only 7 of those 474 belong to the subscription the engine is gated on. The other 467 are the user's own providers, including local ones, and the current design makes all of them unreachable while requiring a credential that has nothing to do with them.
Fetching a fixed remote catalog also means the picker cannot reflect what the user actually has installed. The CLI already answers that question, both through opencode models and through the model config option returned by session/new.
Repro
opencode models | grep '^opencode-go/' # empty
opencode models | grep '^opencode/' # the real provider
Then in the app: enable OpenCode Go, pick any model, send a message. The turn fails on model selection.
To see the gate, unset OPENCODE_API_KEY and confirm the engine is greyed out while the CLI still lists its full catalog.
Environment
- OpenMausBot 0.1.22
- opencode CLI 1.18.18 (
opencode-ai, npm global) - Linux (Fedora)
Note
#147 is open and rewrites this driver to read the CLI's own catalog and drop the subscription gate, which addresses both points above.
Triage update: #147 is the active fix for the catalog mismatch and unnecessary subscription gate. Leaving this bug open until that PR is reconciled with current main and merged.
Alright, I fixed the conflicts.