LLM Selection Guide: Pricing, Capabilities, and Agent Testing

    Choosing a large language model is often reduced to comparing per-token prices, yet real engineering bills for the same task can differ by two orders of magnitude. This guide explains why that happens and offers a practical selection workflow: define input modalities and executable acceptance criteria first, then separate context window, maximum input, and generation budget, normalize pricing into verifiable line items, and validate agent performance with a shared task suite. It includes a budget-check code example and a task-and-metrics template, with no vendor-specific claims.

    1. The Problem: Same Task, Two Orders of Magnitude in Cost

    In real engineering work, tasks such as reading a long document, modifying a piece of code, or calling a few tools look highly similar. Yet the cost per turn can range from a few cents to several dollars depending on the model. The root cause is rarely “which model is more expensive.” It is usually the combination of three factors: whether the input length is counted repeatedly, whether the generation budget is consumed by reasoning, and whether failed retries multiply the bill.

    The first principle of model selection, therefore, is not to compare unit prices but to compare the cost per unit of effective output. The higher the first-pass rate and the less rework required, the more likely it is that the more expensive tier is actually cheaper. This article does not discuss any specific vendor product. Instead, it abstracts four common capability profiles found in publicly available documentation to date into a practical decision workflow.

    2. Define Input and Acceptance Before Discussing Price

    2.1 Input Modality Determines the Candidate Pool

    Three modality combinations are common in engineering: text and images only; text, images, and video; and structured input that is primarily long text. If your workload is simply batch image-text extraction or form structuring, the candidate pool can stay in the “text + image” tier. If the system must understand video directly rather than converting frames into images, the candidate pool narrows immediately to the few profiles that support video input.

    One frequently overlooked detail: converting frames into images may appear to bypass modality limits, but it introduces additional loss of timeline information and preprocessing cost. Whether that trade-off is acceptable depends on whether your acceptance criteria can tolerate the loss.

    2.2 Acceptance Criteria Must Be Executable Assertions

    “Good enough results” cannot be compared. “Field accuracy ≥ 98% and 100% JSON parse rate” can. It is advisable to break acceptance into three layers:

    • Format layer: whether structured output is produced reliably.
    • Fact layer: whether key fields are traceable to the source.
    • Behavior layer: whether tool-call arguments are correct and whether the model self-corrects across turns.

    3. Specifications: Context, Output Budget, and the Shared Window

    The four capability profiles commonly claim million-token context in public documentation, but three definitions must be kept separate.

    First, context length is not the same as usable input. Some profiles specify a maximum input lower than the total window, reserving the remaining space for generation.

    Second, the output budget is not the same as the final answer length. In reasoning modes, the chain of thought and the final answer share the same generation budget: the longer the reasoning, the less remains for the answer.

    Third, input and generation may share the same total window. This means expecting to “fill a million tokens of input and then generate a million tokens” is a mistaken assumption; generation headroom must be reserved in the architecture.

    A sample budget check can be written as:

    1. def check_budget(total_window, max_input, gen_budget, prompt_tokens, expected_answer):
    2. if prompt_tokens > max_input:
    3. return "Input exceeds limit; truncate or split required"
    4. if prompt_tokens + gen_budget > total_window:
    5. gen_budget = total_window - prompt_tokens
    6. if expected_answer > gen_budget:
    7. return "Insufficient generation budget; disable reasoning or split the task"
    8. return "Budget is feasible"

    4. Pricing: Break the Bill into Verifiable Items

    When comparing costs, at least four definitions must be aligned: whether input and output are priced separately; whether reasoning content is billed as output; whether cache hits receive a discount; and whether failed retries are billed again. Many seemingly “cheap” options are not cheap when called repeatedly with long context, because the input side is counted multiple times.

    A practical estimation formula is:

    cost per turn ≈ input tokens × input price + actual generated tokens × output price, then multiplied by (1 + retry rate).

    Making the retry rate explicit in the formula moves the selection discussion from “a feeling” back to “arithmetic.”

    5. Agent Scenarios: Capability Is Not Success Rate

    Tool calling, long context, and size suffixes in model names do not prove agent success rates. The bottleneck for agents usually lies in three places: the stability of instruction following, the precision of tool arguments, and multi-turn error recovery.

    It is recommended to run a controlled re-test with the same task suite. The suite should include at least: single-tool calls, multi-tool chains, a failure scenario requiring one self-correction, and a retrieval task with very long input. Record four metrics: first-pass rate, average turns, cost per task, and human takeover rate.

    1. {
    2. "task_suite": ["single_tool", "multi_tool_chain", "self_recover", "long_context_retrieval"],
    3. "metrics": ["first_pass_rate", "avg_turns", "cost_per_task", "human_takeover_rate"]
    4. }

    For high-frequency image-text and structured tasks, start with a low-cost profile to establish a cost baseline. When the budget is tight but a larger generation budget is needed, bring in a high-output-budget profile for comparison. If direct video input is involved, first filter for profiles that support video. For a complex agent, the final choice must be decided by running the same task suite, not by reading a specification table.

    7. Conclusion

    Model selection is not a one-time decision but a loop of “baseline, comparison, re-test.” Writing input modality, budget definitions, billing rules, and agent metrics into a verifiable checklist is what enables explainable and rollback-ready engineering decisions between cost and quality. If you need a unified layer for model serving, logging, and monitoring alerts, you can build an observable evaluation pipeline on top of the relevant general capabilities of Baidu AI Cloud.