LLM Selection Guide: Pricing, Capabilities, and Agent Use Cases
Choosing a general-purpose LLM is less about benchmark scores and more about solving a set of hard constraints: context window, input modalities, output budget, and billing. This guide explains what each dimension means in engineering terms, how to translate those constraints into request parameters for AI Agent workflows, and how to run a practical evaluation with real samples so that model selection is measurable and cost stays under control.
1. The Real Problem: Constraint Solving, Not Benchmarks
In real engineering work, choosing a general-purpose LLM often gets reduced to comparing leaderboard scores. What actually determines whether a project succeeds is a set of hard constraints: how much context fits into a single request, which input modalities the model accepts, how much content one call can produce, and how those capabilities are billed. Write these constraints down explicitly, and selection turns from guesswork into a verifiable solving process.
One common confusion is worth clearing up first: shorthand names used in user communities often differ from the official API identifiers. Always use the model identifier given in the official documentation when making calls, so a spelling mismatch does not cause the request to fail.
2. What the Four Key Dimensions Mean Technically
2.1 Context Window: Nominal vs. Usable Input
The context window determines the total capacity for “prompt + conversation history + retrieved snippets + tool returns” in a single request. Two points deserve attention in engineering. First, the nominal window and the maximum input length may differ, because vendors reserve space for output. Second, vendors do not use the same convention for writing “K” and “M”, so numbers like 1M and 1,048,576 should not be treated as strictly equal in capacity planning. Convert everything to token counts and leave a safety margin.
2.2 Input Modalities: Text, Images, and Video
Multimodal input directly shapes which business forms are feasible. Models that support only text and images fit document understanding, screenshot Q&A, and form recognition. Models that additionally accept video input can serve long-sequence content understanding and screen-recording analysis. During selection, confirm that the target modality is supported on the input side rather than assuming that “multimodal” covers every type.
2.3 Output Budget: A Frequent Cause of Agent Failures
The output length limit is often overlooked, yet it is a critical bottleneck for long-form generation and Agent loops. Single-call output budgets differ markedly between “thinking mode” and “non-thinking mode”, and some models allow a large default output but are constrained by the remaining context. The engineering recommendation: treat the output budget as a configurable parameter and split generation by task, instead of demanding one extremely long output.
2.4 Billing and Cost Structure
Cost cannot be judged by unit price alone; it is the combined consumption of “input tokens + output tokens + retries and failed requests”. In long-context scenarios, the input side often accounts for far more than intuition suggests, and multi-turn Agent loops bill the same context repeatedly. The core levers for cost control are therefore context compression and cache reuse, not simply hunting for a cheaper model.
3. A Selection Method for Agent Scenarios
A typical Agent chain is: plan → call tools → observe results → re-plan, looping several rounds. Its demands on the model concentrate on three things: stable structured output, a large enough output budget to carry tool arguments and intermediate conclusions, and enough context to hold tool returns.
The simplified pseudocode below shows how to map these constraints onto engineering parameters:
def build_request(task, history, retrieved):budget = 128 * 1024 # Output budget per call, split by taskctx_limit = 900 * 1024 # 90% of the nominal window as a safe capprompt = compress(history) + retrievedassert count_tokens(prompt) + budget <= ctx_limitreturn {"input": prompt, "max_output": budget, "modalities": ["text", "image"]}
In practice, assign different tiers to different stages: use a configuration with a generous output budget and strong structured-output ability for planning and tool calls; use a lightweight configuration for summarization and rewriting to keep costs down; and for long documents, retrieve over segments first and then aggregate, rather than feeding everything in at once.
4. A Practical Evaluation Process
- Build an evaluation set of 50–100 real business samples, covering both extremes: the longest input and the longest output.
- Record four metrics: success rate, average number of rounds, token consumption, and end-to-end latency.
- Run a canary comparison across candidate configurations, and check whether failures cluster around output truncation or context overflow.
- Establish a fallback strategy: when the primary configuration hits a length limit, automatically switch to segmented generation or a configuration with a higher output budget.
5. Common Pitfalls
- Treating the nominal context as usable input and ignoring the space reserved for output.
- Ignoring differences in unit conventions across vendors, leading to overly optimistic capacity planning.
- Looking only at unit price while overlooking repeated billing from multi-turn Agent loops.
- Assuming that support for multimodality means support for every modality on the input side.
6. Conclusion
The reliable path to model selection is to make the four constraints explicit—context, modalities, output budget, and billing—and then validate them quantitatively with real samples. Teams that want to build similar capabilities on Baidu AI Cloud can combine general-purpose products (such as container platforms, object storage, log services, and monitoring and alerting) into an evaluation and canary system, so that selection decisions are evidence-based and costs stay controllable.
