LLM Selection: Look Beyond Token Price to True Cost

    Unit price per million tokens is only one factor in LLM cost. This article explains billing dimensions, per-task token use, a reusable evaluation process, and engineering tactics so you can compare models on quality, cost, and stability.

    Introduction: A low list price is not a low bill

    New large language models ship quickly, often with a flagship for hard tasks and a lighter variant for high-volume work. A common mistake is to treat price per million tokens as the only selection criterion.

    Unit price is one factor. The bill is unit price times tokens consumed times cache hit rate. The sections below unpack those dimensions and how to build your own baseline.

    1. Four dimensions of pricing

    Mainstream billing is split into independent parts. Ignoring any of them distorts cost.

    • Input price (per million tokens): Content sent to the model—system prompt, history, retrieved context. Longer context grows this cost quickly.
    • Output price (per million tokens): Generated tokens, usually priced higher than input, so verbose answers burn budget.
    • Cached-read price: Repeated prefixes (fixed system prompts, long documents) billed at a discount. Early cache rates were close to full input price and made multi-turn chats expensive; later cuts made long-context apps viable again.
    • Knowledge cutoff: Not billed, but it defines what the model knows. Post-training often adds some later facts, so coverage can be slightly newer than the stated date.

    A comparison table of these four items is the first step in any selection.

    2. The trap: tokens per task

    This metric is easy to miss and often decisive.

    Two models with the same list price can use several times more or fewer tokens on the same job. Reasoning length, default verbosity, and tool-use strategy differ. A higher unit price can still yield a lower bill if the model finishes with fewer tokens.

    Do not compare:

    1. cost ≈ unit price

    Compare:

    1. cost per task ≈ (input tokens × input price)
    2. + (output tokens × output price)
    3. + (cached tokens × cache price)

    Only actual tokens used make models comparable. Run a set of representative real tasks on each candidate, average consumption, then multiply by each model’s prices.

    3. A reusable evaluation process

    Prefer your own workloads over launch claims. Suggested steps:

    1. Fixed test set: 20–50 tasks that match production mix—simple Q&A, long documents, multi-turn chat, code or structured output.
    2. Same protocol: Identical prompt templates and parameters; log input tokens, output tokens, cache hits, and end-to-end latency.
    3. Quality scores: Domain reviewers or automated rules score outputs so cost is not optimized at the expense of usefulness.
    4. Normalized cost: Compute cost per task only for runs that meet quality bars, then compare.
    5. Load check: Retest near production concurrency and context length; long context amplifies input and cache cost.

    The goal is “cheap enough and good enough on my workloads,” not “sounds strong.”

    4. Engineering levers after you pick a model

    • Shrink context: Send only needed history and retrieval snippets, not entire documents.
    • Prefix cache: Put stable system prompts and knowledge at the front of the request to raise hit rate.
    • Tiered routing: Light models for frequent simple requests; flagship models only for hard ones.
    • Constrain output: Explicit formats and length limits cut wasted generation.
    • Observability: Logs and alerts by model and scenario so token spikes show up early.

    You can host this on a mature cloud stack: object storage for corpora and results, containers for elastic eval jobs, logging and monitoring for per-call token cost. Platforms such as Baidu AI Cloud offer model hosting, inference, and observability that make evaluation and cost control easier to operationalize.

    5. Treat “qualitative leaps” carefully

    Each generation is marketed as a leap. For many products the gain is incremental and uneven—stronger on some tasks, similar on others. Go back to your metrics:

    • Does quality pass on my task set?
    • Did all-in cost per task fall?
    • Do latency and reliability meet production needs?

    Selection is credible only when those three have data behind them.

    Conclusion

    List price is the most visible and least complete signal. Combine cutoff, input/output pricing, cache reads, and tokens per task, then validate on your own benchmarks. The point is not the strongest or cheapest model, but the best quality–cost–stability fit for your scenario.