Requesty
Back|AUG '26COST OPTIMIZATION / OBSERVABILITY
6 MIN READ|

86% of agent token burn is cached input: cache hit rate is the number that decides your bill

Last updated

There is a single number that predicts an agent's cost better than the model you picked, the provider you picked or the price per million tokens on the model card. It is the cache hit rate, and most teams have never looked at it.

Start with the scale. Agents now consume 7.3 trillion tokens a week on OpenRouter alone according to a16z data, a 14x rise in a year and more than five times human usage. And the composition is the part that matters: 86% of that agentic token burn is cached input.

Not new prompt. Not output. Repeated context, sent again and again as an agent loops: repository state, conversation history, system prompt, tool definitions, files it already read.

What providers charge for that

Because cached input is cheap to serve, providers price it far below fresh input. Two current examples:

Alibaba lists Qwen3.8-Flash at $0.15 per million input tokens and $0.016 per million on cache hits. That is a 9x gap.

One DeepSeek host publishes $0.12 per million on a cache miss and $0.003 on a cache hit. That is 40x.

Now combine the two facts. If 86% of your tokens are cache eligible, and a hit costs between a ninth and a fortieth of a miss, then your hit rate is not a performance detail. It is the dominant term in your bill.

The measured spread is enormous

This is not theoretical. Developers who bother to look find gaps that dwarf any model price difference.

One developer benchmarked the same coding workload across three surfaces and measured 96.0% and 96.3% cache hit on two of them and 19.2% on the third, on varied but comparable tasks. Identical model. Identical work. The third surface was charging close to full price on input that should have been nearly free.

At the other extreme, a small project publishing its own numbers reported a 7.5% cache hit rate and a resulting blended cost of $11.24 per million tokens. Read that blended figure against the $0.15 headline price of a modern Flash model. The gap between the sticker price and what you pay is cache behaviour.

And the cache is where runaway spend usually hides. The developer who documented 600 million tokens consumed in two days by an agent harness was explicit that the vast majority were cache reads rather than real work. The loop was not thinking. It was re sending context.

Three things that quietly destroy your hit rate

1. Invisible agents in your agent. The best example of the month: a developer traced their collapsing quota to a coding agent feature enabled in a point release that re read the whole conversation to approve each action, and measured it consuming 10.4 million tokens of quota in one week without being switched on deliberately. A separate thread found that unconstrained subagent spawning was the single largest quota drain and that disabling subagents produced large token savings while keeping the workflow usable. Every extra actor in the loop starts a fresh prefix.

2. Context stuffed with volatile noise. The sharpest piece of engineering writing in our corpus this month measured what was in an agent's context and found 84% of command output was noise nobody reads. One cargo test run wrote 188,298 bytes, about 47k tokens, of which the useful part was 669 bytes: three failing tests, the assertion, the totals, the exit status. The rest was 2,503 passing test names, panic traces printed twice and build chatter. Their conclusion is the right one: filter at execution time, because once 188KB is in the transcript the cost is already paid. Volatile output also pushes the stable prefix around, so it costs you twice.

3. Switching provider mid conversation. A cache lives on a specific host. Route turn one to provider A and turn two to provider B and turn two is a full price miss. This is a real tension with cost routing, and it is why users comparing an official API against a marketplace keep reporting that the cache miss issue makes the cheaper option more expensive sometimes. Provider affinity within a conversation matters more than the per token price of any single turn.

Why this reframes the subsidy argument

There is a popular claim that a $200 coding subscription must be burning thousands of dollars of API usage that the vendor is absorbing. A well argued r/codex post takes it apart using exactly this mechanism: retail API pricing is not the provider's cost, long coding sessions reuse enormous amounts of context, and cached input is already much cheaper even at public prices before you account for the provider's own economics.

Whether or not you accept the conclusion, the reasoning is correct and it applies to you. Hundreds of millions of tokens processed does not mean hundreds of millions of tokens computed. If you model your own costs on headline input price times token count, you will overestimate a well cached workload and badly underestimate a poorly cached one.

What to do, in order

Measure the rate before you change anything. Turn on automatic caching and then read the real hit rate out of usage analytics and cost tracking rather than assuming caching is working because it is enabled. For fine grained control on providers that expose explicit breakpoints, use manual caching and the Messages API caching support.

Stabilise the prefix. System prompt, tool definitions and any preamble must be byte identical turn to turn. No timestamps, no request IDs, no set iteration ordering. This one change moves more money than any model swap.

Filter tool output at execution time. Cap and summarise command output where the command runs. Aim for the failing assertions, not the passing test names.

Attribute per step, not per project. Use request metadata and analytics headers to tag agent steps, then look at which step is generating misses. Session reconstruction shows you the whole conversation as the model saw it, which is how you spot a prefix that moved.

Keep a conversation on one provider. Configure load balancing policies so cost routing happens at conversation start rather than per turn, and keep fallback policies for genuine failures.

Alert on the rate, not just on spend. A hit rate that drops from 95% to 40% overnight is a deployment regression, and it will show up as a gradual cost increase weeks before anyone investigates. Alerts and performance monitoring close that loop. We covered the budget side of this in how to cap runaway agent spend and alerts when your LLM spend spikes.

The uncomfortable implication

Most model cost comparisons published anywhere, including many of ours, quote input and output price. That comparison is close to meaningless for agent workloads without a hit rate attached, because a 40x variable sitting on 86% of volume swamps a 3x difference in headline price.

We made the same point from the model selection side in 36x the price for 22% more quality: the model is now the cheap part, and configuration is where the money goes. Caching is the largest single item in that configuration.

Before you migrate to a cheaper model, measure your hit rate. The saving is frequently already sitting in your current setup.

Compare live per token and cached pricing across providers in the models catalog and the cheapest rankings, or see how our pricing compares. If you are weighing routing layers on caching support specifically, we keep honest pages on OpenRouter, LiteLLM, Portkey and Helicone.

Start routing on Requesty and find out what you are paying full price for.

Frequently asked questions
How much cheaper is a cache hit than a cache miss?
It depends on the provider and it is a large multiple. Alibaba lists Qwen3.8-Flash at $0.15 per million input tokens but $0.016 per million on cache hits, roughly 9x. One DeepSeek host advertises $0.12 per million on a cache miss against $0.003 on a hit, which is 40x. Cached input is the cheapest token you will ever buy.
What cache hit rate should I expect on an agent workload?
A well configured coding agent with a stable prompt prefix reaches 90% or higher, and measurements of 96% are common. If you are below 50% on a long running agent loop, something in your setup is invalidating the prefix on most turns and that is a configuration bug, not a model characteristic.
Why is my cache hit rate low?
The usual causes are a prompt prefix that changes every turn, such as an injected timestamp or a reordered tool list, unstable system prompt assembly, switching provider mid conversation so the cache does not exist on the new host, and dumping large volatile command output into context which pushes the stable part past the cache boundary.
Does a cheap model with a bad cache beat an expensive model with a good one?
Often not. Cached input dominates agentic spend, so a 5x worse hit rate can erase the saving from a model that is 3x cheaper per token. Measure the blended cost per million tokens on your own traffic before concluding one model is cheaper for you.
Related reading

Start building with Requesty

One line of code. 600+ models. Full control.

Speak to founders