How to Choose an LLM: Pricing, Capabilities, and Agent Testing
Choosing a model by its per-token price alone usually leads to higher real costs, because retries and human fallback can outweigh the savings. This guide explains how to define inputs and acceptance criteria first, read context and output limits correctly, convert per-million-token pricing into cost per task, and benchmark tool-calling agents with a fixed task set. It also covers input modalities, quantifiable assertions, and capacity planning with headroom.
1. Why Picking a Model by Unit Price Usually Backfires
The same task—reading a long document, editing a piece of code, or making a few tool calls—can cost two orders of magnitude more on one model than another for a single turn. But swapping in the cheaper option does not necessarily save money: if it fails on the first turn, you retry three times and add manual fallback, so the real cost goes up. Conversely, the most expensive model is not always required; many high-frequency, structured subtasks pass reliably on a lightweight tier.
So the first principle of model selection is not to compare prices. Define what the input is and what the acceptance criteria are, then calculate the cost.
2. Define Inputs and Acceptance Criteria Before Discussing Cost
1. Input modality narrows the candidate pool
Grouping tasks roughly by input type immediately shrinks the candidate list:
- Plain text plus images: most general-purpose tiers support this, so the comparison comes down to long-document understanding and the stability of structured output;
- Direct video input: only a few models support it natively, so if your pipeline needs to “watch the video directly,” rule out the ones that cannot;
- Plain text with very long context: focus on the window limit and the rules for whether input and output share the window.
2. Acceptance criteria must be quantifiable
“Was the answer good?” cannot be re-tested. What can be re-tested: whether fields are complete, whether the JSON parses, whether function-call arguments are valid, and whether the turn passed. Only when acceptance is written as assertions can you compare models.
3. A neutral trial order
- High-frequency text-and-image work and structured extraction: start with a lightweight tier to establish a cost baseline;
- Budget-sensitive work that still needs a large generation budget: bring in a long-output tier for comparison;
- Native video understanding: validate the tiers that accept video input first;
- Complex agents: do not judge by name; run the same task set and decide by score.
3. Three Traps in the Spec Sheet
Four mainstream models (referred to here by generic tier names: flagship, lightweight, long-output, and long-window) usually all claim million-level context, tool calling, and text-and-image understanding in their public documentation, but the details differ significantly:
| Tier | Input types | Context | Key single-output budget notes |
|---|---|---|---|
| Flagship | Text, images, video | ~1,000,000 tokens | ~131k non-thinking; ~262k thinking |
| Lightweight | Text, images | 1M, max input ~960k | Max ~64k |
| Long-output | Text, images | 1M | Max ~384k |
| Long-window | Text, images, video | 1,048,576 tokens | ~131k by default, limited by remaining context |
Three conclusions to remember:
- The output budget is not the final answer length. The thinking process also consumes generated tokens; in thinking mode the chain of thought and the answer share the budget, so the final answer gets compressed.
- Input and generation may share the total window. “Million-token context” does not mean you can fill a million tokens of input and still generate another million.
- The units are not exactly equivalent. Vendors write K and M differently, so do not treat 1M and 1,048,576 as strictly identical; leave headroom in capacity planning.
4. Pricing: Converting “Price per Million Tokens” into “Cost per Task”
Unit prices are usually split into input and output, and thinking tokens are generally billed as output. What you should actually calculate is:
cost per task ≈ input tokens × input unit price+ (chain-of-thought tokens + final answer tokens) × output unit price+ number of failed retries × cost per turn
For example, a long-document extraction task with 200,000 input tokens and 2,000 output tokens, where thinking mode produces an extra 8,000 chain-of-thought tokens, is billed for 10,000 tokens on the output side. In that case, a model that is “cheap on output but verbose in thinking” may end up more expensive than one that is “slightly higher in unit price but passes on the first try.”
5. Agent Scenarios: Max and Flash in a Name Do Not Indicate Success Rate
All four tiers have tool-calling capability, and neither context length nor naming suffixes prove agent success rates. The real bottlenecks for agents are: the validity of arguments across multi-turn tool calls, error recovery, instruction retention in long context, and whether constraints get “forgotten” midway.
The recommendation is to re-test with a fixed task set, using metrics such as single-turn pass rate, average number of tool-call turns, argument validation failure rate, number of manual interventions, end-to-end latency, and cost per task.
# Minimal reusable re-test skeletoncases = load_cases("agent_tasks.jsonl") # each entry has input and expected assertionsfor model in candidates:stat = {"pass": 0, "calls": 0, "cost": 0}for c in cases:r = call_model(model, c.input, tools=c.tools)stat["calls"] += r.tool_callsstat["cost"] += estimate_cost(r.usage)if all(assertion(r) for assertion in c.asserts):stat["pass"] += 1report(model, stat)
6. Practical Recommendations
- Use a lightweight tier as the cost baseline for high-frequency subtasks, and a long-output tier for scenarios that need a large generation budget;
- Leave 10%–20% headroom in capacity planning based on input and output sharing the window;
- Turn acceptance into assertions so that switching models is comparable;
- When native video input is involved, confirm the candidate pool before discussing price;
- For complex agents, always decide based on measured results from the same task set, not by ranking specs or names.
In practice with model services on platforms such as Baidu AI Cloud, this order—define inputs and acceptance first, convert to cost per task, then re-test with a task set—also applies to selecting general-purpose LLMs, and can be combined with general capabilities such as log services and monitoring alerts for continuous regression.
