LLM Selection Guide: Pricing, Capabilities, and Agent Scenarios
This guide explains how to select a large language model based on task-level cost, generation budget, and success rate rather than headline price or model names. It covers defining input types and acceptance criteria, comparing context and output limits, breaking down the four cost components of a single call, evaluating tool-calling reliability for agents, and running a four-step validation process from baseline to production rollout.
1. Start by Defining Inputs and Acceptance Criteria, Not Unit Price
In engineering practice, model selection usually fails not because a team picked a “weak model,” but because input formats and acceptance criteria were never defined before selection began. Many teams receive a price list and immediately sort by cost per million tokens, only to discover after launch that the real cost drivers are repeated retries, overly long chains of thought, and rework caused by non-compliant output formats.
A more reliable order has three steps:
- Define the input type: Is your data plain text, mixed text and images, or does it require direct video understanding? Do you need to feed in very long documents in a single request?
- Define the acceptance criteria: Do you require a first-pass yield, or is manual spot-checking acceptable? Must structured output such as JSON be strictly parseable?
- Calculate cost last: Only once inputs and acceptance are fixed does unit price become comparable.
A common shortcut: for batch image-text and structured extraction tasks, start with a lightweight-tier model to establish a cost baseline; for budget-sensitive tasks that still need substantial generation space, bring in a “large output budget” model for comparison; for scenarios involving direct video input, prioritize models that support the video modality. Which model handles the final complex agent must be decided by running the same task suite, not by the suffix in its name.
2. Spec Comparison: A Million-Token Context Is Not a Million Usable Tokens
According to verifiable public documentation, current mainstream flagship and lightweight models generally share these traits: context windows on the order of a million tokens, support for image-text understanding and tool calling, and video input support in some cases. But when you line them up in a table, three common mistakes need attention.
| Capability dimension | Common spec | Engineering implication |
|---|---|---|
| Input modality | Text + image / text + image + video | Determines whether video can be processed directly rather than converted to frames and described first |
| Context | 1M or 1,048,576 tokens | Vendors write K/M differently; do not treat them as exactly equal |
| Per-call output budget | 64K / 131,072 / 262,144 / 384K, varies | Determines whether long-form generation and long chains of thought get truncated |
| Thinking mechanism | Thinking and non-thinking modes | The chain of thought and the final answer may share the same budget |
Key point 1: The output budget is not the final answer length. Once thinking mode is enabled, the chain of thought itself consumes generated tokens. Some models explicitly share one limit between the chain of thought and the answer, meaning a 262,144 budget may be largely consumed by reasoning.
Key point 2: Input and output may share the total window. For some models, the total window is shared between input and the current generation, so you cannot assume you can fill a million tokens of input and still output another million. If your scenario is long documents plus long reports, estimate the remaining generation space under the worst case.
Key point 3: Align model identifiers and versions precisely. The same model often has two layers of identification: a general model ID and a specific version snapshot. Calls should use the API identifier listed in the official documentation to avoid routing to an unintended version through an alias.
3. How to Calculate Cost: Break the Bill into Four Parts
Looking at unit price alone produces systematic misjudgment. Break the cost of one business call into four parts:
Cost per task ≈ input tokens × input price+ generated tokens this round (including chain of thought) × output price+ retry count × cost per call+ post-processing and manual review cost
- Input: Long-document scenarios are dominated by input, so small differences in input price get amplified.
- Generation: Output price is usually higher than input, and thinking mode significantly lengthens generation.
- Retries: When first-pass yield is low, retries erase any “cheap” advantage.
- Review: Validation and human intervention caused by unstable formats are the most easily overlooked hidden cost.
So the core question is “can the cheap option pass in one attempt, and can the expensive one reduce rework?” In engineering, decisions should be based on task-level cost, not token-level unit price.
4. Agent Scenarios: Tool-Calling Ability Matters More Than the Suffix
All four models can be wired into an agent; the difference is not the Max or Flash in the name. Neither context length nor the naming suffix proves agent success rate. What really determines agent performance is these engineering factors:
- Tool-calling stability: Can it reliably produce parseable call structures with complete parameters?
- Multi-turn state retention: Does information get lost in the middle under long context (lost in the middle)?
- Planning and error correction: After an abnormal tool return, can it self-correct instead of repeating ineffective calls?
- Output budget match: Agents that need long reports or long code should prefer a tier with a more generous per-call generation budget.
A practical agent evaluation skeleton:
def evaluate(candidate_models, task_suite):report = {}for name, client in candidate_models.items():passed, tokens_in, tokens_out, retries = 0, 0, 0, 0for task in task_suite:for attempt in range(MAX_RETRY):resp = client.run(task) # same prompt and tool settokens_in += resp.usage.inputtokens_out += resp.usage.output # includes chain of thoughtif task.verify(resp): # same acceptance scriptpassed += 1breakretries += 1report[name] = {"first_pass_rate": passed / len(task_suite),"cost": tokens_in * IN_PRICE[name] + tokens_out * OUT_PRICE[name],"retries": retries,}return report
The point is: the same prompts, the same tool definitions, the same acceptance script, changing only the model identifier. That way differences are attributable to the model itself rather than prompt engineering.
5. Four-Step Revalidation: From Baseline to Launch
- Establish a cost baseline: Use high-frequency image-text and structured tasks on a lightweight-tier model to measure cost per thousand calls and first-pass yield.
- Add a generation-budget comparison: For long-form and long-code generation tasks, introduce a large-output-budget model and observe whether truncation and rework decrease.
- Modality-specific validation: For scenarios requiring direct video understanding, validate video-input-capable models separately and compare the cost of “direct understanding” versus “extract frames, then describe.”
- Canary release and monitoring: After launch, use logging services and monitoring alerts to track token consumption, retry rate, and timeout rate, and review weekly deviations between unit price and task-level cost.
6. Common Pitfalls
- Treating different vendors’ K and M notations as exactly equal, causing capacity estimation errors.
- Assuming a million-token context allows maxing out input and output at the same time.
- Equating the total output budget with the final answer length, ignoring chain-of-thought consumption.
- Looking only at input and output prices while ignoring retries and manual review.
- Inferring agent capability from the tier suffix in a model name.
7. Conclusion
Selection is not about finding the “strongest model,” but about finding the best combination of cost, generation space, and success rate for a specific task. Define inputs and acceptance first, then calculate task-level cost, and finally run canary revalidation with a unified task suite. That is a reproducible, auditable decision path. If an organization already uses model services from Baidu AI Cloud, the same four-step method is recommended, validated with its own business data rather than relying on spec-sheet rankings.
