LLM Selection Guide: Pricing, Capabilities, and Validating Agent Workloads
This guide explains how to choose an LLM for a team's workloads. It covers input modalities, context windows, output and thinking token budgets, pricing basis, and tool-calling ability in agent scenarios. It also recommends testing candidates on a fixed task set and comparing cost per successful task.
1. Answer Three Questions First
Before choosing a model, a team should settle three points: what the task input is, what the acceptance criteria are, and which unit the budget is calculated in. Many teams compare unit prices directly, and the problems appear in the first round of tests. A cheaper model may need repeated retries, which makes its total cost higher. A more capable model may waste budget on simple tasks. The right order is to define inputs and acceptance criteria first, then calculate costs.
2. Input Modalities Determine the Candidate Pool
A modality is a type of content a model can accept, such as plain text, images, video, or audio. If the workload only handles text and screenshots, the candidate pool can be broad. If the model must understand video directly, first confirm whether each candidate supports video input, and whether video is processed by extracting frames or encoded as a whole. Video input usually has limits on file size, duration, and frame rate. Use the vendor documentation for these limits instead of assuming them from experience.
For example, a batch task that recognizes receipt screenshots only needs image input and structured output. A meeting recording summary task requires video input. The candidate pools for these two types of tasks should be evaluated separately.
3. The Context Window Is Not the Usable Input
The context window is the total number of tokens a model can process in a single request. It includes the input content, conversation history, tool results, and the content generated in the current turn. The window size is an upper limit, not a recommended usage. Three points matter in practice.
First, some models set a maximum input below the window size, so usable input must subtract the space reserved for output. Second, when input and generation share the same window, the fuller the input, the less room remains for output. This is especially noticeable with long documents. Third, a larger window does not guarantee that information in the middle of a long text will be used accurately. Test with samples that place key details in the middle to check whether they get missed.
4. Output Budget and Thinking Tokens
The output budget is the maximum number of tokens a single response can produce. It does not equal the length of the final answer. When reasoning or thinking mode is enabled, the model first generates intermediate reasoning. These tokens also use generation space, and billing rules differ by vendor.
In some implementations, thinking tokens share the same limit as the answer. When thinking runs long, the answer can be cut off mid-sentence. To avoid this, follow these steps during configuration.
- Check whether thinking tokens count toward the output limit and whether they are billed separately.
- Reserve headroom for long tasks, and design retry or continuation logic for truncated responses.
- Record the usage fields returned by each call, and count actual consumption rather than estimates.
5. Pricing Must Use a Consistent Basis
The most common error in price comparison is an inconsistent basis. The same unit price can refer to different measurement methods in different vendors’ documentation. When you check prices, unify the following items.
- Pricing unit: most vendors price per million tokens, but confirm whether input and output are priced separately and whether cache hits have their own price.
- Currency and taxes: currency and tax treatment may differ by region and account type.
- Tiered pricing and discounts: the actual unit price for batch workloads may differ from the list price.
- Verification date: pricing pages change, so selection records should note the date of verification and the data source.
The function below shows the basic structure of a cost estimate. Replace the price parameters with verified values. Whether thinking tokens count as output cost depends on each vendor’s billing rules.
function estimate_cost(input_tokens, output_tokens, thinking_tokens,price_in, price_out, thinking_billed_as_output):# price_in and price_out are prices per million tokens.# The unit and currency must match the vendor documentation.billable_output = output_tokensif thinking_billed_as_output:billable_output = output_tokens + thinking_tokenscost = (input_tokens * price_in + billable_output * price_out) / 1000000return cost
6. Agent Scenarios: Tool Calling Is the Entry Requirement, Not the Answer
A typical agent workflow runs like this: the model reads the task, decides which tool to call, receives the tool’s result, decides the next step, and repeats until the task is complete. Most mainstream models support tool calling, so being able to call tools is only the entry requirement. Success rate depends mainly on the following abilities.
- Instruction following: whether generated parameters strictly match the structure and types defined by the tool.
- Error recovery: whether the model can adjust parameters and retry based on the error message after a tool fails.
- State retention: whether the model still remembers constraints and intermediate results after many turns.
- Stop judgment: knowing when to finish, and when to ask the user for missing information.
A specification suffix in a model name only indicates product positioning. It cannot prove an agent’s success rate. Two models with the same context length can differ widely in tool-calling stability.
7. Retest with the Same Task Set
Selection decisions must rely on business data. Build a task set that covers normal, boundary, and failure samples from real scenarios. A useful set typically contains at least several dozen tasks. During testing, keep the prompts, tool definitions, and sampling parameters fixed, and change only the model under test. This keeps the comparison valid.
The pseudocode below shows the basic flow for batch testing and summarizing results.
function run_suite(models, tasks, call_model, judge):results = []for model in models:for task in tasks:start = now()response = call_model(model, task.prompt, task.tools)results.append({model: model,task_id: task.id,passed: judge(task, response),latency_seconds: now() - start,usage: response.usage})return resultsfunction summarize(results):stats = {}for r in results:s = stats.get(r.model, {pass: 0, total: 0, tokens: 0})s.total += 1s.pass += (r.passed ? 1 : 0)s.tokens += r.usage.total_tokensstats[r.model] = sfor model, s in stats:s.pass_rate = s.pass / s.totals.cost_per_pass = s.tokens / max(s.pass, 1)return stats
When summarizing, review four metrics together: pass rate, average latency, token consumption per task, and cost per successful task. Cost per successful task equals total consumption divided by the number of passed tasks. A model with a low unit price may need three retries on average, so its cost per successful task can exceed that of a model with a higher unit price and a higher first-pass rate. This is why the question of whether a cheaper model passes on the first try needs to be quantified.
8. A Layered Rollout Order
No single model is best on every dimension, so the practical approach is to trial models by task type, in layers.
- High-frequency, structured tasks with results that can be checked automatically: start with a lower-cost candidate to establish a cost baseline.
- Budget-sensitive tasks with long outputs: add a second candidate, and focus on output truncation rate and the completeness of long text.
- Tasks that involve direct video input: screen the candidates that support video input separately, and verify their limits.
- Complex agent tasks: compare candidates side by side on the same task set, using pass rate and cost per successful task as the main criteria rather than names or specifications.
After the baseline tests are complete, the team should recheck pricing and documentation periodically and run regression tests with the same task set. Changes in model versions, price adjustments, and shifting business requirements can all change the best choice. Model selection should therefore be treated as an ongoing engineering process.
