LLM Service Pricing Update: Why Cache Hit Rate Determines Your Real Cost
An LLM service pricing update is not simply a "price hike across the board." By breaking pricing into cached input, uncached input, and output tiers, providers are re-weighting costs to reward stable, reusable prefixes. This article explains the three-tier pricing structure, derives an effective token cost formula based on cache hit rate and input/output ratio, compares two representative workloads, and offers practical strategies for enterprise agents and individual developers to control real costs.
LLM Service Pricing Update: Why Cache Hit Rate Determines Your Real Cost
1. Understand the Pricing Structure First: It’s Not a Simple “Across-the-Board Increase”
Whether an LLM service has “raised prices” cannot be judged by looking at a single unit price. Mainstream services today typically split the cost of a call into three tiers:
- Cached input price: the price of input tokens when the prefix or context is reused;
- Uncached input price: the price of input tokens when a new context must be computed from scratch;
- Output price: the price of tokens generated by the model.
Looking at an illustrative price list, the output price of a new-generation service may rise from roughly 27 CNY per million tokens in the previous generation to 100 CNY — nearly 4x; uncached input may rise from about 6.5 CNY to 20 CNY, roughly 3x; and cached input may rise from about 1.1 CNY to 2 CNY, roughly 2x. On the surface, all three tiers are going up, but the increases are not synchronized: output rises the most sharply, while cached input rises relatively moderately.
More important is how the price ratios change. Suppose the previous generation priced uncached input at roughly 6x the cached input price, while the new generation widens that gap to about 10x; similarly, the ratio of output price to cached input price expands from roughly 25x to about 50x. This sends a clear pricing signal: calls that reuse a stable prefix are relatively encouraged, while calls with heavy output and low cache reuse will bear higher costs.
Therefore, seeing “output at 100 CNY and input at 20 CNY” does not mean every user’s cost multiplies several times over. Real cost depends on the structure of your workload.
2. The Real Cost Formula: Cache Hit Rate and Input/Output Ratio
Define:
p_hit: cached input price;p_miss: uncached input price;p_out: output price;h: cache hit rate, between 0 and 1;r: ratio of input tokens to output tokens, e.g.r=20for 20:1.
The blended cost per million tokens can then be approximated as:
p_in_eff = h * p_hit + (1 - h) * p_misscost_per_million = (r * p_in_eff + p_out) / (r + 1)
Here, p_in_eff is the effective weighted price on the input side. This formula tells us two things:
- The higher the cache hit rate, the closer the effective input price gets to the cached price;
- The larger the input/output ratio, the more weight the input side carries; the larger the output share, the more the output price dominates total cost.
The cost estimation logic in pseudocode:
function cost_per_million(p_hit, p_miss, p_out, hit_rate, in_out_ratio):p_in_eff = hit_rate * p_hit + (1 - hit_rate) * p_missreturn (in_out_ratio * p_in_eff + p_out) / (in_out_ratio + 1)
It is important to stress that cache hit rate is not a “default capability” — it is an engineering metric. It is affected by whether the system prompt is stable, whether tool definitions are fixed, whether long document prefixes are reused, whether sessions are isolated, cache expiration policies, cross-node scheduling, and other factors. Common disaggregated inference and cache scheduling architectures in the industry can decouple cache management from compute resources and improve prefix reuse efficiency; in scenarios like coding, where prefixes are highly stable, published technical documentation may report high hit rates, such as above 90%. But such numbers cannot be applied directly to every workload.
3. Two Scenarios: Same Price List, Costs Differ by More Than 3x
Using the illustrative prices: cached input 2 CNY, uncached input 20 CNY, output 100 CNY per million tokens.
Scenario A: Enterprise agent with long context and a stable prefix
Assume an input/output ratio of about 20:1 and a 90% cache hit rate:
Effective input price = 2 * 0.9 + 20 * 0.1 = 3.8 CNY per million tokensOutput price = 100 CNY per million tokensBlended cost = (20 * 3.8 + 1 * 100) / 21 ≈ 8.4 CNY per million tokens
This pattern is common in long-context coding agents, enterprise knowledge base Q&A, and automation pipelines with fixed toolchains. The system prompt, tool schemas, coding standards, and long document prefixes are heavily reused, so the hit rate is easy to push high. Even though the list price went up, the actual unit cost is still “diluted” by the cached price.
Scenario B: A low-frequency developer with a different prompt every time
Assume an input/output ratio of 5:1 and a 20% cache hit rate:
Effective input price = 2 * 0.2 + 20 * 0.8 = 16.4 CNY per million tokensOutput price = 100 CNY per million tokensBlended cost = (5 * 16.4 + 1 * 100) / 6 ≈ 30.3 CNY per million tokens
For these users, the prompt, context, and task description change with every request. Prefix reuse is rare, most input is billed at the uncached price, and output makes up a relatively large share — so the blended cost naturally approaches “list price, or even a premium.” In this example, the enterprise scenario’s unit cost is about 1/3.6 of the individual scenario’s. This is not price discrimination; it is a pricing structure that prices the ability to reuse cache.
4. Why Cache Hit Rate Becomes a Cost Lever
The essence of a cache hit is avoiding recomputation of the intermediate states for an identical prefix. During LLM inference, the input side must perform attention computation and store intermediate caches; if the next request’s prefix closely matches the previous one, the existing cache can be reused, reducing repeated computation and transfer overhead. Engineering-wise, this typically requires:
- Stable prefixes: keep the system prompt, role definitions, tool definitions, and format constraints as fixed as possible;
- Context layering: place long-lived knowledge and rules at the front and variable content at the back;
- Session isolation and consistency: in multi-tenant scenarios, ensure caches are not shared across tenants, while routing requests from the same workflow to nodes where the cache can be reused;
- Cache lifecycle management: expiration, eviction, capacity, and hit statistics should all be observable;
- Scheduling and routing coordination: under a disaggregated inference architecture, compute nodes and cache nodes are decoupled, and the routing strategy directly affects the hit rate.
But caching is not a free lunch. Cache storage, transfer, consistency checks, and isolation security all carry costs. A relatively mild cached price in the price list does not mean caching has no overhead; it means the provider wants to pass part of the benefit of “reusable prefixes” on to users, while using higher uncached input and output prices to cover the resource consumption of low-reuse scenarios.
5. Tiered Strategies for Different Users
Enterprise agent scenarios should treat cache hit rate as a first-class metric. Recommendations:
- Fix the system prompt and tool schemas; avoid meaningless prefix changes;
- Place long documents, codebase summaries, and rule sets in the stable prefix region;
- Design multi-turn sessions for prefix reuse instead of rewriting the entire context each turn;
- Monitor
p_in_eff, hit rate, input/output ratio, and per-task cost — not just list prices; - Apply structured constraints, stop conditions, and length control to outputs to reduce the impact of the higher output price.
Low-frequency developers or scattered-call scenarios should accept the reality of a low hit rate and focus on controlling total tokens:
- Compress context and remove irrelevant history;
- Batch tasks together to reuse the same prefix;
- Control output length and prefer short, structured outputs;
- Route cost-sensitive tasks through smaller models or rule-based pre-filtering;
- Estimate
randhwith the formula first, then decide whether to use a service with a high output price.
6. Conclusion: From “Unit Price Comparison” to “Effective Token Cost”
The core of this pricing update is not “all tiers rising by the same proportion,” but a re-weighting of the pricing structure: output becomes more expensive, uncached input becomes more expensive, and cached input rises relatively moderately. For enterprise customers running the same system prompt over the long term with highly reused prefixes, real costs may be far below what the list prices suggest; for individual developers who change prompts every time and reuse little cache, costs will be much closer to the combination of the uncached input price and the output price.
When evaluating services, abandon the coarse approach of “looking only at the input price” or “looking only at the output price.” Build your own cost model: measure your workload’s input/output ratio, cache hit rate, and output length distribution, then simulate using effective token cost. Only by including cache hit rate in the evaluation can you see the real economics behind an LLM service pricing update.
