After the Price War: LLM Competition Shifts to Per-Task Cost
As the LLM price war winds down, the industry benchmark is moving from listed per-token prices to per-task cost. This article explains how per-task cost is composed of model calls, multi-step reasoning amplification, tool and infrastructure fees, and failure/retry overhead, introduces the concept of effective per-task cost, and provides code examples for computing it. It then covers engineering levers to reduce cost—difficulty-based model routing, context control, caching, agent loop limits, first-pass success rate improvements, and deployment model selection—followed by guidance on building a comparable cost evaluation framework, a four-step enterprise adoption path, and the risks of cost-driven competition.
1. The Unit of Competition Shifts from List Price to Per-Task Cost
Over the past two years, the main competitive lever for LLM providers has been lowering the listed price per million tokens. Lower prices reduce the barrier to entry, but what users actually care about is how much it costs to get one job done. At the same listed price, a task might require a single model call, or it might involve a dozen reasoning steps, multiple tool invocations, and several failed retries. The real spend between the two can differ by tens of times.
Recent public data reflects this shift. One vendor disclosed that its per-task cost dropped from $0.40 to $0.26, a reduction of roughly 35%. Another vendor claimed a cost reduction of about 70% in agent scenarios. According to public test reports, one Chinese model’s per-task cost is about one-eighth that of a flagship overseas model. Meanwhile, a vendor that cut its listed price showed no significant change in per-task cost in third-party tests. This shows that the relationship between list price and task cost is not linear.
These numbers come with a caveat: task definitions, sample sets, and billing methods must be consistent across parties, otherwise direct comparison is impossible. When reading such data, verify three things first. First, what steps make up a task. Second, whether the statistics cover successful tasks or all attempts. Third, whether the cost includes tool calls and retries.
2. The Composition of Per-Task Cost
Per-task cost can be broken down into four categories.
First, model invocation fees. This is the billing for input and output tokens. Output tokens are usually more expensive than input tokens, so tasks that generate long text cost noticeably more than tasks that read long text.
Second, the amplification effect of multi-step reasoning. Agent-style applications append the result of each step to the context before making the next call. If every step carries the full history, input token counts grow with the number of steps, and total cost grows faster than the step count itself.
Third, tool and infrastructure fees. Examples include retrieval services, database queries, code execution environments, and object storage reads/writes. These costs are easy to overlook but can account for a large share in high-frequency tasks.
Fourth, failure and retry costs. When a task fails and is re-executed, the failed call is still billed. Therefore, the metric that truly matters is effective per-task cost, defined as:
Effective per-task cost = total spend across all tasks / number of successfully completed tasks
Suppose the success rate of a batch of tasks improves from 60% to 85%. Even if the per-call price stays the same, the effective per-task cost drops by about 29%. The calculation: 0.60 / 0.85 ≈ 0.706, i.e., a decrease of roughly 29%.
The following example shows how to compute per-task cost from call records. The price parameters are placeholders used only to illustrate the method.
def call_cost(input_tokens, output_tokens, cached_input_tokens, prices):"""prices are placeholder values, unit: CNY per million tokens."""uncached = input_tokens - cached_input_tokenstotal = (uncached * prices["input"]+ cached_input_tokens * prices["cached_input"]+ output_tokens * prices["output"])return total / 1_000_000def task_cost(calls, tool_cost, prices):"""Single task cost = sum of all model call fees + tool fees.Each item in calls is (input_tokens, output_tokens, cached_input_tokens)."""model_cost = sum(call_cost(i, o, c, prices) for i, o, c in calls)return model_cost + tool_costdef effective_unit_cost(task_costs, successes):"""Effective per-task cost = total spend / number of successful tasks.Failed task spend is also included."""successful = sum(1 for ok in successes if ok)if successful == 0:raise ValueError("No successful tasks; cannot compute effective per-task cost")return sum(task_costs) / successful
3. Engineering Levers for Reducing Per-Task Cost
3.1 Route Models by Task Difficulty
In most business workflows, steps like classification, field extraction, and format conversion demand little reasoning capability and can be handled by smaller models. Only steps requiring complex reasoning should call the large model. Routing rules can be simple—the key is to base decisions on observable features.
def choose_model(task):if task["needs_long_reasoning"]:return "large"if task["complexity"] == "low" and not task["needs_tools"]:return "small"return "medium"
After a routing strategy goes live, compare success rates on the same task set. If the small model’s success rate drops noticeably on a certain task type, move that type back to a higher-tier model.
3.2 Control Context Size
Context is the biggest cost amplifier. There are four main practices:
- Inject only content relevant to the current step; avoid stuffing the full history into every call.
- Summarize long conversations in stages, keeping key facts and pending items.
- Use retrieval instead of injecting entire datasets; put only matched fragments into the context.
- Streamline system prompts and keep their prefixes stable so caches can be reused.
3.3 Leverage Caching
Caching operates at three levels, each suited to different scenarios.
- Prefix caching: When system prompts and fixed documents sit at the start of a request and remain stable, the processed prefix can be reused, reducing repeated input costs.
- Result caching: Identical inputs return historical results directly. Set an expiration time to avoid returning stale results after business data changes.
- Semantic caching: Similar questions reuse existing answers. This carries a risk of false hits and may involve user data storage and privacy concerns, which require separate evaluation.
3.4 Limit Agent Loop Iterations
An agent loop without an upper bound lets a few abnormal tasks consume enormous budget. Set a maximum step count, and when the limit is exceeded, record the reason rather than silently continuing.
MAX_STEPS = 8state = init_state(task)for _ in range(MAX_STEPS):action = plan(state)if action["type"] == "finish":breakstate = execute(action, state)else:raise RuntimeError("Maximum steps exceeded; terminate the task and log the failure reason")
3.5 Improve First-Pass Success Rate
The cost of retries depends on why failures occur. Recommended practices:
- Require structured model output and validate field types and value ranges with checking rules.
- Classify failures—distinguish format errors, missing information, and timeouts—and handle each separately.
- For sub-steps that deterministic programs can handle, such as date calculations, unit conversions, and deduplication statistics, do not delegate them to the model.
3.6 Choose the Right Deployment Model
The deployment model determines the cost structure.
- Public cloud API: Low upfront investment, pay-as-you-go billing; suitable for workloads with fluctuating call volumes.
- Private deployment: Requires hardware and operations investment, with relatively stable marginal costs; data stays on-premises, making it suitable for data-sensitive scenarios or stable call volumes.
- Hybrid deployment: Sensitive data is processed locally while general requests go to the public cloud.
The break-even point can be estimated with this formula:
Break-even monthly call volume = monthly fixed cost / (public cloud per-task cost − private deployment per-task marginal cost)
For example, with a monthly fixed cost of 100,000 CNY, a public cloud per-task cost of 0.5 CNY, and a private deployment marginal cost of 0.1 CNY per task, the break-even volume is 100000 / (0.5 − 0.1) = 250000 calls. Beyond that monthly volume, private deployment is more economical.
4. Building a Comparable Cost Evaluation Framework
4.1 Fix the Task Set
The prerequisite for evaluation is a fixed task set. Sample tasks by business scenario, cover three difficulty tiers (simple, medium, complex), and ensure the sample size is large enough to support statistical conclusions. As the business evolves, the task set should be updated regularly while keeping old versions for historical comparison.
4.2 Metric System
| Metric | Meaning | Focus |
|---|---|---|
| Per-task cost | Average spend per attempt | Reflects unit price and call structure |
| Effective per-task cost | Total spend divided by successful tasks | Combines cost and quality |
| Success rate | Proportion of tasks passing acceptance | Determines retry overhead |
| End-to-end latency (P95) | Completion time for 95% of requests | Affects user experience and concurrency resources |
| Human intervention rate | Proportion of tasks needing manual correction | An easily overlooked hidden cost |
4.3 Common Pitfalls
- Comparing only list prices. Ignoring output length and step counts leads to conclusions that diverge from actual spend.
- Ignoring tokenization differences. Different models tokenize differently; the same text may produce different token counts. Always use the actual billed token count.
- Ignoring version changes. After a model update, both cost and performance may shift; retest regularly.
- Looking only at averages. A small number of long-tail tasks may consume a large share of cost; watch quantiles as well.
5. Four Steps for Enterprise Adoption
- Instrumentation. Record business tags, input and output token counts, tool invocations, and result status for every call.
- Establish a baseline. Accumulate two to four weeks of data to obtain the distribution of effective per-task cost across business lines.
- Controlled optimization. Change only one variable at a time—such as routing strategy or context length—and run controlled experiments on the same task set.
- Set budgets and alerts. Define thresholds for per-task cost and daily total spend, and notify owners via monitoring alerts when anomalies occur.
6. Risks and Boundaries of Cost Competition
- Over-compression can hurt quality. If per-task cost drops but the success rate drops in tandem, effective per-task cost rises instead.
- Optimization adds system complexity. Routing, caching, and multi-tier models all require maintenance; their engineering costs should be counted in total investment.
- Compliance requirements constrain choices. Sensitive data may not be eligible for public cloud APIs, which directly changes the cost structure.
- Billing rules may change. Contracts should clearly specify the billing method and a change-notification mechanism to prevent budget overruns caused by rule adjustments.
Conclusion
The price war leaves behind a more transparent market. The basis of comparison has changed: developers and enterprises should focus on task-level spend, success rates, and latency, measured continuously on the same task set. Cost optimization starts with measurable data—architecture and model selection come after.
