From the first request to the last
A coding agent can call a model several times while opening a file, editing it and reading the test output. Each call can carry the operating instructions, tool descriptions and information collected so far. If the prefix is unchanged, a provider can reuse intermediate results from a cache instead of processing that part of the request again. New text, such as the test output, still has to go through the model before the agent takes its next step.[1]
OpenRouter puts the average charge for 1 million paid text tokens at 0.84 dollars on 5 January and 0.15 dollars on 16 November. It attributes a reduction equal to 47 percent of the starting price to caching and one of 30 percent to a shift toward cheaper open-weight models. A greater share of cache reads and lower rates for those reads can both pull down the average. OpenRouter groups them in the same part of the calculation.[1]
The bill for a finished job
Consider two agents given the same fix. One reads the file, makes the edit and passes the test. The other hits a failing test and brings the earlier work into another attempt. The second agent can rack up more reads at the discount rate. Each attempt still adds new input and a reply, so the agent with the cheaper average token can spend more on the job. The ranking by average price across requests can change when the unit becomes a fix that passes the tests.[1]
A comparison with the same file and the same acceptance test can tally fresh input, cached input and output from the first call through the final check. Spending on attempts that fail that check belongs in the cost of the task. End-to-end time can sit beside that figure. If an agent with a higher cache share takes more steps, the two measures show how much time and money it took to produce a usable change.[1]