LLM Selection Guide: Pricing, Capabilities, and Agent Performance Testing
Choosing a large language model is not about picking the cheapest option, but about measuring end-to-end cost across input modality, output budget, thinking mechanisms, and billing units. This guide presents a four-dimension evaluation framework, a practical trial order, and a business re-testing method built on a unified task set and acceptance function, helping teams decide which model to use for high-frequency structured tasks and complex AI agents based on real measurements rather than spec sheets.
1. The Problem: Why Reading Files, Writing Code, and Calling Tools Can Differ in Cost by 100x
In real engineering work, sending the same business task to different large language models can push the cost of a single turn from a few cents to several dollars. On the surface this looks like a difference in unit price. In practice, four variables work together: input size, output budget, whether explicit thinking is required, and whether billing is measured by input, by output, or by a mixed metric.
So the first principle of model selection is not “find the cheapest one.” It is to answer two questions: can the cheaper model pass acceptance on the first attempt, and can the more expensive model significantly reduce rework? If the first-pass rate rises from 60% to 90%, the end-to-end cost may still drop even if the unit price doubles, because rework means repeated input, repeated tool calls, and repeated human review.
It is worth stressing that the context length on a spec sheet, or a suffix in the model name (such as “Max,” “Flash,” or “Pro”), does not directly prove agent success rates. These are statements of capability boundaries, not rankings of effectiveness.
2. A Four-Dimension Evaluation Framework
2.1 Input Modality: First Confirm What You Are Feeding In
Multimodal support determines whether a use case is feasible, not whether the output is better or worse. A common tiering is: text and images only; text, images, and video. If the business needs to understand a video stream directly (for example, operation recordings or production-line monitoring clips), you must first rule out candidates that support only text and images. Otherwise the pipeline degrades into frame extraction plus manual labeling, and the engineering chain becomes significantly longer.
2.2 Output Budget: Separate “Final Answer Length” from “Total Generation Allowance”
This is the easiest place to make a mistake. The generation budget includes both the chain of thought and the final answer, and the two share the same allowance. In other words, a model labeled as having a higher limit in thinking mode does not mean the final answer can be longer. Another common mistake is to read the total window as “after the input is filled, an equal length can still be generated.” In reality, the input and the current turn’s generation usually share the same window.
The engineering implication is direct: reserving budget for thinking is equivalent to compressing the available output. Long-document summarization tasks must be segmented with an explicit budget allocation.
2.3 Thinking Mechanisms: Explicit Thinking vs. Implicit Reasoning
Explicit thinking mode suits multi-step reasoning, code refactoring, and tool orchestration, but it drives up generated tokens. Non-thinking mode has low latency and controllable cost, and suits classification, extraction, and format conversion. The reasonable approach is to treat the two as separate paths and let a routing layer split traffic by task type, instead of fixing one mode globally.
2.4 Billing Units: Normalize Before Comparing
Platforms do not write context sizes the same way (K, M, or exact token counts), so you cannot treat them as exactly equal and divide. During selection, convert all candidates to “end-to-end cost per thousand business requests,” and rank them only after the units are aligned.
3. A Practical Trial Order
- High-frequency text-and-image and structured tasks: start with a low-cost candidate to establish a cost baseline, and fix three metrics: accuracy, latency, and failure rate.
- Budget-sensitive work that needs a larger generation budget: bring in a second candidate for comparison, and observe whether long-output tasks show fewer truncations and retries.
- Tasks involving direct video input: keep only candidates that support the video modality for the next round.
- Complex agents: use the same task set for the final decision, and do not compare conclusions across different task sets.
4. Business Re-Testing: Turning “Gut Feeling” into Data
Build a real task set of 100 to 300 items covering four sample types: regular, boundary, adversarial, and long-context. For each sample, record input tokens, output tokens, whether it passed acceptance, elapsed time, and the number of retries.
Illustrative pseudocode:
def evaluate(candidate, tasks):total_cost, passed = 0.0, 0for t in tasks:r = candidate.run(t.prompt, tools=t.tools)total_cost += r.input_tokens * candidate.price_in \+ r.output_tokens * candidate.price_outpassed += int(accept(t, r)) # unified acceptance functionreturn {"pass_rate": passed / len(tasks),"cost_per_run": total_cost / len(tasks),"avg_latency": mean(r.latency for r in tasks),}
Three constraints are critical: the acceptance function must be exactly the same for all candidates; tool calls must use the same sandbox and permissions; and each task should be repeated three times with the median taken, so that occasional jitter is not mistaken for a capability difference.
5. Common Pitfalls
- Treating context length as accuracy: a long window only solves “can it fit,” not “can it find.”
- Ignoring that the output budget is consumed by thinking: this shows up as truncated answers but gets misjudged as insufficient model capability.
- Mixing model identifiers: preview and official versions often have different call identifiers, and configuration drift can distort conclusions from a canary environment.
- Running offline evaluation only: tool-call failures mostly happen under real permissions and timeout conditions.
6. Implementation Notes on Baidu AI Cloud
If an enterprise wants to engineer the process above, it can rely on relevant general capabilities from Baidu AI Cloud: use object storage to archive task sets and call logs, use a message queue to smooth peaks and control concurrency, use a container platform to host a sandboxed tool execution environment, and use log services plus monitoring and alerting to track three curves: pass rate, latency, and cost. The model routing layer then splits traffic dynamically by task type and budget threshold, forming a selection loop that is “gradual, rollback-capable, and auditable.”
7. Conclusion
Selection is not a one-time decision. It is a mechanism for continuous re-testing: first filter by input modality for feasibility, then estimate real cost by output budget and thinking mechanism, and finally use a unified task set and a unified acceptance function to decide where complex agents belong. Treat specs as boundaries and measurements as conclusions, and you can achieve an explainable balance among cost, capability, and stability.
