LLM Selection: Capability, Cost, and Routing Strategy
Choosing a large language model is not a one-time leaderboard decision. This article presents a practical framework for evaluating strict multi-stage task completion, modeling expected cost under retries, testing reasoning levels, and versioning routing policies with regression tests and shadow traffic. Readers will learn how to set thresholds from their own replay data, avoid overpaying for marginal leaderboard gains, and keep model routing auditable and reversible.
When several frontier models are updated within a short period, the easiest mistake for a team to make is to keep default routing pinned to a configuration from months ago. Claims such as “most capable to date” or “better for agentic coding” in release notes should be treated as hypotheses, not procurement conclusions. A more reliable approach is to break model selection into three measurable questions: Does the task actually get completed? How much does completion cost? And when compute or reasoning intensity is increased further, are returns still increasing?
Define “done” before comparing models
Coding, knowledge work, and multimodal understanding are all easily misled by single-turn question scores. Single-turn questions often check only local correctness: a function runs, a summary looks fluent, or a chart is mentioned. Production requires a multi-stage closed loop: read requirements, modify code, run checks, revise based on failure messages, and finally satisfy strict acceptance criteria. Each stage can introduce new bias, and later stages can amplify errors from earlier ones.
An evaluation set should therefore meet four points.
- Tasks should be decomposable. For example, implement an interface, add tests, fix boundary cases, and update documentation, with an automatically verifiable checkpoint at each step.
- Acceptance should be strict. Partial passes, similar style, or a human judgment of “close enough” should not count as success; otherwise, differences between models are blurred by subjective impressions.
- Input distribution should be close to real workloads. Long context, mixed formats, incomplete specifications, and tickets that require back-and-forth clarification are more informative than clean algorithm problems.
- Do not report only average scores. Also examine strict pass counts, failure-stage distribution, run-to-run variance, and timeout or refusal rates.
A pattern that recurs across the industry is that on sufficiently hard multi-stage tasks, the strict pass rates of frontier models cluster within a narrow band. A “generational gap” in marketing language may amount to only a few questions at the checkpoints. At that point, paying several times more for a nominal lead is often not worthwhile. The value of evaluation is not to give awards to models, but to determine whether the gap is large enough to justify changing routing.
The shape of the bill matters more than the headline price
When capabilities are close, cost structure determines the default model. When comparing, do not look only at “one number per million tokens.” Break out at least the following dimensions.
- Input and output asymmetry. Long documents, retrieval concatenation, and multi-turn tool results quickly increase input volume; code generation and long reasoning increase output volume. The optimal price point for these two workload types is completely different.
- Speed tiers. Faster service tiers are usually billed at a multiplier. Interactive assistants may need low latency, while overnight batch processing should prioritize cheaper tiers.
- Context and modality. Text, images, audio and video, and layout documents have different billing units and preprocessing costs; pure-text unit prices cannot be extrapolated to them.
- Price windows. Some pricing is lower during promotional or transition periods and rises after expiration. Selection documents must state the price validity period and set an expiration review.
- Failed retries. When strict pass rates are low, the real cost is “expected spend per success,” not the per-call list price. When pass rates move from slightly higher to slightly lower, expected cost can move in the opposite direction.
You can estimate expected cost with a vendor-neutral calculation. Let C be the cost per call, p the estimated strict success rate, and n the maximum number of retries after failure, stopping at the first success. Under an independence approximation, the expected number of attempts is approximately (1-(1-p)^(n+1))/p, and expected cost is approximately that number multiplied by C. When p is small, small differences in p are amplified; when p is already high, differences in C often dominate the decision. This formula ignores correlation between failures and should be used only for budget sensitivity analysis, not as a replacement for online statistics.
Caching, prompt compression, retrieval snippet trimming, and result reuse often reduce cost more than switching to a flagship model. If two candidates differ by only a few checkpoints in strict pass rate, optimize context assembly first before discussing an upgrade.
Higher reasoning effort is not always better
Many services split reasoning or thinking effort into multiple levels. The intuition is that a higher level is more accurate, but measurements are not necessarily monotonic. Longer internal reasoning can have four side effects: verbose output that crowds out useful code or conclusions; over-exploration that changes parts that were already correct; increased latency that triggers timeout failures; and higher variance for the same prompt, making strict checks harder to pass consistently.
The correct experiment is to fix tasks, prompts, and temperature-like sampling parameters, change only the reasoning level, and repeat multiple times. Record strict pass counts, average cost, tail latency, and failure types. If cost rises severalfold while pass counts fall, that level should not enter default routing; at most, reserve it for human spot checks or extremely high-value tickets.
This also means the “maximum level” is not suitable as a production default. The default should be the knee of the return curve: adding one more level costs more than the pass-rate improvement and latency can justify.
Routing by task, not by brand
The goal of model routing is to send requests to a path that is “good enough and cheaper or more stable,” not to keep only one flagship model across the site.
Start with coarse classification, then refine routing.
- Short Q&A, format conversion, classification, and tagging: use a low-cost general model with stable latency and add output schema constraints.
- Multi-stage coding and complex repository changes: use a model that performs stably on strict evaluations, cap retries, and on failure return checkpoint logs rather than blindly escalating.
- Long-document and multimodal understanding: verify context windows, input types, and whether citations are traceable, rather than looking only at text scores.
- High-risk actions (commits, payments, bulk data changes): the model produces suggestions only; execution authority goes to a policy engine and human confirmation.
Routing configuration should be versioned: model identifier, level, prompt template, tool list, timeout, and budget caps should live in the same manifest. Changes should go through the same review as code. Rollback should be able to switch back to the previous default set within minutes.
Keep a “challenger” slot and compare new models through small shadow calls or offline replay. Shadow traffic does not directly affect users and only accumulates pass rates, costs, and complaint labels. Only when the challenger is consistently better than the current production model on key slices should its weight be increased. Slices include language, repository size, whether images are present, and whether context is very long, so that overall averages do not hide important differences.
Evaluation and regression do not stop on selection day
After launch, model providers may silently change behavior, and prompts and tools will also change. Without a regression set, routing will slowly drift. A minimal regression set can include fixed multi-stage coding tasks, a number of real desensitized tickets, a set of unauthorized requests that must be refused, and a set of latency and cost probes. Run at least these four categories for every candidate change.
Metrics should cover both quality and operations: strict pass rate, human takeover rate, first-contact resolution rate, expected cost per success, P95 latency, and refusal and safety block rates. If quality rises but the takeover rate also rises, automated acceptance is too loose. If cost falls but first-contact resolution falls, the saved call fees are being shifted to human labor.
A schematic routing decision does not need to be tied to any vendor API; the core is thresholds, not slogans:
if task.risk == "high":require_human = trueelif task.type == "multi_stage_code":choose model where pass_rate_ci_low is acceptableand expected_cost is minimal among those modelselse:choose lowest_cost model that meets latency_slo
Thresholds come from your team’s replay data, not from marketing pages. When the confidence interval is wide, do not switch the default model just because the point estimate is a few tenths of a percentage point higher.
Governance and implementation checklist
The selection conclusion should be written as a one-page decision record: evaluation set version, sample size and statistical methodology, pass rates and cost intervals for each candidate, reasoning-level experiments, price validity period, default routing, exception paths, and review date. Keep only reproducible metrics in the record; do not keep judgments such as “feels smarter” that cannot be regressed.
Review cadence can follow price windows and business versions. If new frontier versions appear within a few weeks, that does not mean a full replacement each time; it means opening a small-traffic comparison. When pass rates cluster and costs differ by an order of magnitude, choose the cheaper path with lower variance by default. Expand traffic only when the challenger improves both pass rate and expected cost on the target slices, or significantly reduces human takeover.
If a team is already using model services such as Baidu AI Cloud with associated logging, monitoring, and object storage, evaluation samples, call details, and routing configuration should enter the same auditable chain: calls traceable, costs chargeable, and changes reversible. Cloud capabilities can be designed using generic categories such as log services, monitoring and alerting, object storage, and containerized jobs; the selection process does not need to be tied to a single model product name.
Finally, remember a counterintuitive but very practical principle: on hard tasks, frontier models often have close strict scores, while bills and stability differ much more; maxing out reasoning intensity does not guarantee passing a few more questions. Writing down evaluation criteria, expected cost, and routing thresholds clearly is closer to the engineering-correct answer than chasing the next “strongest” release.
