LLM Inference Pricing and Cache Hit Cost Analysis: Why Effective Cost Differs by Workload
A recent LLM service release changed its pricing structure unevenly across input cache miss, input cache hit, and output tiers, making cache hit rate and output length far more important than the listed input or output price. This article breaks down the new pricing structure, introduces a blended cost model, compares an enterprise long-context workload with a low-hit developer workload, and outlines cache-friendly design and output-governance practices for reducing effective cost per million tokens.
A recent LLM service release changed its pricing structure. Developers’ first impression is often that prices went up. But when the tiers are separated into input cache miss, input cache hit, and output, the increases are not uniform, and the cost structure has shifted noticeably.
Using the published example prices in RMB per million tokens, the output tier rose from about 27 to 100, nearly 4x; input-miss rose from about 6.5 to 20, about 3x; and cache-hit input rose from about 1.1 to 2, about 2x. More importantly, the ratios changed: input-miss to cache-hit input went from about 6x to 10x, while output to cache-hit input went from about 25x to 50x. This means the headline increase is only part of the story. What actually affects the bill is whether a workload can reuse a stable prefix, whether output length is controlled, and whether the input/output ratio is reasonable.
Price Changes Are Not a Simple Linear Increase
Under the new pricing structure, the input side is split into “cache miss” and “cache hit” tiers, while the output side remains a separate high-price tier. The cache-hit tier increased relatively gently, the output tier increased much more, and input-miss was pulled further away from cache-hit input. This design sends a clear signal: the provider wants to encourage predictable, reusable, stable-prefix calling patterns, while charging more for requests that must recompute the full context and generate large amounts of output.
When comparing versions or services, you cannot look only at the listed input price or the listed output price. The real cost of a request has three components:
- miss-input tokens × miss-input price
- hit-input tokens × hit-input price
- output tokens × output price
If you look only at list prices, enterprise long-context requests and low-frequency individual requests look the same. If you look at effective cost, workloads under the same list price can differ by several times.
Cache Hit Rate Becomes the Cost Lever
In LLM inference, not every input token needs to be recomputed. Fixed system instructions, tool descriptions, knowledge snippets, and stable historical prefixes in multi-turn conversations can reuse previously computed results through prefix caching or KV cache reuse, reducing the compute cost of the hit portion. The lower cache-hit price reflects that reuse.
But cache hits are not unconditional. They depend on engineering conditions such as prefix stability, session routing affinity, cache capacity and eviction policy, and multi-tenant isolation. If requests carry different timestamps, random IDs, or dynamically reordered knowledge snippets, or if sessions are routed to different inference instances, the hit rate drops. When the hit rate drops, the miss-input share rises. With the new miss-to-hit price ratio at 10x, a low hit rate can significantly amplify the effective input price.
A simple cost model can be written as:
def effective_input_price(hit_rate, hit_price, miss_price):return hit_rate * hit_price + (1 - hit_rate) * miss_pricedef blended_cost(input_ratio, output_ratio, hit_rate, hit_price, miss_price, output_price):input_eff = effective_input_price(hit_rate, hit_price, miss_price)return (input_ratio * input_eff + output_ratio * output_price) / (input_ratio + output_ratio)
The value of this model is that it converts list prices into an effective unit price. The input/output ratio, cache hit rate, and output price together determine the final bill, not any single price tier.
Two Workloads Under the Same Price Sheet
Assume the new example pricing is:
- cache-hit input: 2 RMB per million tokens
- miss input: 20 RMB per million tokens
- output: 100 RMB per million tokens
For an enterprise long-context Agent workload with an input/output ratio of about 20:1 and a cache hit rate of 90%:
- Effective input price = 2 × 0.9 + 20 × 0.1 = 3.8 RMB per million tokens
- Blended cost per million tokens = (20 × 3.8 + 1 × 100) / 21 ≈ 8.4 RMB
For a low-frequency developer workload where every prompt is different, with an input/output ratio of about 5:1 and a cache hit rate of 20%:
- Effective input price = 2 × 0.2 + 20 × 0.8 = 16.4 RMB per million tokens
- Blended cost per million tokens = (5 × 16.4 + 1 × 100) / 6 ≈ 30.3 RMB
Under the same list price system, the enterprise workload’s effective unit cost is roughly one-quarter to one-third of the low-frequency workload. What looks like a broad price increase is actually a clearer cost split driven by cache hit rate and input/output ratio. Enterprise scenarios can get near-discount effective pricing by using stable system prompts, fixed tool descriptions, and reusable long prefixes. Low-frequency workloads with highly variable prompts are closer to full list price and may even absorb a miss-input premium.
Building Cache-Friendly Systems
To reduce effective cost, cache hit rate should be treated as a first-class metric. Engineering measures include:
- Put stable content at the front: system instructions, tool schemas, and fixed knowledge snippets should be placed in the request prefix.
- Put dynamic content later: timestamps, random IDs, and temporary user input should not break the stable prefix.
- Keep knowledge snippet order stable and avoid unnecessary reshuffling.
- Use session-sticky routing for multi-turn conversations to improve prefix reuse.
- Observe cache hit rate, miss-input share, and average prefix length per business line to find why cache entries are invalidated.
Cache boundaries and security isolation also matter. Cache reuse must not come at the cost of multi-tenant isolation or data security. Cache consistency should be managed to avoid stale knowledge snippets being reused for too long. A higher hit rate is not an absolute goal; it is a balance among correctness, isolation, and cost.
For observability, general logging and monitoring capabilities can be used to continuously collect hit rate, input/output ratio, and per-request cost. The exact alerting and optimization strategy should still be designed around the workload.
Output-Side Governance and Cost Observability
With the output price now 50x the cache-hit input price, the output side becomes a major cost focus. Developers should:
- Limit unnecessary output length and avoid repeated explanations and redundant formatting.
- Use structured output for tasks that can return structured results.
- Use segmented summarization and incremental generation for long document generation.
- Set reasonable output limits for batch tasks.
- For high input/output ratio workloads, optimize caching first. For high-output workloads, optimize generation length and model-tier selection.
Cost observability should move from “view the total bill” to “view the effective unit price.” At tenant, scenario, and API granularity, record the three token counts, cache hit rate, input/output ratio, and average output length. Then use the blended cost model to calculate effective cost per million tokens. Only by putting list price, hit rate, and workload structure in the same view can you understand the real impact of a price change on your business.
Conclusion: Compare Effective Cost, Not List Price
The core of this pricing adjustment is not a simple price increase. Through a larger cache-hit discount and a high output tier, the provider distributes cost pressure more precisely across different workloads. Enterprise Agent scenarios with long contexts, stable prefixes, and high cache hit rates can have effective costs far below what the list price suggests. Low-frequency calls with changing prompts and low cache hit rates are more likely to feel the combined pressure of miss-input premiums and high output prices.
For developers, the rational approach is to build a reusable cost model, combine cache-friendly design, output governance, and continuous observability, and use effective unit price rather than surface list price for technology selection and capacity planning.
