Context
I started tracking my OpenCode usage carefully over an eight-day period while writing the cost engineering article. I expected the API bill to tell me something interesting. It did — just not what I expected.
What the Data Showed
| Metric | Value |
|---|---|
| Total cost | $32.73 |
| Sessions | 600 |
| Messages | 7,795 |
| Average cost / day | $4.09 |
| Input tokens | 36.2M |
| Output tokens | 2.6M |
| Cache reads | 474.4M |
Per-model breakdown:
| Model | Messages | Input Tokens | Cost | % of Total |
|---|---|---|---|---|
| GLM 5.2 | 587 | 9.0M | $21.46 | 65.6% |
| MiniMax M3 | 490 | 2.9M | $4.18 | 12.8% |
| DeepSeek Flash (paid) | 2,214 | 10.9M | $2.44 | 7.5% |
| DeepSeek V4 Pro | 152 | 822.9K | $1.87 | 5.7% |
| MiniMax M2.7 | 396 | 187.3K | $1.46 | 4.5% |
| Gemini 2.5 Flash | 143 | 3.0M | $1.18 | 3.6% |
| MiMo V2.5 (free) | 2,068 | 6.2M | $0.00 | 0.0% |
| DeepSeek Flash (free) | 588 | 2.0M | $0.00 | 0.0% |
Key Insight
The 36 million input tokens weren't from long prompts. The per-message average was unremarkable. The cost was coming from context that accumulated quietly across hundreds of sessions — files, conversations, logs, traces that I never cleared between problems.
GLM 5.2 alone accounted for 65.6% of total spend. That was the wake-up call that triggered the model-matching habits described in the main article.
Takeaway
The API bill doesn't tell you where your engineering time went. But it does tell you which models you're leaning on too heavily — and context size is almost always the hidden variable.