The Compute Economics Behind LLM Pricing: Why Open Source Frameworks and Price Hikes Go Hand in Hand

    This article explores the apparent paradox of AI model providers open-sourcing inference frameworks while simultaneously raising API prices, and explains how both strategies stem from the same underlying constraint: scarce GPU compute. It breaks down the key differences between API revenue, real infrastructure costs, and opportunity cost, examines how cache hit rates compress billing revenue, provides a practical framework for comparing pricing across vendors, and offers actionable advice for developers navigating price changes—including model routing and cache optimization strategies.

    Why Open Source and Price Hikes Follow the Same Logic

    Recent moves by several LLM providers present a seeming contradiction: on one hand, they open-source their inference frameworks; on the other, they raise API prices substantially. Public reports indicate that some models have seen price increases of multiple times, or even tenfold, relative to their original rates (refer to official announcements for exact figures).

    Looked at superficially, the two actions pull in opposite directions. Open-sourcing lowers the barrier to adoption, while a price increase raises the cost of usage. But from the supply side, both serve the same objective: directing finite GPU hours toward the highest-value use cases.

    Open-sourcing an inference framework attracts developers, fosters an ecosystem, and lowers migration costs. Raising prices, meanwhile, uses the price mechanism to filter out low-value, compute-intensive calls, freeing up GPU capacity for post-training and high-value inference. When high-end training GPUs are in short supply and command prices above their official list rates, compute itself becomes the scarcest production resource.

    First, Clarify the Terms: Revenue, Cost, and Opportunity Cost

    Before evaluating whether a price increase is justified, it helps to distinguish between three concepts that are frequently conflated in the discussion.

    The first is API billing revenue — the money users pay the provider on a per-token basis. The second is true cost, which includes GPU computation (prefill and decode), KV cache storage and read/write overhead, networking, datacenter power, and operations. The third is opportunity cost — what the same GPUs could otherwise be doing, such as reinforcement learning or evaluation workloads, if they were not serving API requests.

    Many discussions treat the first item as profit. It is only revenue. Whether a price increase is reasonable can only be judged by comparing the post-adjustment revenue against the sum of items two and three.

    To get a sense of scale, consider the following hypothetical: a tool consumes 1 trillion tokens per day on average, with a blended unit price of 2 RMB per million tokens (an assumption, not the price of any specific vendor). That yields roughly 2 million RMB in daily revenue and roughly 700 million RMB per year. That number looks large, but it must be checked against hardware procurement costs, power, and operations item by item to arrive at a meaningful assessment. Note that single-GPU pricing, 8-GPU node pricing, and full rack-cluster pricing use different bases of comparison and should not be mixed.

    Cache Hits: How Billing Revenue Gets Compressed

    Context caching is a major backdrop to the recent price adjustments. During LLM inference, if the prefix of a request matches one the server has already processed, the provider can reuse the precomputed KV intermediate results and skip the prefill computation for that portion. From the provider’s perspective, the compute cost of a cache hit is very low.

    The problem arises in the billing layer. If the cache-hit unit price is set very low, and high-frequency conversation, long-context, and agent-loop workloads achieve high hit rates, then per-request billing revenue can be substantially lower than if everything were billed at the miss rate.

    Per-request billing revenue can be broken down as follows:

    1. Per-request billing revenue = cache-miss input tokens × miss price
    2. + cache-hit tokens × hit price
    3. + output tokens × output price

    This formula covers billing revenue only. True costs are separate, including GPU compute, cache storage duration and read/write, networking, and operations. Output tokens typically require far more compute than input tokens, so changes to the output price usually have a larger impact on margins.

    The following table demonstrates how hit rates affect revenue, using hypothetical prices. Assume a miss price of 10 RMB per million tokens, a hit price of 1 RMB per million tokens, and an output price of 40 RMB per million tokens. Each request has 100K input tokens and 2K output tokens.

    Cache Hit Rate Miss Revenue Hit Revenue Output Revenue Total per Request
    0% (all billed as miss) 1.00 RMB 0 RMB 0.08 RMB 1.08 RMB
    50% 0.50 RMB 0.05 RMB 0.08 RMB 0.63 RMB
    90% 0.10 RMB 0.09 RMB 0.08 RMB 0.27 RMB

    The calculation works as follows. For the 100K input tokens, take the fraction that is a cache miss, multiply by 100K, and then apply the 10 RMB per million token rate. To take the 90% hit-rate case: 10K tokens miss, producing 0.1 RMB of revenue; 90K tokens hit, producing 0.09 RMB at the 1 RMB per million token rate; output of 2K tokens at 40 RMB per million tokens produces 0.08 RMB. The total is 0.27 RMB, roughly 75% lower than if the entire request were billed at the miss rate.

    This example shows that the higher the hit rate, the lower the billing revenue per request. The conclusion holds under three conditions: the hit price is lower than the miss price, the output price remains unchanged, and the provider actually saves computation on hit requests. If the hit price exceeds the marginal cost of serving a hit, or if cache storage and operational costs are very high, the conclusion must be recalculated.

    Comparing Across Vendors: Check the Price Sheet First

    Many articles claim that after a price adjustment, “pricing remains within normal industry ranges.” But such a claim is only meaningful when checked against an actual price sheet. When comparing prices, it is worth building a comparison table with at least the following fields:

    • Model name and version;
    • Cache-miss input price, output price, and cache-hit price;
    • Minimum token count for caching, cache TTL (time-to-live), and whether cache writes are billed separately;
    • Price update date, region, and currency;
    • Whether batch discounts or subscription tiers are available.

    Prices change over time, so a comparison is only meaningful when the update date is recorded. Billing units, cache rules, and context window sizes differ across vendors; normalize the basis of comparison before comparing unit prices.

    The Limits of Pure Pay-as-You-Go Pricing

    Many providers currently offer both pay-as-you-go and subscription plans. For heavy users, per-unit subscription costs are often lower than pure API spend. If a provider only offers pay-as-you-go pricing, heavy callers may migrate to another platform after comparison.

    Tiered subscriptions, batch discounts, and enterprise contracts can retain high-value customers while offering heavy users a compelling alternative. Whether to adopt these options depends on a provider’s user structure and compute planning.

    Practical Advice for Developers

    Faced with price changes, developers and enterprises can respond in four areas.

    First: model routing by task complexity. Simple tasks such as classification, information extraction, and format conversion can be handled by lightweight models; only complex reasoning should be routed to flagship models. Placing a small model or rule-based classifier in front can significantly cut average costs. Before going live, validate the lightweight model’s accuracy on a representative sample set, then set the routing rules.

    Second: improve cache hit rates. Place stable system prompts, tool definitions, and long-lived context at the front of the prompt, and keep the prefix byte-identical across requests. Dynamic content such as timestamps and random IDs should go at the end. Cache rules vary noticeably between providers: most impose a minimum token threshold, enforce a limited TTL, and some platforms charge separately for cache writes. Check the official documentation for vendor-specific details.

    Third: evaluate self-deployment. Open-source frameworks and open-weight models have lowered the barrier to running your own inference infrastructure. Teams with substantial call volumes and low latency sensitivity can deploy on cloud infrastructure such as object storage and container platforms, and then compare the total cost against their API bill. Self-hosting means taking on GPU resources, autoscaling, model updates, and engineering operations, so the comparison should include these factors as well.