How to Evaluate LLM Cost-Effectiveness After a Price Increase
After an API price change, per-million-token rates are only one coefficient in the bill. This article explains how to model real task cost, score quality with automated assertions, separate single-turn, multi-turn, and long-context workloads, and lock routing, caching, and observability into the stack so the next price move is a parameter update rather than a model switch.
1. A Price Change Is the Start of a Cost-Model Rebuild, Not the End
When a model provider announces a large API price change and ships a new version at the same time, the most common mistake is to compare “price per million tokens” and stop there. That looks rational, but it skips the step that actually drives the bill: the unit price is only a coefficient. What decides spend is the shape of the task and how the model is called.
A real coding task has at least five cost components:
- Input tokens (prompt, repository context, and conversation history)
- Output tokens (code, explanations, and patches)
- Different rates for cache hits and cache misses
- Intermediate tokens produced during reasoning or “thinking”
- Repeat spend from failed retries, context-overflow rewrites, and tool-call round trips
A price increase often hits only one or two of these lines. Task complexity decides which line dominates. The right response is not to switch models first. It is to define your own cost-accounting rules.
2. Write “Value for Money” as a Formula You Can Compute
Teams should share one abstract model:
# Generic cost estimate. Unit prices are placeholders.def estimate_cost(usage, price):return (usage.input_uncached * price.input_uncached+ usage.input_cached * price.input_cached+ usage.output * price.output+ usage.reasoning * price.reasoning)# Value = task quality score / end-to-end total costdef value_score(quality, cost):return quality / max(cost, 1e-9)
quality must measure task completion, not subjective preference. A practical way to quantify it is to split the task into assertions that can be checked automatically: whether the build passes, the test pass rate, whether the artifact is reachable, and whether turn-by-turn goals are met (for example, “close above a threshold,” “accumulate a set size below the average price,” or “distribute shares without breaking through a price”). The assertion pass rate is already a score from 0 to 1. No human grading is required.
3. Task Set Design: Measure Single-Turn and Multi-Turn Separately
The original approach is worth keeping in abstract form: run the same prompt on different models and record only what was spent. That is fair, but it covers only the single-turn case. A complete task set should include three types:
- Single-turn, all at once. Tests whether the model can understand the request, plan the structure, and produce a runnable artifact in one shot. These tasks are most sensitive to output tokens and reasoning depth.
- Multi-turn iteration. Adds constraints on top of the first result (for example, adding turn-by-turn goals, or turning a sandbox into a playable loop). These tasks expose context management and instruction-following stability. Cost grows roughly linearly with turns, but the cache hit rate rises sharply.
- Long-context engineering tasks. The model must read many repository files and then change them. Cost is almost entirely uncached input tokens. After a price increase, this is the amplifier that is easiest to miss.
Run each task at least three times and take the median, so a single sample does not skew the result.
4. The Agent Runtime Is an Underestimated Cost Variable
The same model, inside different execution frameworks, can produce bills that differ by several times. The framework decides the cap on tool-call turns, the automatic retry policy after failure, how context is compressed and trimmed, and whether high reasoning depth is on by default. A report must record the triple “model + reasoning depth + execution framework.” Otherwise the result cannot be reproduced.
In practice, put hard guardrails on the framework:
limits:max_turns: 30 # cap round tripsmax_retries: 2 # cap retries after failurecontext_budget: 120k # context budget; compress when exceededreasoning: medium # default reasoning depth; raise it only for hard taskscache: enabled # prefix cache to spread the cost of repeated input
5. Putting It into Production: Tiered Routing and Cost Observability
After the evaluation, the gain comes from baking the conclusion into the architecture, not leaving it in a document.
- Tiered routing. Grade tasks by complexity. Simple rewrites, formatting, and single-file patches go to a lower-cost model. Cross-module refactors and hard debugging go to a higher-capability model. A rules engine or a lightweight classifier is enough.
- Stable prefixes. Put the system prompt, tool descriptions, and repository conventions first and keep them byte-for-byte stable so they qualify for the cache discount. Move volatile timestamps and random IDs to the end of the prompt.
- Batching and async. Combine non-real-time work into fewer submissions. That often lands a better billing tier.
- Observability. Instrument the gateway so every call records input, output, cached, and reasoning tokens, latency, and assertion results. Set budget alerts (using general cloud logging, monitoring and alerting, and message queues). That avoids a surprise bill at month end.
- Reuse artifacts. Treat reachable demos and test reports as acceptance evidence, so people stop paying for “run it once more and see.”
6. Four Common Mistakes
- Looking only at the unit price. On long-context tasks, uncached input is the main cost.
- Ignoring retries. One failed retry can wipe out the entire unit-price advantage.
- Defaulting to maximum reasoning depth. Medium depth is enough for most tasks. Extra depth has diminishing returns on quality.
- Replacing assertions with a subjective impression. Without automatic checks, you cannot recompute the comparison the next time prices move.
7. Conclusion
Price changes are an external variable. The evaluation system is an internal asset. If the task set, the assertions, the cost accounting, and the execution-framework guardrails are solid, any price change is only a parameter update: rerun the task set, recompute quality / cost, and redraw the routing thresholds. The method does not depend on any one vendor’s pricing details, and it does not break if a product is withdrawn. That is the most stable way to judge cost-effectiveness when prices move.
