The Economics of Inference: The Iron Triangle of Latency, Throughput, and Cost as Token Prices Collapse
Token prices have fallen more than 98% in three years, yet enterprise AI bills keep climbing. This article explains why the Jevons effect is driving demand, why inference now dominates the total cost of ownership of production AI systems, and how engineering teams can manage the iron triangle of latency, throughput, and cost. It covers request tiering, prefix and semantic caching, continuous batching and scheduling, context budgeting, cost observability, and capacity planning, and argues for shifting the optimization target from cost per million tokens to cost per completed task.
1. The Misread Price Curve
Start with the facts. In early 2023, a model at the then-flagship capability level cost roughly $30 per million output tokens. By early 2026, a model in the same capability tier was quoted at around $0.40 per million, a drop of more than 98% in three years. A capability evaluation report published by a university AI research institute in 2025 found that inference costs for mid- and low-tier models fell by more than two orders of magnitude in two years. Extrapolating that trend, generating an entire book in 2027 could cost less than a cup of ordinary coffee.
The bills, however, have not gotten cheaper. Average monthly AI-related spending on the enterprise side rose from about $63,000 in 2024 to about $85,500 in 2025, an increase of roughly 36%. The share of enterprises planning to spend more than $100,000 per month more than doubled. Around 40% of enterprises have crossed the $10 million annual AI spending threshold, and most of them cannot clearly answer what that money bought. A chip vendor executive put it plainly at an industry conference in 2026: the market initially paid for “access to information,” but the sustainable reason to pay is “completed work,” and agentic systems are the execution layer that turns information into finished work.
These two trends moving in opposite directions are not a contradiction but a textbook Jevons effect: efficiency gains lower the barrier to use, and demand expands faster than prices fall. What engineering teams should care about is not whether unit prices will keep dropping, but who absorbs the widening gap between the consumption curve and the cost curve.
2. Why the Bill Concentrates on Inference
Training is a burst workload: it runs and stops, and the cost is capitalized once. Inference is a continuous workload: every user question, every agent step, every tool call and result feedback loop burns compute in real time. As a result, inference typically accounts for 80% to 90% of the total cost of ownership in a production system’s lifecycle; one research forecast indicates that inference already represented about two-thirds of all AI compute spending in 2026.
For AI-native businesses, inference cost is the equivalent of cost of revenue: request volume grows linearly with revenue, cost grows linearly with it, and the gross margin structure is locked directly by compute efficiency. Cost per token and accelerator utilization therefore graduate from back-office technical metrics to enterprise-level operational metrics: the former determines pricing headroom, the latter determines output per unit of compute.
One easily overlooked detail: agent architectures split “one request” into “a dozen-plus calls.” Planning, retrieval, tool execution, result validation, and retries are each independently billed units. The longer the context and the more repeated prefixes, the lower the cache hit rate, and the steeper the slope of the bill.
3. The Iron Triangle: Latency, Throughput, Cost
The three form a constraint system in which no two can be optimized without sacrificing the third:
- Latency: the time from a request’s arrival to first byte and to the complete response, which directly determines interaction quality and the success rate of agent tasks.
- Throughput: the total requests or tokens a cluster completes per unit of time, which determines how well compute cost is amortized.
- Cost: the bill per million tokens or per completed business task.
The typical trade-offs: cutting latency requires more parallel replicas and more aggressive in-batch concurrency, which raises cost; raising throughput requires batching and queuing, which sacrifices latency; cutting cost requires lower specs, lower precision, and longer timeouts, which hurts both latency and throughput. There is no “all of the above” in engineering, only trade-offs tiered by business needs.
4. Putting the Iron Triangle into Engineering Practice
1. Tier Requests Before Optimizing
Segmenting traffic by latency sensitivity is the first step in cost governance. At minimum, use three tiers: interactive (chat and code completion, requiring low first-byte latency), workflow (back-office batch jobs and report generation, requiring throughput), and offline (data cleaning and bulk summarization, requiring only cost efficiency). Once tiered, model tiers, batching policies, timeouts, and retry budgets can be configured differently, avoiding running the least urgent work through the most expensive lane.
2. Restructure Costs with Caching and Prefix Reuse
Prompt prefixes, system instructions, and retrieved fixed context are often highly repetitive across many requests. Placing stable prefixes first and volatile parts last can significantly improve prefix cache hit rates; for semantically duplicate questions, add result caching with a sensible invalidation policy. Illustrative logic:
def handle(query, ctx):key = semantic_key(query) # compute a semantic key after normalizationhit = cache.get(key)if hit and hit.fresh(minutes=10):return hit.value # hit: zero inference costplan = build_plan(query, ctx) # planning step, reuse stable prefixes where possibleans = model.invoke(plan, temperature=0.2)cache.set(key, ans, ttl=600)return ans
Two cautions: the cache key must include the parameters that affect output (model tier, temperature, tool version), or it will return wrong results; data involving personalization or permissions must not enter a shared cache.
3. Batching and Scheduling: Trading Controlled Queuing for Throughput
Continuous batching packs multiple requests into the same forward pass and is one of the most effective ways to raise accelerator utilization. The key is separate queues and quotas per priority so interactive traffic is not dragged down by offline jobs:
scheduler:queues:- name: interactivemax_batch_tokens: 8192queue_timeout_ms: 20 # dispatch on timeout to protect latencypriority: high- name: offlinemax_batch_tokens: 32768queue_timeout_ms: 400 # allow batching to protect throughputpriority: lowautoscaling:metric: tokens_per_second # scale on token rate, not QPStarget_utilization: 0.75
Using request count (QPS) as the scaling metric distorts badly in long-context scenarios; token rate and queue wait time are signals much closer to real load.
4. Context Budgets: The Most Direct Cost Lever
The impact of context length on cost is usually superlinear. Actionable measures include reranking retrieval results and keeping only highly relevant fragments, rolling summarization of conversation history, structured trimming of tool return values, and moving long-document parsing and vectorization to the offline tier. Set a token budget cap for each agent step and trigger a fallback strategy when it is exceeded rather than appending indefinitely.
5. Observability: Breaking the Bill Down by Business Dimension
No attribution, no optimization. At minimum, collect token consumption by business line, tenant, and endpoint; cache hit rate; average in-batch concurrency; percentile values for first-byte and total latency; timeout and retry rates; and cost per task (cost divided by successfully completed tasks). The last metric matters most: it turns “is it expensive?” from a finance debate into comparable engineering data. In practice, buffer call logs with a message queue, then aggregate them and set threshold alerts through logging and monitoring systems.
6. Capacity and Elasticity: Combining Reserved and On-Demand
Inference load has clear peaks and valleys. Lock in cost for the baseline with long-term reservations or committed volume, scale the peak with on-demand elastic container platforms, and add fallback paths (lower-tier models as backstop, disabling non-core tool calls) for spikes. Load tests must include long-context and high-concurrency agent scenarios; otherwise capacity planning will be systematically too low.
5. From Token Cost to Task Cost
Unit prices will almost certainly keep falling, but treating price cuts as a cost-reduction strategy hands control to an external curve. Three things are actually within your control: cutting unnecessary tokens (context governance and caching), raising output per token (batching and utilization), and spending compute on high-value stages (request tiering and task-level cost accounting).
As the billing unit shifts from “per million tokens” to “per completed task,” the objective function of inference engineering changes too: no longer minimizing unit price, but maximizing completed tasks per unit of compute under a given latency constraint. This is both the way out of the iron triangle and a necessary step for AI applications moving from demo to production and from cost center to accountable business. For teams that want to build this governance capability quickly, combining general cloud capabilities such as container platforms, message queues, logging, and monitoring, together with the elastic compute and observability components offered by Baidu AI Cloud, can close the loop on tiered scheduling and cost attribution in a relatively short time.
