New LLM Pricing Surge: How to Calculate Agent Costs in the Era of AI Agents
A newly released large language model has introduced a pricing scheme that significantly raises unit prices across all tiers, with output costs reaching 3.7 times and cache-missed input costs 3.1 times those of the previous generation. This article analyzes the actual cost impact on different user profiles by comparing caching hit rates and input-output ratios, explains the technical factors driving higher inference costs in Agent-based applications—including long-context processing and MoE architecture overhead—and provides practical strategies for developers to optimize prompt design and reduce per-token expenses.
The latest generation of large language models has introduced a new pricing structure that warrants close examination. While the headline rates are considerably higher than previous versions, the actual cost impact varies dramatically depending on how the model is used.
How Much Did Prices Rise, and How Should Cache Pricing Be Calculated?
The new model’s output pricing has been set at 100 RMB per million tokens, compared to approximately 27 RMB for the previous generation—a 3.7x increase. Cache-missed input costs rose from 6.5 RMB to 20 RMB per million tokens, roughly a 3.1x jump. Cache-hit pricing increased from 1.1 RMB to 2 RMB, a 1.8x rise—the smallest increase across all tiers.
It’s worth noting that if cache-hit pricing were calculated at 1 RMB, it would actually be cheaper than the previous generation, which contradicts the narrative of an overall price increase. This analysis therefore uses 2 RMB as the standard reference point.
The changing price ratios are particularly revealing. The ratio of cache-missed input to cache-hit pricing has expanded from 6x to 10x, while the ratio of output to cache-hit pricing has grown from 25x to 50x. This deliberate widening of price gaps signals a clear intent to influence how users interact with the model: cache hits are being incentivized, while expensive output and cache-missed input are being priced at a premium.
The Same Model, Two Very Different Cost Profiles
Listed prices don’t tell the full story. The actual unit cost depends heavily on two factors: cache hit rate and the input-to-output token ratio. In programming scenarios with high prefix reuse, cache hit rates can potentially exceed 90%, though the actual rate depends on prompt patterns and caching strategy.
Example 1: Long-context coding Agent. Assume an input-to-output ratio of 20:1 with a 90% cache hit rate:
- Weighted input cost: 2 × 0.9 + 20 × 0.1 = 3.8 RMB/million tokens
- Output cost: 100 RMB/million tokens
- Blended cost: (20 × 3.8 + 1 × 100) ÷ 21 ≈ 8.4 RMB/million tokens
Example 2: Individual developer with infrequent, varied prompts. Assume a 5:1 input-to-output ratio with a 20% cache hit rate:
- Weighted input cost: 2 × 0.2 + 20 × 0.8 = 16.4 RMB/million tokens
- Output cost: 100 RMB/million tokens
- Blended cost: (5 × 16.4 + 1 × 100) ÷ 6 ≈ 30.3 RMB/million tokens
| Scenario | Assumed Cache Hit Rate | Input:Output Ratio | Blended Cost (RMB/million tokens) |
|---|---|---|---|
| Enterprise coding Agent | 90% | 20:1 | ≈ 8.4 |
| Individual developer | 20% | 5:1 | ≈ 30.3 |
In this comparison, the enterprise customer’s unit cost is approximately 28% of the individual developer’s—close to one-third. This illustrates that “across-the-board price increases” affect different user segments very differently. Customers who maintain consistent system prompts and high prefix overlap can significantly amortize their costs. Users who vary prompts with every call end up paying close to the cache-missed rate. This pricing structure, which differentiates based on resource utilization efficiency, appears to reflect the provider’s efforts toward fine-grained compute resource management.
Why Agent Workloads Drive Up Inference Costs
In traditional conversational scenarios, a single interaction typically involves only dozens to a few thousand tokens, resulting in minimal computational cost per call and low price sensitivity. Agent workloads present a different picture. Complex tasks may involve hundreds or even thousands of tool calls, with long-running contexts expanding to hundreds of thousands of tokens. When multiple agents run in parallel, resource consumption compounds further. While these represent extreme cases, they illustrate the sources of cost pressure.
More calls and longer contexts directly increase inference-side overhead: GPU memory usage, KV cache storage, and decode-stage bandwidth consumption. These costs scale roughly linearly with context length, and sometimes exceed linear growth. At previous-generation uniform pricing, a single long-running task could cost more to serve than the revenue it generated—which is why providers need higher prices for cache-missed input and output tokens to cover real hardware depreciation and bandwidth expenses.
The Hard Costs of MoE Architecture
Modern models increasingly adopt sparse Mixture-of-Experts (MoE) architectures. As a representative example (figures are illustrative of the structural design and should be verified against official documentation): a model with approximately 2.8 trillion total parameters and 896 experts, activating only 16 per inference.
Sparse activation controls per-inference computation, but distributed clusters still incur several unavoidable costs:
- Resident GPU memory for weights. Regardless of precision, the total parameter footprint is substantial, requiring high-memory-density hardware.
- Expert routing communication overhead. Every token must traverse All-to-All communication primitives to reach the node hosting its assigned experts, with cross-node latency and bandwidth both factored into cost.
- Kernel adaptation for new attention mechanisms. Supporting novel hybrid attention architectures requires substantial operator optimization investment, and these R&D expenses must be amortized across production calls.
These costs are ultimately reflected in the physical compute infrastructure. The price increases therefore represent, to a significant degree, the pass-through of technological upgrade costs.
How Developers Can Reduce Agent Call Costs
Given this pricing structure with pronounced gradients, application developers need to rethink prompt design and context management:
- Fix the System Prompt prefix. Place instructions, background knowledge, and tool descriptions at the very beginning of the prompt and keep them byte-identical across calls to maximize cache hit rates.
- Dynamically trim context. In multi-turn agent workflows, avoid blindly accumulating full conversation history. Use vector retrieval or summarization to pass only task-relevant context, reducing cache-missed input tokens.
- Constrain output format. Since output carries the highest price, require structured, concise responses and avoid verbose explanatory text.
Common mistakes to avoid:
- Stuffing entire conversation history into every context window, causing cache-missed input to balloon.
- Frequently modifying the System Prompt, invalidating the prefix and breaking cache hits.
- Failing to restrict output format, allowing the model to generate repetitive or irrelevant tokens.
- Evaluating only list prices without calculating cache hit rates and input-output ratios, making it impossible to estimate true costs.
Conclusion
The new model’s list prices are indeed higher, but the pricing gradient rewards high-reuse, low-waste calling patterns. For developers, the dominant cost factors are cache hit rate, context length, and output length. Always verify actual charges against the official pricing page and your billing statements.
