LLM Agent Pricing: Cache Hit, Missed Input, and Output Token Costs

    New LLM pricing is often viewed as a uniform increase, but agent workloads make cache-hit input, missed input, and output token tiers the real drivers of per-task cost. This article presents an effective-cost formula, compares enterprise agents with low-frequency developer calls, explains why output tokens carry higher costs and why sparse MoE does not reduce costs linearly, and offers practical optimization steps for developers.

    New-generation model price adjustments often trigger the intuitive judgment that “everything is going up.” But if you look only at list prices, it is easy to misjudge the real cost. Especially in the agent era, a task is no longer a single question-and-answer exchange. It consists of long context, multi-step tool calls, repeated backfilling of results, and extensive prefix reuse. At that point, the price relationship among three token tiers—cache-hit input, missed input, and output—does more to determine an enterprise’s per-task cost than any single price figure.

    For the purposes of discussion, this article does not map to any specific vendor and uses relative price units only. Assume that a new-generation model’s quoted prices relative to the previous generation are approximately as follows: the output tier is about 4x the previous generation, missed input is about 3x, and cache-hit input is about 2x. At the same time, the relative price ratio among cache-hit input, missed input, and output is approximately 1:10:50. This ratio is critical: the gap between missed input and cache-hit input has widened, and the gap between output and cache-hit input has also widened. On the surface, every tier has increased. In substance, the pricing weight is shifting from a “unified token” model to tiers based on the inference cost structure.

    1. Build an Effective Cost Formula First, Not Just Look at List Price

    In long-context and agent scenarios, actual cost cannot be estimated simply with “input unit price × input tokens + output unit price × output tokens,” because part of the input can hit the cache. Let h be the cache hit rate, P_hit be the cache-hit input price, P_miss be the missed input price, P_out be the output price, and r be the input-to-output ratio. The effective input price is:

    P_in_eff = h × P_hit + (1 - h) × P_miss

    The blended cost per million tokens is approximately:

    C ≈ (r × P_in_eff + P_out) / (r + 1)

    Here r represents the ratio of input tokens to output tokens. Using P_hit=1, P_miss=10, and P_out=50 as relative units, an enterprise agent scenario with an input-to-output ratio of 20:1 and a cache hit rate of 90% gives:

    P_in_eff = 1×0.9 + 10×0.1 = 1.9
    C ≈ (20×1.9 + 50) / 21 ≈ 4.19 relative units per million tokens

    Now consider a low-frequency developer scenario: an input-to-output ratio of 5:1 and a cache hit rate of 20% gives:

    P_in_eff = 1×0.2 + 10×0.8 = 8.2
    C ≈ (5×8.2 + 50) / 6 ≈ 15.17 relative units per million tokens

    The former unit cost is roughly one-third of the latter, or about 3.6x lower. In other words, with the same model and the same price sheet, different workloads receive very different effective prices. An enterprise agent with high cache hits and a high input-to-output ratio effectively receives a “reuse discount.” A call whose prompt changes every time and has a low cache hit rate is closer to full price or even a premium.

    2. Why the Output Tier Rises More Sharply

    The cost structure of output tokens differs from that of input. On the input side, repeated prefill costs can be reduced through prefix caching, KV Cache reuse, disaggregated inference, and batching. On the output side, decoding is token by token. Each step must access model weights and the KV Cache, and is constrained by memory bandwidth, concurrent scheduling, and tail latency. The longer the context, the larger the KV Cache footprint, and the more obvious the bandwidth pressure during decoding. In agent tasks, a single step’s output may be short, but there are many tool-call steps and much result backfilling, so cumulative output and intermediate reasoning steps are amplified. The output tier therefore becomes a key focus of cost control.

    The relatively moderate increase in the cache-hit tier also has a cost logic. Cache hits reduce repeated prefill computation, but the cache itself requires storage, invalidation management, consistency checks, and security isolation. Cloud providers keep cache-hit prices lower essentially to encourage users to reuse stable prefixes, trading storage and scheduling for computation. This is clearly beneficial for enterprise agents that run the same system prompt, fixed tool definitions, and fixed retrieval templates for a long time. For low-frequency developers who change prompts and context each time, it is hard to enjoy this tier’s discount.

    3. Sparse MoE Does Not Mean Linear Savings Based on Activated Parameters

    Ultra-large sparse MoE is often understood as “the total parameter count is large, but only a small number of experts are activated per token, so inference cost is low.” That is only partly true. Activated parameters control per-token computation, but weights resident in memory, communication overhead in expert routing, load balancing, kernel optimization, and memory access patterns under hybrid attention mechanisms all bring real costs. As total parameters and expert counts increase, even with a sparse activation ratio, memory capacity, inter-GPU communication, batching efficiency, and tail latency still require real capacity planning. Therefore, price cannot be inferred simply from the share of activated parameters, nor can one assume that the cost of long-context and multi-step agent tasks will fall linearly with sparsity.

    4. Cost Divergence Between Enterprise Agents and Developer Calls

    Enterprise agents commonly feature long context, multi-step tool calls, fixed system prompts, fixed tool descriptions, and high-frequency reuse. A single task can reach thousands of tool-call steps and hundreds of thousands of tokens consumed, and multiple agents running in parallel for days is common. Such workloads have a high input-to-output ratio and a high cache hit rate. Calculated with the effective-cost formula, the unit token cost will be significantly lower than list-price intuition suggests. Conversely, low-frequency developers often have short prompts, frequent changes, low cache hit rates, and a high output share, making them more sensitive to output-tier prices. Tiered pricing is not simply a “price hike”; it is guiding workloads toward reusable, cacheable, and batchable optimization.

    5. Practical Optimization Recommendations for Developers

    First, stabilize prefixes. Place the system prompt, tool definitions, output format constraints, and retrieval templates in fixed positions, and avoid unnecessary reordering to improve cache hit rates. Second, control output. For structured tasks, use strict schemas, maximum token limits, and streaming responses to reduce unnecessary explanatory output. Third, monitor effective cost. In addition to unit prices, collect cache hit rate, input-to-output ratio, steps per task, retry rate, and tool-call failure rate. Fourth, do capacity planning. Long-context agents should evaluate KV Cache storage, concurrency, and tail latency, not just the list price per million tokens. Fifth, compare model choices using total cost of ownership rather than unit price. High cache-hit, high input-to-output ratio scenarios are suitable for tiered pricing models; short-prompt, high-output, low-reuse scenarios should focus on reducing output length and the number of calls.

    The following pseudocode can be used for a quick estimate:

    1. def effective_cost(p_hit, p_miss, p_out, hit_rate, input_output_ratio):
    2. p_in_eff = hit_rate * p_hit + (1 - hit_rate) * p_miss
    3. return (input_output_ratio * p_in_eff + p_out) / (input_output_ratio + 1)

    This formula does not include cache storage, tool calls, retries, or concurrent scheduling costs, but it is sufficient to help teams judge before model selection whether a list-price increase will translate into a task-cost increase.

    The conclusion is that the price changes of new-generation LLMs should not be understood simply as a uniform increase. They should be seen as a repricing of the cost structure in the agent era. The cache-hit tier is relatively moderate, the output tier is more expensive, and the gap between missed input and cache hits has widened. The purpose is not merely to raise prices, but to align prices more closely with the real costs of prefill reuse, decoding bandwidth, KV Cache storage, and sparse MoE scheduling. For enterprises, long-term stable prefixes and high cache hit rates bring real discounts. For individual developers, reducing prompt drift, controlling output, and improving reuse rates are the most effective ways to respond to price changes. Looking only at the list price per million tokens underestimates the value of reuse and overestimates the true unit cost of enterprise agents.