LLM Prompt Caching Pricing: Why Cache Hit Input Discounts Matter More Than Price Cuts

    This article explains a recent LLM service price reduction that applies only to cache hit input tokens in a single region, and why that detail matters more than the discount itself. It breaks down how input billing separates cached from uncached tokens, the prefix stability requirements for cache reuse, four common reusable prompt patterns, and a cost model showing how hit rate is a stronger lever than unit price. It also includes a practical optimization checklist and common misconceptions about caching, output costs, and regional pricing.

    1. Background: A Structural Price Cut, Not a Broad Discount

    A cloud provider’s Model-as-a-Service (MaaS) platform recently announced that, starting at 00:00 Beijing time on November 23, it would reduce the price of a general-purpose LLM service in a single region (Guiyang). The adjustment applies only to one billing item: cache hit input tokens, which are now priced at 20% of the original rate. All other billing items remain unchanged.

    This is not a platform-wide promotion. It is a targeted adjustment to a specific billing dimension, limited to one region. For developers and enterprise users, the important questions are not “how much did the price drop?” but “why this specific item?” and “can my workload actually benefit from it?”

    2. Understanding the Billing Model: What You Pay for in a Single Inference Request

    To understand this change, you first need to break down the cost structure of LLM inference. The input side of a request is commonly divided into two parts:

    • Uncached tokens: New tokens the model must fully process, where compute grows linearly with context length.
    • Cached tokens: Tokens whose prefix exactly matches a previous request. Their internal state (the Key/Value cache) can be reused, so no recomputation is needed.

    Input billing is therefore typically split into a cache hit input rate and a cache miss input rate, while output is billed separately per generated token. This maps the actual difference in compute consumption to price, making billing closer to real resource usage.

    When the cached portion drops to 20% of the original price, the marginal cost of cached tokens is pushed extremely low. The optimization focus shifts from “shortening the prompt” to “increasing prefix reuse.”

    3. The Technical Prerequisite for Cache Hits: Prefix Stability

    Cache reuse has a strict condition: the request prefix must match token for token. A single character change invalidates every token after that position. This explains a common confusion—why changing just one date can drop the hit rate to zero.

    Three engineering principles help:

    1. Stable prefix, variable suffix: Put stable content (system instructions, tool definitions, domain knowledge, examples) first, and user input, timestamps, and random IDs last.
    2. Externalize variables: Append dynamic content via placeholders at the end instead of embedding it in the prefix.
    3. Keep session order consistent: In multi-turn conversations, append history in a fixed order to avoid breaking the prefix through reordering.

    An illustrative structure (pseudocode, showing organization only):

    1. [stable prefix]
    2. system: role definition + output format constraints + tool schema + long document
    3. [/stable prefix]
    4. [variable suffix]
    5. user: {{current question}}
    6. context: {{retrieved snippets for this turn}}
    7. meta: {{trace_id, timestamp}}
    8. [/variable suffix]

    4. Where Hit Rates Come From: Four Typical Reusable Scenarios

    • Fixed system prompts and role definitions: Shared by almost all requests, the most stable source of hits.
    • Long documents and always-on knowledge base context: Loaded once and queried many times, with the most significant gains.
    • Structured output constraints and tool definitions: Schemas that are lengthy and rarely change.
    • Batch tasks of the same type: The template portion is naturally reused when processing the same template in bulk.

    Conversely, placing timestamps, random numbers, or user IDs at the front is the biggest killer of hit rates.

    5. Cost Estimation: Turning the Discount into a Bill

    Assume a workload with 10 million input tokens per day, 70% of which is a stable prefix. The cache hit rate is priced at 20% of the original, the miss rate is unchanged, and output cost is ignored. Input-side cost then drops from “full price for all tokens” to:

    1. cost ≈ 0.7 × 20% + 0.3 × 100% = 44% (relative to original input cost)

    Input spending falls by about 56%. If the hit rate rises from 70% to 90%, cost drops further to about 38%. This shows that hit rate is a more sensitive lever than unit price. Teams should establish hit rate measurement first, then optimize.

    6. Implementation Checklist

    1. Prompt layering governance: Define a three-tier template standard (stable / semi-stable / dynamic) and include it in code review.
    2. Cache-friendliness testing: Track hit rate during canary releases as a launch gate.
    3. Batching and scheduling: Aggregate requests with the same template to reduce prefix jitter.
    4. Context trimming: In RAG scenarios, control the length and order stability of concatenated snippets.
    5. Cost observability: Instrument monitoring, alerting, and logging to record cached tokens, uncached tokens, and output tokens, forming a cost dashboard by business line.
    6. Region and capacity planning: Note that this adjustment is limited to a single region. For cross-region deployments, model each region’s actual pricing separately rather than extrapolating a global budget from one price.

    7. Common Misconceptions

    • Misconception 1: Assuming the bill drops proportionally with the price. Actual savings depend on the hit structure, and gains are limited when the hit rate is low.
    • Misconception 2: Placing dynamic content first. This is the primary cause of a zero hit rate.
    • Misconception 3: Focusing only on unit price, not architecture. Optimizing prompt organization and scheduling often yields more than price fluctuations.
    • Misconception 4: Ignoring output-side cost. Output tokens usually have a higher unit price, so compressing output length is equally important.

    8. Conclusion

    A price adjustment limited to cache hit input and to a single region sends a clear signal: inference cost governance is moving from “cutting unit price” to “increasing reuse.” For engineering teams, treating prompts as code assets that require version management and performance evaluation, and building observability for hit rate and token structure, is the path to turning price benefits into real business margin.