AI Model Pricing and Self-Improvement Risk: How to Calculate Selection Costs
List prices are only part of the bill. This article shows how to estimate unit task cost, account for cache hits, agent retries, and capability tiers, and use a test set plus a checklist so model selection reflects real workflows rather than sticker price.
Introduction
A large model’s list price is only part of the bill. The same model can be cheap for simple Q&A and much more expensive for multi-step agent tasks. When enterprises choose a model, they need to look at price, task flow, capability tier, and risk control together. This article follows that approach and provides calculation methods and a checklist you can apply directly.
1. Calculate unit task cost, not just unit price
Unit price is the rate per million tokens. It sets the base cost of each call, but it does not show what it costs to finish a job. A better metric is unit task cost: the average spend to complete one task.
Unit task cost = total cost of a single task ÷ task success rate
The denominator uses success rate because failed tasks still consume tokens.
For illustration, assume input is $8 per million tokens, output is $40 per million tokens, and cached input is $0.4 per million tokens. These figures are for demonstration only; use the vendor’s official price list.
Assume a task needs 1 million input tokens, 70% cache hit, and 50,000 output tokens:
- Missed cache: 300,000 tokens × $8/million = $2.40
- Cache hit: 700,000 tokens × $0.4/million = $0.28
- Output: 50,000 tokens × $40/million = $2.00
- Total: $4.68
Without cache, input is 1 million tokens × $8/million = $8.00, plus $2.00 output, total $10.00. In this example, cache cuts single-task cost by about 53%.
The result depends on hit rate. At 20% hit rate, savings shrink. Use your real business hit rate, not demo numbers.
Before relying on cache, confirm with the vendor:
- Whether cache requires an exact prefix match (one character change invalidates it)
- How long cache entries are retained
- Whether writing to cache is billed extra
- Minimum length of cacheable content
These conditions are usually stated in official documentation; treat the docs as the source of truth.
2. Where multi-step agent cost comes from
Agents typically call the model repeatedly, read files, invoke tools, and handle errors. Each round resends prior context, so total input grows with the number of rounds. A rough estimate:
Total token use ≈ average context length per round × number of rounds + tool return content + retry overhead
This formula implies two things. First, reducing rounds often beats cutting unit price. Second, long tool returns should be trimmed or summarized before they go back to the model.
Retries are easy to miss. If every failure reruns the full task, average cost rises as success rate falls:
| Task success rate | Cost multiplier | Meaning |
|---|---|---|
| 100% | 1.00 | No retries |
| 90% | 1.11 | About 11% extra per successful task |
| 80% | 1.25 | About 25% extra |
| 70% | 1.43 | About 43% extra |
The multiplier is 1 ÷ success rate. The table assumes a full rerun on every failure; real results may be better or worse. Use your own test data.
Prepare a fixed test-task set covering common and edge cases. Record each model’s success rate, token use, and completion time. Unit task cost from that data is a better buying guide than any public price list.
3. Capability and price are not linear: pick the tier by task
Flagship models cost more, but not every task needs them. Tasks differ in reasoning depth, output-format stability, and latency. Use this selection sketch; confirm tiers with tests:
| Task type | Metrics to watch | Tier to try first | How to validate |
|---|---|---|---|
| Document summarization, internal Q&A | Accuracy, latency | Lightweight | Spot-check 100 items; measure error rate |
| Code generation, unit tests | Test pass rate | Start lightweight; upgrade on failure | Run the project’s test suite |
| Multi-condition policy recommendations | Rule-following rate | Flagship | Compare item by item with human conclusions |
| High-risk decision support | Explainability, traceability | Flagship plus human review | Keep full logs and audit regularly |
Vendors sometimes publish scores on a coding benchmark. Those numbers are useful only when they include the benchmark name, version, evaluation date, task set, and cost accounting method. Missing any of these makes the figure of little use.
