LLM Selection Guide: Pricing, Capabilities, and Real-World Agent Testing

    Choosing a large language model based on per-token price alone often fails to lower the total bill. This guide explains why the real cost is driven by first-pass success rate, rework rounds, and context growth, and shows how to define input profiles and acceptance criteria before comparing prices. It breaks down the specification differences that matter among four multimodal, tool-calling models, including context-window accounting, reasoning-token billing, and caching rules, with sample code for normalizing costs. It also covers Agent-specific cost drivers, a routing skeleton, a 200-sample business evaluation loop, and common pitfalls to avoid.

    1. The Problem: Why the Same Task Can Cost Two Orders of Magnitude More

    In engineering practice, we often see the same pattern: a composite task such as reading a lengthy document, generating business code, and calling several external tools can cost anywhere from a few cents to several dollars per conversation, depending on the model. Many technical leaders react by switching to a cheaper model, only to find at the end of the month that the total bill has not dropped, and may even have risen.

    The reason is straightforward. The listed price of a single call is only one factor. Three hidden variables determine the actual bill:

    1. First-pass rate: whether the model produces output that meets acceptance criteria on the first turn;
    2. Rework rounds: how many additional turns are needed to converge after a failure;
    3. Context growth rate: how quickly history messages, tool return values, and reasoning traces are repeatedly counted as input across turns.

    So the first principle of selection is not to compare unit prices, but to compare the total cost per unit of effective output. This article takes four commonly used models as of November 2026 that support image-and-text understanding and tool calling as its background (for neutrality, they are referred to below as “a flagship general-purpose model,” “a lightweight high-speed model,” “a cost-effective batch model,” and “a long-context reasoning model”) and lays out a practical evaluation framework.

    2. Define Inputs and Acceptance Criteria Before Discussing Cost

    Many selection failures start with price comparison before requirements have been quantified. It is worth locking down two tables during the planning stage.

    Table 1: Input Profile

    Dimension Questions to confirm
    Modality Plain text, mixed text and images, or direct understanding of a video stream
    Volume Average input tokens per request, and whether it reliably reaches million-token context
    Structure Structured or semi-structured documents, or long text without layout
    Concurrency Peak QPS and acceptable queueing latency

    Table 2: Acceptance Criteria

    Dimension Questions to confirm
    Correctness Whether there is automatically verifiable ground truth
    Format JSON Schema, code compilability, field completeness rate
    Tool calling Function-name and argument accuracy, multi-turn orchestration success rate
    Latency Time to first token and the upper bound on total completion time

    Only once both tables are filled in does price comparison become meaningful. In practice, batch image-and-text extraction tasks are far less sensitive to first-turn accuracy than to unit price, so they are good candidates for small-traffic validation with a lightweight high-speed model and a batch model. Tasks that require direct video understanding or cross-modal temporal reasoning should prioritize flagship models with native multimodal capability, because feeding a text model descriptions extracted from frames often loses on information fidelity from the start.

    3. Specification Differences: Same Context Window, Different Budget Accounting

    All four models claim million-token context windows, but that does not make them interchangeable. The specification items to check one by one are below.

    1. Is the context an input limit or a shared input-plus-output budget

    Some models set the maximum output as an independent number; others require the output budget to be deducted from the total window. If your scenario is “feed in 800,000 tokens of material and produce a 50,000-word structured report,” the latter will be truncated mid-generation. Confirm the accounting in the documentation and measure the truncation point in load testing.

    2. How explicit the reasoning mechanism is

    Some models return the reasoning process as a separate visible field and bill it separately; others fold it into output tokens. The former is easier to audit and debug; the latter is more cost-controllable but less explainable. For Agent scenarios, an explicit reasoning trace helps locate the root cause of “the wrong tool was selected.”

    3. Billing units and caching strategy

    Common industry differences include whether input and output are priced the same, whether inputs that hit a prefix cache are discounted, whether batch asynchronous APIs have a separate discount, and whether reasoning tokens count as output. These rules determine the real bill for scenarios that repeatedly ask follow-up questions about a long document.

    The following sample code normalizes different billing rules to “cost per thousand effective tasks”:

    1. def normalized_cost(price_in, price_out, cache_hit_ratio,
    2. avg_in, avg_out, think_out, rounds, pass_rate):
    3. # Input cost per round, accounting for the discount on prefix-cache hits
    4. eff_in = avg_in * (1 - cache_hit_ratio * 0.9)
    5. per_round = (eff_in * price_in + (avg_out + think_out) * price_out) / 1e6
    6. # Key step: adjust effective rounds by the first-pass rate
    7. effective_rounds = rounds / max(pass_rate, 0.01)
    8. return per_round * effective_rounds * 1000

    The core idea is to put pass_rate in the denominator. A model that is 60% cheaper per token but has a first-pass rate of only 40% may end up with a higher normalized cost than an expensive model with a 90% pass rate.

    4. Agent Scenarios: Tool Calling Is the Cost Dividing Line

    An Agent’s bill has a completely different structure from ordinary conversation. A single task may involve a dozen or more model calls, each carrying a growing conversation history and tool return values. Cost then grows roughly quadratically with the number of rounds rather than linearly.

    Optimization levers, ordered by payoff:

    1. Context pruning: keep only history fragments relevant to the current sub-goal, and summarize tool return values before pushing them onto the stack;
    2. Sub-task decomposition: split a long chain into multiple short sessions to avoid global history growth;
    3. Model tiered routing: hand intent recognition and argument extraction to a lightweight model, and complex planning and code generation to a flagship model;
    4. Structured constraints: constrain tool arguments with a schema to reduce retries caused by format errors;
    5. Idempotence and caching: cache read-only tool results for a short period to avoid repeated calls.

    A sample routing skeleton:

    1. def route(task):
    2. if task.risk == "low" and task.steps <= 2:
    3. return "light_model" # lightweight high-speed
    4. if task.modal == "video":
    5. return "multimodal_flagship"
    6. if task.context_tokens > 500_000:
    7. return "long_context_model"
    8. return "flagship_model"

    It is worth stressing that “supports tool calling” on a specification sheet is only a necessary condition. What really determines Agent success is argument accuracy, multi-turn error correction, and error-recovery strategy, and these can only be obtained through business retesting, not inferred from documentation.

    5. Business Retesting: Replace Subjective Judgment with 200 Real Samples

    Build a minimal viable evaluation loop:

    • Samples: draw 150–200 real requests from production logs, covering both high-frequency and long-tail cases, with manually labeled acceptance results;
    • Metrics: first-pass rate, average rounds, P95 latency, normalized cost per task, and the distribution of tool-argument error types;
    • Process: run the same prompts and schema against all four models, repeating three times each to rule out randomness;
    • Decision: plot normalized cost against first-pass rate on a two-dimensional scatter, and whitelist the models that land in the upper-left quadrant;
    • Regression: rerun the sample set after a model version update to prevent capability drift.

    A sample evaluation loop:

    1. for sample in samples:
    2. for model in candidates:
    3. result = run_agent(model, sample.prompt, sample.schema)
    4. record(sample.id, model, result.passed,
    5. result.rounds, result.latency_p95, result.cost)

    6. Common Pitfalls and Engineering Recommendations

    • Pitfall 1: treating context length as capability. A large window only solves “can it fit,” not “can it find.” Mid-context recall decay is a common phenomenon and needs to be mitigated by scattering positions and asking in segments.
    • Pitfall 2: substituting public leaderboards for business samples. Leaderboard task distributions differ greatly from real business, so neither specifications nor scores can serve as an effectiveness ranking.
    • Pitfall 3: ignoring the output budget. Retries caused by truncated output are often the main reason the bill spirals.
    • Pitfall 4: switching everything at once. Start with a 5% canary, observe the normalized cost for a week, then ramp up.

    On the infrastructure side, route all model calls through a single gateway layer, store sample sets in object storage, use a message queue to smooth asynchronous batch tasks, run evaluation jobs on a container platform, and track token and cost metrics per call with logging and monitoring with alerting. Baidu AI Cloud provides exactly these standard categories of capability in this kind of general engineering practice, helping teams turn selection from guesswork into a measurable, regression-testable engineering process.

    7. Conclusion

    Back to the original question: can the cheap model pass on the first try, and can the expensive one reduce rework? The answer is not in the specification sheet but in your own 200 samples. Quantify inputs and acceptance first, unify the billing basis next, and then make a two-dimensional decision using normalized cost. This process applies to any new model and is the only selection method that will not become obsolete as versions update.