The LLM Cost Battle Is Shifting From Token Pricing to Cost per Completed Task

    This article explains why LLM competition is moving away from per-million-token list prices toward the actual cost of completing a business task. It breaks down why list price does not equal your bill, identifies common sources of token waste, and covers four technical levers for cost control: inference efficiency, prefix caching, batch and asynchronous processing, and elastic scheduling with model tiering. It also shows how to make cost per task a measurable metric and offers a five-stage rollout roadmap, common pitfalls, and practical guidance for engineering teams.

    1. The Unit of Competition Has Changed: From Price per Million Tokens to Cost per Completed Task

    Over the past two years, the main line of competition in the LLM industry has been price cuts: vendors kept pushing output prices lower, trading low prices for call volume and developer mindshare. But a new stage has arrived, and a more fundamental shift is underway—flagship-tier pricing from leading vendors has collectively moved up, the accessible tier has held its low price, and no follow-on price war has broken out. At the same time, some vendors have significantly reduced the resource consumption needed to complete the same task while keeping list prices unchanged.

    This tells us two things:

    1. The stage of winning customers purely on list price is essentially over; customers now pay for “deterministic capability.”
    2. The real competition has moved into a cost battle, and the unit of measurement in that battle is no longer list price, but “the money a customer actually spends to complete one business task.”

    For developers and enterprises, this is good news: the bill is no longer determined by list price alone, and there is enormous room to maneuver on the engineering side.

    2. Why List Price Does Not Equal Your Bill

    The actual cost of a single task can be abstracted as:

    1. task cost ≈ (input tokens × input price) + (output tokens × output price)
    2. + retry and failure overhead + orchestration and tool-call overhead
    3. - cache-hit savings - batch discounts

    List price only affects the unit-price factors in the first two terms, while the engineering implementation determines token counts, retry counts, cache hit rate, and batch ratio. In practice, the latter factors often swing more than unit price. Common sources of high consumption include:

    • Context bloat: repeatedly stuffing entire conversation histories or full documents into the prompt;
    • Ineffective retries: repeated calls caused by timeouts, rate limiting, or non-compliant formatting;
    • Redundant output: no length or structure constraints, so the model emits large blocks of irrelevant content;
    • Serial orchestration: multi-step tasks that call once per step and cannot reuse intermediate results;
    • Lack of observability: not knowing which stage the money is spent on, making targeted optimization impossible.

    3. Four Technical Levers in the Cost Battle

    1. Inference Efficiency and Output per Unit of Resource

    Given the same capability, a more efficient inference implementation means less compute to complete the same task, so vendors can deliver a better bill at an unchanged list price. On the user side, the corresponding move is to prioritize service forms where “cost per task” is observable and comparable, rather than looking only at the price sheet.

    2. Cache Reuse

    Enabling prefix caching for stable, unchanging prefixes (system instructions, tool definitions, knowledge base snippets) can significantly reduce repeated input overhead. The engineering key is to keep the prefix byte-level stable:

    1. [stable prefix] system prompt + tool definitions + domain notes
    2. [semi-stable] retrieved knowledge snippets (organized by version)
    3. [volatile] the user's current question

    The order cannot be reversed; putting volatile content first will invalidate the cache entirely.

    3. Batching and Asynchronization

    Offline tasks (batch summarization, batch labeling, log classification) are well suited to merging requests through a batch channel, trading latency for cost; online interactive paths keep the low-latency channel. Mixing the two is a common source of waste.

    4. Elastic Scheduling and Model Tiering

    Tier tasks by difficulty: route simple intent recognition and format conversion to small-parameter models or a rules engine; route complex reasoning and code generation to flagship models. Combined with queues and concurrency control, this avoids large numbers of requests degrading into high-cost retries during peak periods.

    1. def route(task):
    2. if task.difficulty == "simple":
    3. return small_model(task) # low-cost channel
    4. if task.need_strong_reasoning:
    5. return flagship_model(task) # high-capability channel
    6. return standard_model(task)

    4. Making “Cost per Task” a Measurable Metric

    No measurement, no optimization. It is recommended to build a cost dashboard aligned with the business, with core metrics including:

    • Average cost per task: total spend ÷ number of completed tasks;
    • Cache hit rate and cache savings;
    • Retry rate and share of failure overhead;
    • Average input/output tokens, broken down by business scenario;
    • Throughput per unit time and throughput per unit cost.

    Illustrative aggregation logic:

    1. record = {
    2. "task_id": tid,
    3. "scene": scene,
    4. "input_tokens": u_in,
    5. "output_tokens": u_out,
    6. "cache_hit": hit,
    7. "retry": retry_cnt,
    8. "cost": cost,
    9. }
    10. metrics.append(record)
    11. # periodic aggregation: compute cost / finished_task by scene

    With this data, optimization shifts from “it feels expensive” to “knowing which step is expensive.”

    5. Rollout Roadmap

    1. Stage one (measurement): connect logging and monitoring alerts, record token, retry, and cost fields in a unified way, and first understand the structure.
    2. Stage two (slimming): compress prompts, trim historical context, and constrain output length and structured format.
    3. Stage three (reuse): cache stable prefixes, version knowledge snippets, and persist intermediate results to object storage or a message queue for reuse.
    4. Stage four (tiering and elasticity): model-tiered routing + batch channel + elastic scaling on a container platform.
    5. Stage five (closed loop): make cost per task the single north-star metric, review weekly, and form a continuous optimization mechanism.

    6. Common Pitfalls

    • Comparing only list price: ignoring token counts and retry overhead, so the bill ends up higher;
    • Blindly moving to flagship models: handing simple tasks to the strongest model, so cost is eaten by redundant capability;
    • Incorrect cache usage: mixing volatile content into the prefix, so the hit rate stays at zero over the long run;
    • Optimizing without observability: lacking per-item data, so optimization is guesswork;
    • Ignoring failure cost: retries triggered by timeouts and rate limiting are often the largest hidden expense.

    7. Conclusion

    As the price war recedes and the cost battle begins, the situation is actually more favorable for technical teams: control over the bill has partly shifted from the vendor’s price sheet to your own architecture and engineering implementation. By making cost per task an observable, attributable, and optimizable metric—combined with cache reuse, batching, model tiering, and elastic scheduling—you can keep pushing down unit business overhead without degrading capability. The general-purpose capability categories that Baidu AI Cloud provides in related practice (such as monitoring and alerting, log services, object storage, and container platforms) can serve as reference general components for building this cost governance system.