Evaluating LLM Cost-Performance After API Price Changes

    When LLM API prices change, the real question is often not whether a task can be done, but at what cost and under what failure rate it can be completed. This article presents a controlled evaluation practice for comparing models after price adjustments: define observable acceptance criteria, measure first-pass rate, unit task cost, rework and risk cost, freeze tasks and prompts, use layered tasks, route requests by capability tier, and track cost attribution and regression over time. It also includes a practical cost formula and routing pseudocode.

    Evaluating LLM Cost-Performance After API Price Changes

    When LLM API prices change, what changes is often not whether a task can be done, but at what cost and under what failure rate it can be completed. Developers who compare only the unit prices in an announcement can easily misjudge the trade-off: a model with a higher unit price may have a lower total bill because it succeeds on the first pass, while a model with a lower unit price may become more expensive due to repeated clarification, context growth, and manual rework. A more reliable approach is to treat model selection as a controlled experiment: freeze the task, freeze acceptance criteria, record consumption, and then discuss cost-performance.

    Break “cost-performance” into measurable quantities

    Cost-performance is not a subjective impression. It should be broken down into at least four items.

    The first is task completion. Write observable acceptance conditions in advance, such as whether a page runs, whether key states can be reproduced, whether boundary inputs do not crash, and whether results can be checked by a script. Completed, partially completed, and undeliverable outcomes must be distinguishable rather than replaced by a conclusion that one model “feels smarter.”

    The second is first-pass rate. When the same prompt allows only one main generation round, can the model deliver a runnable result? If multiple rounds are required to fill gaps, the tokens and human time from subsequent rounds should be included in the total cost.

    The third is unit task cost. Price input and output separately, then deduct the reduction from cache hits. A high cache hit rate usually means that system prompts, tool instructions, and repeated context are not being billed repeatedly at full price, which has a significant impact on long-context coding tasks.

    The fourth is rework and risk cost. If generated results lack tests, have poor structure, or contain implicit privilege violations, the time required for later review and rollback often exceeds the API fee itself.

    A sufficiently general estimate can be written as:

    1. cost per run = input tokens × input unit price
    2. + output tokens × output unit price
    3. + additional billing for cache misses
    4. + number of failed retries × average retry cost
    5. + manual revision hours × internal hourly rate

    Use the unit prices published in the contract or console at the time of evaluation, not old prices from memory. When comparing models, report both “unit price” and “total cost to complete one accepted task” to avoid looking only at the price per million tokens.

    Measure different models with the same ruler

    After a price-change announcement, a common mistake is to change the task, change the prompt, change acceptance criteria, and then declare that a particular model is “more worth it.” A comparable experiment should follow these rules.

    Freeze the tasks. Select a small set of tasks that represent real work, not casual chat samples. For coding scenarios, this can include implementing a small interactive application according to a specification, completing a state machine, handling abnormal inputs, and producing a deployable static resource structure. Each task should include a clear definition of completion.

    Freeze the prompts. In the first round, provide only the same requirements statement, without adding “you missed a certain file” midway. If the business workflow genuinely depends on multiple rounds, write the round limit into the experiment protocol, for example a maximum of two rounds, with the second round allowed only to point out failing test cases and not to provide a reference implementation.

    Make artifacts inspectable. Prefer running results in a sandbox: a local static page, a container, or a temporary environment. Use scripts to check whether key paths exist rather than only reading the model’s self-description.

    Keep complete records. At minimum, save the model tier or reasoning-depth setting, input and output tokens, cache hit ratio, wall-clock time, whether it passed on the first attempt, and a defect list. Without these fields, it is impossible to explain afterward whether “expensive” came from unit price or from waste.

    Annotate reasoning depth separately. Different reasoning intensities of the same model may differ by an order of magnitude in consumption and latency. Mixing “high reasoning” and “default” in one table makes the conclusion meaningless.

    Use layered tasks instead of a single total score

    A single game or a single Q&A test will be biased. It is better to divide tasks into three difficulty layers and ask only whether the model can deliver reliably in each layer.

    The light layer examines instruction following and code completeness: given UI goals, state variables, and win/loss conditions, require generation of runnable frontend logic in one pass, including handling empty input, extreme values, and repeated clicks. This layer shows whether a lower-cost tier is sufficient.

    The medium layer examines strategy simulation under constraints. For example, in a fully simulated sandbox that does not connect to real market data, implement game objectives such as “keep the price above a certain threshold before close,” “accumulate a certain inventory below the volume-weighted average price,” and “sell in batches without significantly breaking the price.” The important point here is not to encourage real market manipulation, but to observe whether the model can encode rules as a state machine, parameterize random traders, and make the game repeatable and replayable. Acceptance checks whether the rules are correctly encoded, not whether the behavior resembles a particular live trading session.

    The heavy layer examines engineering: module separation, externalized parameters, logging, reproducible random seeds, and explainable failure messages. The heavy layer best reveals the gap between “can run a demo” and “can enter a repository.”

    Do not combine the three layers into a mysterious single score. A more useful report shows the pass rate, median cost, P90 latency, and number of files requiring human modification for each layer. Model-selection meetings can look directly at this table.

    Decision rules after price increases

    When some capability tiers increase significantly in price, do not default to either full migration or full retention. Routing by task is more reasonable.

    Requests that can pass reliably in the light layer should stay on the low-cost, low-reasoning tier. Typical examples are template-based refactoring, comment completion, and format conversion.

    Only requests that pass the medium or heavy layer should be upgraded to a high-price tier, with a budget cap. If token or latency thresholds are exceeded, downgrade the request or hand it off to a human to avoid a single long reasoning run blowing through the monthly budget.

    Use cache-friendly prompt structures for repeated context: place stable system instructions first and variable user data later. Whether caching is billed and how it is billed depends on the provider’s rules; in the experiment, record only the actual billing difference between hits and misses.

    Create a separate budget for retries. If the first-pass rate drops from 70% to 40%, expected cost rises significantly even if unit price stays unchanged. After a price change, rerun a small sample rather than relying on old first-pass assumptions.

    The following routing pseudocode expresses only the policy and is not tied to any vendor API:

    1. function choose_tier(task):
    2. if task.layer == "light" and historical_pass_rate("low") >= 0.8:
    3. return "low_cost"
    4. if task.needs_multi_constraint or task.layer == "heavy":
    5. return "high_reasoning"
    6. return "mid"
    7. function run_with_budget(task, tier):
    8. result = invoke(tier, task.prompt, max_tokens=task.budget)
    9. if not accept(result):
    10. if retries_left(task) and spend(result) < task.spend_cap:
    11. return run_with_budget(narrow_prompt(task, result), tier)
    12. return handoff_to_human(result)
    13. return result

    Cost attribution and regression

    Evaluation data should become part of daily engineering rather than stopping in a spreadsheet. Call logs, billing details, and artifact versions can be placed in a logging service, object storage, and a code repository respectively. Monitoring alerts should care only about anomalies: a sudden increase in single-task cost, a sharp drop in cache hits, a rise in timeout ratio, and an increase in acceptance failure rate. If an organization already uses general capabilities such as logging, object storage, and monitoring/alerting on Baidu AI Cloud, it can correlate these three data types by task ID; there is no need to create a separate measurement taxonomy for evaluation.

    Whenever prices or model versions change, run a regression on the same frozen task set. Compare only relative changes: change in pass rate, change in cost per run, and change in latency. There is no stable absolute answer to “who is best,” because prices, caching policies, and task distributions all change.

    Conclusion

    After a price adjustment, what remains worth using is not the “strongest” or “cheapest” tier in a slogan, but the tier that passes acceptance and has the lowest expected total cost on your task distribution. Write requirements as checkable specifications, consumption as billing fields, and upgrades as routing rules; cost-performance then changes from an argument into a reproducible engineering metric. Prices may change again, but as long as the task set remains, conclusions can be updated without falling back on gut feeling.