anomalyco / anomalyco/opencode
Mid-session model resolution silently falls back to global config.model, ignoring the TUI-selected model (selected model receives zero traffic)
@nexxeln is already working on this.
Since Sep 8, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Environment
opencode v1.18.29
Summary
When a user selects a model via the TUI (e.g. Big Pickle via Zen), the interface confirms the selection — but zero requests ever reach that model's provider. All actual traffic is silently routed to whatever model is set in the global config.model field, regardless of the TUI selection.
Observed
- TUI shows "Big Pickle" as the active model for the entire session.
- The Zen activity dashboard (provider of Big Pickle,
opencode/big-pickle) shows zero requests for today — the last recorded usage was yesterday. - A third-party billing dashboard for a different, custom provider (
custom-provider/deepseek-v4-flash-0731— the value currently inconfig.model) shows 87 primary-agent turns with this exact same session id, including large context windows (29k→188k tokens), confirming these are real conversation turns — not subagent calls. - The local opencode log (
message=stream) confirms both providers appeared for the same session: early turns → Zen (Big Pickle), later turns →custom-provider(deepseek-v4-flash-0731) — all while TUI continued showing Big Pickle.
Timeline (same session, one day)
providerID=Zen modelID=big-pickle 251 turns
providerID=custom modelID=v4-flash-0731 87 turns (primary agent=build)
Zen dashboard shows last usage = yesterday. Custom provider dashboard shows 87 primary turns today for the same session. Zero traffic reached Big Pickle today despite the TUI showing it as selected.
Expected
When the user selects Big Pickle in the TUI, all primary-agent requests should be sent to the Zen provider (opencode/big-pickle). Fallbacks to the global config.model should only occur when no model is explicitly selected.
Actual
The engine ignores the TUI-selected model and routes requests to config.model (a different provider/model entirely). The TUI continues to display the selected model, giving no indication that traffic is going elsewhere. There is no error, no warning, no log entry indicating the fallback happened.
Config (anonymized)
{
"model": "custom-provider/deepseek-v4-flash-0731", // <-- all traffic goes here
"small_model": "custom-provider/deepseek-v4-flash"
}
The user had explicitly selected Big Pickle in the TUI, but config.model silently overrides it.
Workaround
Set config.model to the same model you actually use in the TUI, so any fallback lands on the intended provider. This defeats the purpose of the model picker but prevents silent misrouting.
Related
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.