OpenCode's costs concentrate in session length: LSP-enriched context and conversation history ride on every step, so late-session calls cost several times early ones. Compacting sessions, resetting per task, and routing routine steps to a cheaper model are the big three levers.
Session length is the cost multiplier: every appended step re-bills on the next call. Use compaction between work phases and fresh sessions per distinct task.
OpenCode switches providers per session trivially — run a value model (DeepSeek/Kimi-class) as the default and reserve the frontier model for sessions that need it.
OpenCode is many people's all-day driver, which is exactly the usage shape where per-token loses. One base-URL swap makes the whole workflow unmetered.
The provider-agnostic tactics (prompt caching, retry budgets, batch APIs) are in the general playbook.
Context accumulates: every tool result and message is resent with each new step, so a step late in a long session can cost several times an early one. Compaction and per-task resets flatten that curve.
For light use: an open-weight value model per-token (DeepSeek V4-class). For all-day use: a flat-rate unlimited endpoint — OpenCode's OpenAI-compatible provider support makes it a two-minute switch.
The structural version of all of this: run OpenCode on a flat monthly price with unlimited tokens, and the bill stops being a variable to manage. 2-minute OpenCode setup → · Best models for OpenCode →