How to Choose an LLM: A Guide to Pricing, Capabilities, and Agent-Scenario Evaluation

    Choosing a large language model is not about picking "the best" model but about deciding on the right criteria. This guide walks through a three-step process: narrowing candidates by input modality and acceptance criteria, verifying specifications while avoiding three common misreadings, and measuring real cost per completed task rather than per round. It shows why per-token price alone can mislead, how context windows and reasoning budgets actually constrain what you can use, and what to check when evaluating models for Agent scenarios. It also covers engineering practices—observability, caching, tiered routing, and version locking—and answers common questions about context length, reasoning mode, and budgeting.

    1. The Question Is Not “Which One” but “By What Criteria”

    For the same class of tasks—reading files, writing code, calling tools—invoking APIs at a comparable capability tier can differ by a few cents per round or by several dollars. Price differences are worth watching, but two questions matter more up front: Can the cheaper model get it right the first time? Can the more expensive one reduce rework?

    A single-call unit price only captures one dimension. In Agent scenarios, the real unit of cost is not “tokens per round” but each successfully completed task:

    • When a task fails and is retried, the conversation history accumulated over earlier rounds is resent on every round, so input tokens inflate quickly.
    • When a failure happens on the last round, all the tokens spent beforehand become sunk cost.
    • If a cheap model frequently misses tool calls or edits the wrong file, the cost of human review and fallback logic can far exceed the savings on call fees.

    Selection should therefore proceed in three steps: first narrow the candidates, then verify the specs, and finally benchmark with a unified measurement.

    • Step 1: Filter candidates by input type and acceptance criteria.
    • Step 2: Verify the specs that directly determine the usable boundary—context window, output budget, and reasoning mechanism.
    • Step 3: Measure with the same set of business tasks under a unified pricing model.

    2. Step 1: Narrow Candidates by Input Type and Acceptance Criteria

    2.1 Input modality defines the candidate pool

    The input modalities a model API accepts often differ. There are roughly three common combinations:

    • Text + images: covers most office and engineering tasks such as document parsing, screenshot understanding, and visual Q&A.
    • Text + images + video: suited to scenarios that require directly understanding video frames and temporal information.
    • Text only: some lightweight or specialized APIs accept text alone.

    If the input modality doesn’t match, every comparison afterward is meaningless. Video scenarios deserve special attention: some APIs let you pass video directly and understand its content, while others can only rely on the caller extracting frames or transcribing the video first. The two approaches differ substantially in engineering pipeline, cost, and latency.

    2.2 Acceptance criteria define how success rate is measured

    “Which model is stronger” cannot be answered without acceptance criteria. Start by turning business tasks into decidable standards:

    • Q&A: Is the answer correct? Are citations traceable?
    • Code: Does it pass unit tests? Does it compile on the first try?
    • Structured extraction: Are all fields present? Are the types valid?
    • Agent: Did it call the right tool, complete the expected action, and avoid needing human takeover?

    Once acceptance criteria are clear, the candidate pool usually narrows from “all models” to two or three, and comparison becomes meaningful.

    3. Step 2: Verify the Specs and Avoid Three Common Misreadings

    Mainstream LLM services are rapidly moving toward million-token context windows. Multimodal understanding and tool calling have also become standard features on higher-end models rather than a differentiator for any single provider. Many arguments over “whose specs are stronger” actually come from the two sides understanding the same term differently. Three misreadings are the most common.

    3.1 Misreading 1: The context window equals the usable input length

    The context window constrains the total content a model can “see” in a single request, and the way it’s counted is not consistent across providers:

    • Shared window for input and output: if tokens generated in the current round also count against the same window, the actual input you can fit is “window − output budget for this round − reserve.” For example, with a total window of 1,000,000 tokens and a per-call output limit of 128,000 tokens, a single request can theoretically hold only about 870,000 tokens of input—and in practice you must also reserve space for conversation history and multi-round tool returns.
    • Separate windows for input and output: input and output limits constrain independently, and both can be maxed out at the same time.

    Conclusion: For long-context tasks, estimate the usable input under the shared-window model. Do not use the window number directly as your input budget.

    3.2 Misreading 2: The output budget equals the final answer length

    Once reasoning (thinking) mode is enabled, the model’s intermediate reasoning also consumes the output budget and is usually billed as output tokens. On some APIs the reasoning length and the final answer share the same budget, so the space available for the final answer shrinks accordingly; on others the reasoning length is configured separately.

    Conclusion: Before enabling reasoning mode, work backward from “how many reasoning steps are needed at most” to size the reasoning budget, then confirm the remaining budget can hold an answer of the expected length. On some APIs, reasoning tokens are a consumable output and the final answer may be cut off, so truncation risk must be controlled in advance through max_tokens configuration and streaming monitoring.

    3.3 Misreading 3: One document, one unit, one identifier

    In the same document, context may be written variously as “1M,” “1,048,576,” and “max input 960k.” When comparing, convert everything to exact token counts and keep separate columns for “context window,” “max input,” and “per-call output limit.”

    In addition, a team’s informal names often don’t match the model identifiers used in the API, and casing or spelling differences can cause call failures. Before integration, use the identifier from the official documentation as the source of truth and add a mapping layer in the configuration center to avoid scattering string literals across the codebase.

    Below is a spec-verification checklist you can use directly. Values should follow each model service’s official documentation, with the verification date noted:

    Check item What to verify Impact on selection
    Model identifier Follow the official docs; map team aliases uniformly Avoids call failures and configuration drift
    Input modality Text / image / video; whether video supports direct input Determines the candidate pool and pre/post-processing pipeline
    Context window Whether total window and max input are limited separately Determines the document and history length you can handle
    Per-call output limit Whether it includes reasoning tokens; whether there is a default Determines room for long-form generation and reasoning
    Reasoning mechanism Whether it can be toggled; whether reasoning length counts toward output Affects latency, cost, and answer completeness
    Pricing model Whether input/output are tiered; whether caching and batch are supported Determines the true per-task cost
    Rate limits Requests per minute, tokens per minute, and concurrency limits Determines whether batch tasks can be sustained

    4. Step 3: Unify the Pricing Model and Compute “Per Round” and “Per Task”

    4.1 Six points to align when measuring price

    A model service’s pricing is not determined by “capability tier” alone. At a minimum, consider the following:

    • Input and output are priced separately: the output unit price is usually much higher than the input price. In Agents, tool-returned logs, web page content, and similar material are consumed repeatedly as input, while output is relatively concentrated.
    • Reasoning tokens count as output: once reasoning mode is enabled, reasoning content is billed at the output price, and the cost of complex tasks can multiply several times over.
    • Cache-hit discounts: if the system prompt, tool definitions, and knowledge-base snippets stay unchanged across many calls, the cached portion is usually billed at a lower price—typically requiring an identical prefix.
    • Batch and offline discounts: non-real-time tasks can go through batch endpoints at a typically lower price, but you must accept longer completion times.
    • Tiers and committed usage: some services offer tiered pricing by volume, or reserved throughput and volume discounts, which suit businesses with stable usage.
    • Billing rules for failed calls: whether timeouts, rate-limit errors, and other exceptions are billed should follow the official documentation, and they should be tracked separately in your retry strategy.

    This section discusses only pricing structure and cites no specific numbers. Unit prices, cache discounts, and batch discounts change frequently, so defer to the current price list in the official documentation.

    4.2 Converting price to “per round” and “per task”

    Let the unit token prices be input p_in, output p_out, and cache-hit input p_cache. For a single request with input I, cache hits H, and output O (including reasoning):

    1. Per-round cost C_round = (I - H) × p_in + H × p_cache + O × p_out
    2. Per-task cost C_task = Σ C_round × (1 + r_retry)
    3. where r_retry is the failure retry rate—the excess of actual calls over the ideal number

    What really widens the gap is the second line. An Agent task that runs 5 rounds with roughly 20K input tokens per round accumulates 100K input tokens in total, while the final answer may be only a few hundred tokens. If it fails after two rounds and the whole thing is rerun once, the cost nearly doubles. Here, a model with a low input price, stable tool calling, and failures that surface early is often more cost-effective than one that is “cheaper per round but tends to fail on the last step.”

    4.3 Example: cost estimation under a unified model

    The script below compares per-round and per-task costs side by side and checks whether the input exceeds the shared window:

    1. from dataclasses import dataclass
    2. from math import ceil
    3. @dataclass(frozen=True)
    4. class ModelPrice:
    5. """Unit price: per million tokens; fill in with current prices from the official docs."""
    6. name: str
    7. input_price: float
    8. output_price: float
    9. cache_hit_price: float = 0.0
    10. context_window: int = 1_000_000
    11. output_budget: int = 32_768
    12. def round_cost(m: ModelPrice, in_tok: int, cache_tok: int, out_tok: int) -> float:
    13. """Estimate per-round cost: input minus cache hits; output includes reasoning tokens."""
    14. billable_in = max(in_tok - cache_tok, 0)
    15. return (billable_in * m.input_price + cache_tok * m.cache_hit_price + out_tok * m.output_price) / 1_000_000
    16. def task_cost(m: ModelPrice, rounds: int, in_per_round: int, out_per_round: int,
    17. cache_ratio: float = 0.0, retry_rate: float = 0.0) -> float:
    18. """Estimate per-task cost; reasoning tokens are already included in out_per_round."""
    19. if in_per_round + out_per_round > m.context_window:
    20. raise ValueError(f"{m.name}: input+output exceeds the context window; history must be compressed")
    21. cost = 0.0
    22. for _ in range(rounds):
    23. cost += round_cost(m, in_per_round, int(in_per_round * cache_ratio), out_per_round)
    24. return cost * (1 + retry_rate)
    25. if __name__ == "__main__":
    26. # Prices below are illustrative assumptions, not any real service.
    27. # Scenario: 40-round document-reading task, input accumulating to ~150K tokens per round,
    28. # 60% cache hit, 600 output tokens per round.
    29. models = [
    30. ModelPrice("baseline", input_price=4.0, output_price=16.0, cache_hit_price=0.4),
    31. ModelPrice("reasoning", input_price=10.0, output_price=30.0, cache_hit_price=1.0),
    32. ]
    33. for m in models:
    34. print(m.name, "per-task cost:", round(task_cost(m, rounds=40, in_per_round=150_000, out_per_round=600, cache_ratio=0.6), 4))

    For the same round of 150K input tokens and 600 output tokens:

    • Ignoring cache, the low-price model’s cost is assumed to be about 2.7× that of the high-price model.
    • Under the assumption of a 60% cache-hit rate, that drops to about 1.4×.

    Adding in a retry rate shifts the gap further. The conclusion is straightforward: choosing a model by the unit-price table alone easily leads to the wrong choice.

    5. Agent Scenarios: Read the Capability Checklist, Not the Naming Suffix

    5.1 Neither the name nor the context proves Agent success rate

    Names like “Max,” “Flash,” and “Pro” only reflect a vendor’s positioning, and model services generally offer tool calling (function calling). But neither context length nor the naming suffix directly proves Agent success rate. Task failures are rarely caused by “not enough context”; they usually come from the following:

    • Tool selection: among several similar tools, did it pick the right one?
    • Parameter extraction: can it accurately extract parameters from natural language or file content?
    • State keeping: over a long chain, does it remember earlier agreements, file paths, and completed steps?
    • Structural constraints: does the output conform to the predefined JSON schema?
    • Self-correction: after a tool returns an error, can it read the error and retry or change approach?
    • Termination judgment: once the task is done, can it stop promptly instead of continuing to call tools pointlessly?

    5.2 Choosing verification priorities by scenario

    Task scenario Core constraint Verification priority
    Document Q&A, contract comparison Long input, cross-section citation Mid-context recall, citation accuracy, cache-hit rate
    Code generation and repair Output may be long; must compile first time Per-call output budget, reasoning-budget allocation, retry cost
    Screenshot and report understanding Mixed text and images Image-text understanding accuracy, field completeness in structured extraction
    Video understanding Temporal and visual information Whether direct video input is supported; information retention on long videos
    Multi-step workflows (e.g., ticket handling) Multi-round tool calling Tool-selection accuracy, error recovery, per-task cost
    Batch offline processing Throughput and price Batch-endpoint unit price, rate limits, retry mechanism

    5.3 A suggested order for trials

    First establish a cost and capability baseline with broad-coverage tasks, then fill gaps with additional candidates:

    1. Establish a baseline: run a high-frequency, image-text-mixed structured task (such as screenshot form-filling or document field extraction) end to end, and record success rate, per-round token count, and per-task cost.
    2. Fill the gaps: if you are budget-sensitive but need a larger generation budget (such as long-form generation or complex reasoning), bring in one candidate with a more generous output budget for comparison.
    3. Add capabilities: for tasks that require direct video input, only choose candidates that natively support that modality.
    4. Same-task competition: for complex Agent workflows, don’t rely on subjective comparison—run all candidates on the same set of tasks and let the data decide.

    6. Engineering Practice: Turn Selection into a Sustainable Mechanism

    Selection is not a one-time action. Model services iterate quickly, and the same model’s behavior can change after a version upgrade. It’s worth turning selection into an engineering capability.

    6.1 Observability and quotas

    • Log the model identifier, version, token usage, cache hits, reasoning length, latency, and error code for every call.
    • Send logs to a logging service for centralized search, and connect usage and latency to monitoring with alerting thresholds.
    • Attribute cost by the dimension of “business line × scenario × model” to spot anomalous growth.
    • Set per-minute request and token limits at the gateway layer, and apply unified backoff retries for 429s and timeouts so that failed-retry amplification doesn’t inflate cost.

    6.2 Caching and prompt reuse

    • Keep the system prompt, tool definitions, and knowledge-base snippets in the request prefix and stable to raise the cache-hit probability.
    • When there are too many tool definitions, do retrieval-based filtering first to reduce per-round input.
    • Summarize and compress conversation history promptly to control how input grows with rounds.

    6.3 Tiered routing

    Not every task is worth the most expensive model:

    • Tier 1 (high concurrency, simple): keyword classification, format conversion, fixed-field extraction—route these to a low-cost model and escalate on failure.
    • Tier 2 (routine): Q&A, standard code generation—choose based on the balance of success rate and cost.
    • Tier 3 (complex): multi-step reasoning, difficult code repair—use a model with stronger reasoning ability, with a maximum round count and budget cap.
    • Fallback: configure a backup model for the same task, switching automatically when the primary model is rate-limited or times out.

    6.4 Version locking and regression

    Once you settle on a combination, pin the model identifier and parameters in configuration and put it under Git. Whenever a version is upgraded or a new candidate is introduced, run a regression on a retained set first, comparing success rate, per-task cost, and P95 latency, before deciding on a full rollout.

    7. Common Questions

    Q1: With a million-token context, can I just process an entire book at once?
    It also depends on the output limit and the shared window. When input and output share the window, the output budget directly compresses usable input; meanwhile, mid-context recall drops over long contexts, so it’s better to use “full-text retrieval + relevant snippets.”

    Q2: Is reasoning mode always better?
    Not necessarily. Reasoning output can improve accuracy on complex problems, but reasoning tokens count toward output cost and also raise latency. It’s best to enable it only on tasks where “reasoning depth” carries high weight in the scorecard.

    Q3: Can a cheap model be used for Agents?
    Yes, but with constraints: cap the maximum rounds and budget, automatically retry or escalate to a more reliable model when structured output fails, and require human confirmation before key actions.

    Q4: Can a vendor’s published price be used directly for budgeting?
    Only as a starting value. Real cost depends on the actual token distribution, cache-hit rate, and retry rate, and should be calibrated against 2–4 weeks of real call data.

    Q5: Is there a more unified way to compare model capabilities?
    Whatever provider you use, the evaluation method is the same. Enterprises can manage multiple model capabilities and call metering on a unified platform such as Baidu AI Cloud, then re-evaluate periodically using the scorecard and cost formula in this article.

    8. Conclusion

    Selecting an LLM API can be summed up in one sentence: narrow candidates by input type, verify specs against the documentation, judge quality by benchmarking on the same set of tasks, and measure cost “per task” rather than “per round.” Price differences are real, but what determines the bill is success rate, rework count, and token-consumption structure. Build an observable, cache-friendly, routable call pipeline first, then let the data answer “which one” for you.