Token costs / Models
Where your AI coding token bill comes from
Context, output, caching, and provider pricing all shape the cost of a coding session. Here is what to look for.
Context is part of the bill
A coding agent sends more than your latest prompt. Relevant code, project instructions, conversation history, and tool results can all become input to a model request. As the work continues, that context can account for a substantial share of the tokens used.
The price depends on the request
Input and output tokens can have different rates. Cached input can have another rate again, depending on the provider and its caching rules. To compare costs, look at the full request mix rather than one advertised price.
Measure a useful outcome
A lower token price is helpful when the provider can still complete the work reliably. Track the cost of a finished, checked task, including retries. Keep your chosen model, provider requirements, and actual usage in view when deciding which setup works for your project.
