Quick answer
OpenCode stores a provider and model ID on every message, so usage can be grouped by both. Total tokens show volume; tokens per completed task show efficiency. A model with a low per-token price can still be the most expensive line if it needs more turns.
Group by provider before model
Model names repeat across providers. Grouping by provider first prevents two different models from collapsing into one line, and makes rate differences visible.
| Grouping | Question it answers | Pitfall |
|---|---|---|
| Provider | Where the spend goes | Hides model mix |
| Model | Which model is efficient | Collides across providers |
| Provider + model | Both at once | More rows to scan |
| Session | Which task was expensive | No cross-task view |
Measure efficiency, not just volume
- Count completed tasks per model for a week.
- Total tokens per model.
- Divide tokens by completed tasks.
- Apply each provider's rate to that token mix.
- Compare the cost per completed task, not the cost per token.
Act on the result
- Move mechanical edits to the cheapest model that finishes them.
- Keep the strong model for planning and debugging.
- Watch cache read share; a model with poor caching costs more on long sessions.
- Recheck after a provider changes pricing.
UsageAtlas shows the provider and model split for the same date range as the daily totals.
Read the model split before changing it
OpenCode lets you switch models per session, which is useful and hard on budgets. The split tells you whether the expensive model is doing most of the work or only the hard parts.
| Split | Likely habit | Next change |
|---|---|---|
| One model everywhere | Default never changed | Try a cheap model for searches |
| Cheap model only | Cost-first | Check whether retries erase the saving |
| Mixed by session | Deliberate | Compare per task |
| Mixed within sessions | Switching mid-task | Start separate sessions instead |
The tokens per request guide explains why a model switch mid-session can cost more than starting fresh.
Questions, answered
Does OpenCode report cost per model?
It records the model on each message and a cost value where the provider supplies one. Totals by model are a group-by over those records.
Why is one model missing from the breakdown?
Older messages may not include a model field, or the provider returned an unrecognised ID. Unknown rows are usually grouped together.
Can I compare OpenCode models with Codex models?
Yes, but use tokens per completed task and current rates. Raw token totals are not comparable across different workflows.