How to Choose an LLM: Pricing, Capabilities, and Agent Scenarios
This guide explains why spec sheets alone are not enough when selecting a large language model, and how to translate business requirements into measurable technical criteria. It walks through four core dimensions—context window capacity versus effective usage, input modalities, output budgets, and billing logic—and outlines practical evaluation methods for agent scenarios, including context management, layered model routing, and end-to-end task metrics. The goal is to help you pick the best-fitting model rather than the strongest one, at a controllable cost.
1. The Selection Dilemma: Why Spec Sheets Are Not Enough
At the start of a project, teams often collect official specifications for several candidate models and compare context length, input modalities, and maximum output per request side by side. The intention is reasonable, but spec sheets only show boundary values; they do not reveal what those boundaries mean in real business use. A model advertised with a million-token context can quickly run up an uncontrolled bill in long-document scenarios if billing accumulates linearly with input tokens. A model with a large output budget is overkill—and you pay for idle capacity—if the business only needs short, structured results.
So the first step is not to compare numbers, but to translate business requirements into measurable technical criteria. Start by answering four questions: Does the input include non-text content? What is the distribution of input sizes per request? Is the output a short structured result or long-form text? Does the task require multi-turn tool calls with state persistence? Once these four questions are answered, the spec sheet becomes a decision-making tool.
2. Technical Breakdown of Four Core Dimensions
2.1 Context Window: Capacity vs. Effective Capacity
The context window determines how much input a single request can hold. Mainstream general-purpose models now commonly offer windows at the million-token level, but engineers must watch three differences.
First, the advertised window and the maximum usable input are often not the same. Some models reserve space for output and set a maximum input lower than the advertised window, which means you cannot simply subtract the expected output from the advertised value when planning capacity.
Second, token counting is not standardized. Some models use binary magnitudes such as 1,048,576, while others use decimal magnitudes such as 1,000,000—a difference of about 4.8%. In batch jobs that run close to the limit, that 4.8% can be enough to cause request failures.
Third, a long context is not the same as an effective long context. The widely observed “lost in the middle” phenomenon shows that where key information sits within a very long input affects recall. Practical mitigations include placing critical instructions at the beginning or end, summarizing long documents in segments before concatenating them, and adding dedicated “needle-in-a-haystack” retrieval cases to your evaluation set.
2.2 Input Modalities: The Added Complexity of Multimodal Pipelines
Models that support text, images, and video have broader capability boundaries, but higher integration costs. Multimodal input usually requires uploading media to object storage first and then passing a reference identifier in the request, adding upload, authentication, lifecycle management, and retry-on-failure steps to the pipeline. If the business only handles mixed text and images, choosing a model that also accepts video input brings no benefit and instead adds asset governance overhead.
A practical rule of thumb: measure the share of each modality in real requests over the past three months. If non-text input falls below a threshold (for example, 5%), prioritize a text-plus-image option and spend the budget on inference quality instead.
2.3 Output Budget: The Ceiling for Long-Form and Agent Tasks
The maximum output per request directly affects two kinds of tasks: long-form generation and agent tasks that require continuous multi-step reasoning. Strategies differ noticeably across models. Some distinguish thinking from non-thinking modes, with thinking mode granting a larger output allowance; some offer a uniformly large output; others cap output by the remaining context, meaning output and input share the same capacity pool.
The third strategy matters especially for agents. Multi-turn tool calls keep accumulating message history, progressively squeezing the remaining space; without management, later steps may be truncated for lack of room. A workable engineering approach is a sliding window plus summary compression: keep the system instruction and the most recent few turns verbatim, and fold older history into a structured summary.
Illustrative pseudocode:
def build_context(system, history, max_input):keep_recent = 6recent = history[-keep_recent:]older = history[:-keep_recent]summary = summarize(older) if older else ""ctx = system + summary + render(recent)while token_count(ctx) > max_input:keep_recent -= 1recent = history[-keep_recent:]ctx = system + summary + render(recent)return ctx
2.4 Billing Logic: Converting Specs into Cost
Cost cannot be judged by unit price alone; it depends on “unit price × actual token distribution.” Build three profiles: short requests (a few thousand input tokens, a few hundred output tokens), long documents (hundreds of thousands of input tokens), and multi-turn agents (millions of cumulative input tokens per task). Split real traffic across the three profiles and apply each candidate’s pricing rules to reach a comparable conclusion. Also account for hidden costs: repeated billing from retries, duplicated input from cache misses, and queuing delays triggered by rate limits.
3. Practical Points for Agent Scenarios
Agent applications place three demands on models: stable instruction following, correct structured tool-call arguments, and context consistency across long tasks. Evaluation should go beyond single-turn Q&A and build end-to-end task sets, with metrics such as task completion rate, average number of steps, argument error rate, and cost per task.
A recommended layered strategy is to use a lower-cost model for high-frequency short tasks such as intent recognition and argument extraction; delegate planning, code generation, and complex reasoning to a more capable model; and implement deterministic logic with rules or a workflow engine wherever possible to reduce the number of model calls. If you use general-purpose cloud capabilities, you can decouple tasks with a message queue, trace the full pipeline with logging services, and build a quality dashboard with monitoring and alerting—all standard industry practices.
4. Conclusion
Selection is not about choosing the “strongest” model, but the “best-fitting” one. First use a business profile to pin down modality, input size, output shape, and call frequency; then convert everything into cost using a consistent methodology; finally validate long-context effectiveness and agent stability with your own evaluation set. General-purpose model services on platforms such as Baidu AI Cloud typically offer multiple tiers that can be combined on demand; together with the framework above, this helps you achieve stable engineering results at a controllable cost.
