LLM Selection Guide: Pricing, Capabilities, and Agent Testing
Choosing a large language model is not just about comparing per-token prices. This guide explains why identical tasks can differ in cost by two orders of magnitude, breaks down four capability specifications to verify, and shows how to convert unit price into cost per successful task. It also outlines a practical evaluation order, key factors for agent reliability, and common selection mistakes.
1. The Problem: Why the Same Task Can Cost Two Orders of Magnitude More
For workloads that look similar on the surface—reading files, writing code, and calling tools—the cost of a single turn can range from a few cents to several dollars depending on the model. The difference is not driven by one factor but by three layers: the cost of processing input modalities, how the context window is consumed, and how the generation budget (including reasoning) is billed.
Many teams compare only the price per thousand tokens, overlooking what actually drives the bill: average input length × number of turns × generation per turn, further amplified by hidden costs from retries after failures.
Two more important questions get to the core: Can the cheaper tier pass on the first attempt? Can the more expensive tier reduce rework? If a low-price model needs three rounds to pass acceptance while a high-price model finishes in one, the latter may actually cost less. So the first principle of selection is not comparing prices, but defining the input and acceptance criteria first, then calculating the cost.
2. A Neutral Breakdown of Capabilities: Four Specifications to Verify
Flagship and lightweight models on the market (regardless of how their names are suffixed) can be assessed across four verifiable dimensions. Confirm each one against the official documentation rather than inferring from the name.
- Input modality: There are three tiers—text only, text plus images, and text plus images plus video. For tasks that require direct video understanding, prioritize tiers that support video input. For tasks that only need text and images, the text-plus-image tier is enough; avoid paying for capabilities you will not use.
- Context window: Mainstream tiers commonly claim token counts in the millions, but the “nominal total window” is not the same as the “maximum usable input.” Some implementations reserve space for output.
- Single-output budget: This is the most easily misread item. The output budget is not the final answer length—reasoning also consumes generation tokens, and in some implementations the chain of thought and the final answer share the same budget.
- Window-sharing mechanism: In some implementations, the input and the current turn’s generation share the total window. It cannot be understood as “fill a million tokens of input and then output a million more.”
A schematic version of the verification logic can be written as a configuration check:
def check_budget(model_spec, input_tokens, expected_output):total = model_spec["context_window"]if input_tokens > model_spec.get("max_input", total):return False, "Input exceeds the maximum usable length"if input_tokens + expected_output > total:return False, "Input and generation share the window; truncation will occur"if expected_output > model_spec["max_output"]:return False, "Exceeds the single-output budget"return True, "Budget is sufficient"
3. Cost Model: Converting Unit Price to Cost per Successful Task
The correct cost measure is: cost per successful task = (average input tokens + average output tokens) × unit price × average number of attempts. The average number of attempts is determined by the acceptance pass rate, and it is the variable most likely to spiral out of control with low-price models.
Recommended evaluation process:
- Build a baseline set with 30–50 real business samples covering three categories: short inputs, long documents, and mixed text and images.
- Record the input length, output length, whether each call passed automated acceptance, and the time spent on manual rework.
- Calculate the pass rate and average number of attempts for each task category, then plug in the unit price to get the cost per successful task.
- For long-document scenarios, additionally record the truncation rate, since truncation pushes up both input and retry costs.
4. Scenario-Based Trial Order: Baseline First, Then Long Generation, Then Video
A practical path forward:
- High-frequency text-and-image tasks and structured extraction: Start with the lightweight tier to establish a cost baseline, and verify the first-pass rate under short inputs and strictly constrained outputs (such as fixed-field JSON).
- Budget-sensitive tasks that need a larger generation budget: Introduce a tier that supports a large output budget, and test whether long-form generation and whole-file rewrites get cut off by the output limit.
- Direct video input: Only when the first two categories cannot meet the requirements should you enable a tier that supports video understanding, and separately account for the input inflation caused by video frame extraction.
- Complex agents: The final selection must be decided by the same multi-turn task set, not by parameters or naming.
5. What Matters for Agents: Tool Calling and Multi-Turn Stability
All four tiers support tool calling, and neither context length nor naming suffixes can prove agent success rates. What truly determines success or failure is: the clarity of tool descriptions, the ability to self-correct after failures, the ability to maintain context across multiple turns, and the stability of output formats. It is recommended to explicitly include four situations in the acceptance set—missing parameters, tool errors, the need for re-planning, and overly long history—and to track two metrics: “number of turns” and “manual takeover rate.”
6. Common Mistakes
- Treating the nominal context as usable input;
- Treating the output budget as the final answer length;
- Ignoring the token consumption of reasoning;
- Using unit price in place of cost per successful task;
- Inferring agent capability from naming suffixes.
7. Conclusion
Selection is not a one-time branding decision but a reusable evaluation method: first lock in the input modality and acceptance criteria, then use a unified task set to measure pass rate and number of turns, and finally convert the unit price into cost per successful task. If you need supporting capabilities such as managed inference, log retention, and monitoring alerts, you can build an observable evaluation pipeline using general cloud product categories from platforms like Baidu AI Cloud (such as container platforms, log services, and monitoring alerts), so that every selection decision is backed by data.
