
The Compute–Grid Bargain: Planning AI Infrastructure Responsibly
AI infrastructure planning now connects compute demand with power, water, storage, network capacity, workload flexibility, and local resilience.
Read MoreZharfAI Team

Sending every request to the largest available model is easy to implement and hard to justify. A support classification, a long-document extraction, a safety-critical explanation, and a multi-step coding task have different capability, latency, privacy, and cost requirements. A model-routing layer turns those requirements into an explicit selection policy.
Routing is not merely a cheaper-model classifier. It is a control plane that decides whether to use a deterministic tool, a small or specialized model, a private deployment, a more capable general model, a cascade, or a human process. It also decides when to refuse, retry, or fall back. The business value comes from meeting a service-level objective at the lowest total expected cost—not from maximizing traffic to the cheapest endpoint.
For a request (x), candidate model (m), and current system state (s), a router can estimate:
A simple objective chooses the eligible option with the highest expected utility:
utility = quality value - inference cost - latency penalty - expected failure cost
The weights are product decisions. A customer-facing medical explanation may place a large penalty on unsupported claims. A background metadata job may tolerate minutes of delay but have a strict unit-cost ceiling. A router cannot learn the correct tradeoff until the organization defines it.
Direct token price is only one cost. Include the routing call, retries, duplicate cascade calls, tool execution, retrieval, long outputs, human review, incident cost, and the cost of a wrong answer. A model that is slightly more expensive but produces shorter, usable responses may be cheaper end to end.
Static policy routing maps known tasks, tenants, languages, or sensitivity classes to a model pool. It is transparent and a good first release.
Rules plus capability gates reject models that lack the required context, modality, structured output, tool support, residency, or contractual status. Only then does optimization occur.
Learned input routing predicts which model will satisfy quality for a prompt. The peer-reviewed RouteLLM paper at ICLR 2025 learned strong-versus-weak routing from preference data and reported more than twofold cost reduction on its evaluated setup without sacrificing measured quality. That is research evidence under specific models and benchmarks, not a universal savings promise.
Cascading starts with a cheaper model and escalates when a verifier, confidence rule, or task check fails. It can save cost when failure is detectable, but it adds latency and may pay for two calls.
Portfolio or batch routing assigns a group of requests under capacity and budget constraints. A March 2026 preprint on robust batch-level routing reports gains under its benchmarks and adversarial batch construction; because it is a preprint, treat its results as directional until independently replicated.
Human routing sends exceptional, consequential, or policy-ambiguous requests to a person. A mature router includes this path rather than forcing every input through a model.
Consider a support system handling password resets, billing disputes, enterprise security questions, and free-form complaints in English and Persian.
First, a deterministic layer identifies authenticated account state and retrieves policy. A lightweight classifier predicts task type, language, urgency, and sensitivity. Password-reset status goes to a deterministic workflow. A small model summarizes routine cases into a fixed schema. A specialist model handles Persian extraction if its evaluated accuracy is higher. A stronger model drafts an answer for complex security questions, but only from approved sources. Billing refunds above a threshold route to a human.
The response is checked before delivery: required citations present, account facts match tools, policy constraints satisfied, and unsupported commitments absent. If the small-model answer fails, the system can escalate once. A second failure routes to an agent instead of bouncing among providers.
The trace stores route inputs, eligible pool, selected model and version, prompt/template version, tool calls, tokens, latency, quality checks, fallback reason, final disposition, and user outcome. This is the difference between routing and opaque provider switching.
A router can only choose among evaluated options. Create a model card for each deployment:
Use current vendor documentation for capability and price metadata, but label it as vendor evidence and verify it operationally. Provider claims describe an offered service; they do not establish performance on your distribution. Maintain a versioned snapshot because names, limits, and pricing can change.
For self-hosted models, include accelerator reservation, idle capacity, energy, deployment engineering, observability, security patching, and on-call cost. “No per-token bill” is not free.
Exact match may work for extraction. Customer support needs policy adherence, factuality, completeness, tone, and resolution. Code tasks need tests and review. Do not collapse incompatible tasks into one generic judge score.
Sample real, consented, de-identified requests across languages, tenants, length, complexity, sensitivity, and edge cases. Keep time-based holdouts so the router is tested on later traffic. Include refusals and deterministic workflows.
Generate candidate outputs under the same tools and prompt contract. Score with deterministic checks, domain reviewers, and carefully validated model graders. Blind human reviewers to provider and price where possible.
The router needs a calibrated estimate that a candidate clears the required quality bar. The 2026 ACL Student Research Workshop paper on conformal LLM routing explores a statistical bound on the violation rate among requests routed to the cheaper model. Its limited benchmark scope does not remove the need for product-specific validation, but it demonstrates a useful direction: express routing risk as a measurable tolerance.
Run the router without changing production selection. Compare its choice with the existing model and record counterfactual quality, cost, and latency. Then canary on low-risk traffic with a kill switch.
Use a broad, reproducible benchmark harness before trusting a routing policy. Stanford CRFM’s HELM framework evaluates models across multiple scenarios and metrics and exposes raw results for inspection. HELM is a research evaluation framework, not a production acceptance test; its practical value here is methodological. A router must be evaluated on the organization’s actual task mix, languages, risk tiers, latency constraints, and human outcomes rather than a single aggregate benchmark score.
Judge bias: An LLM judge may favor outputs that resemble its own style or a particular provider. Calibrate against blinded human decisions and task outcomes.
Selection bias: Historical traffic may already be filtered by the old system. Sample raw incoming demand, including abandoned and escalated cases.
Easy-average bias: High-volume easy tasks can hide severe failures in a small critical slice. Report by task, language, customer tier, risk, and complexity.
Counterfactual gaps: Production shows only the chosen model’s result. Continue small randomized exploration where safe so alternative performance remains measurable.
Model drift: A provider update can change a route’s quality without changing your code. Pin versions where possible, monitor fingerprints or release notices, and trigger requalification.
Gaming: If users learn that wording triggers a premium model, usage changes. Do not expose simplistic thresholds; rate-limit abuse and monitor distribution shifts.
This evaluation layer should share datasets and release discipline with frontier model evaluation, while operational traces belong in AI agent observability.
Route eligibility must be decided before an input reaches a provider. Classify the request using metadata or a trusted local process; do not send sensitive content to an ineligible model merely to ask where it belongs.
Enforce:
If a premium model has broader tool access, escalation must not become privilege escalation. The router selects computation; authorization still belongs to the application.
Track more than “percent on small model”:
Connect model spend to cloud and product economics through AI FinOps. A router that cuts inference spend but raises support contacts or churn is not an optimization.
Before launch, require:
Rollback can be global, task-specific, tenant-specific, or model-specific. Preserve a stable baseline route; do not discover during an incident that every path depends on the same unavailable provider.
Routing is attractive when traffic is high, task difficulty varies, model cost or latency differs materially, and quality can be checked. It is less useful when volume is low, all requests are high consequence, one model dominates every relevant slice, or the routing overhead approaches the savings.
Start with static policy if you have fewer than three well-understood task classes. Add a cascade when failure is cheaply detectable. Train a learned router only after you have representative pairwise outcomes and ongoing evaluation capacity. Complexity must earn its operational cost.
No. A costly classifier, frequent cascades, retries, or longer cheap-model outputs can erase savings. Measure cost per successful outcome.
Use it only after calibration. Self-reported confidence is often poorly aligned with correctness and can change across prompts and versions.
It can improve resilience and price competition, but adds policy, integration, output-consistency, and observability work. Start only with approved providers and a normalized contract.
Monitor continuously and retrain or recalibrate after material traffic, model, price, prompt, or policy changes. Use controlled releases rather than automatic threshold drift.
Move a high-volume, low-consequence, easily scored task from the default large model to a smaller evaluated model in shadow mode, with one explicit fallback.
A model router is an evidence-backed policy engine. It should choose the least costly eligible path that meets a task-specific quality and latency target, expose why it chose that path, and fail safely when its estimate is uncertain. The durable advantage is not a clever classifier; it is the evaluation, authorization, observability, and rollback system around the choice.
Sources reviewed and current as of July 30, 2026:

AI infrastructure planning now connects compute demand with power, water, storage, network capacity, workload flexibility, and local resilience.
Read More
Open-source models give teams control, but production value depends on evaluation, serving, fine-tuning discipline, security, and upgrade strategy.
Read More
An operational view of AI in Iranian banking: fraud detection, credit scoring, Persian customer assistants, and document automation, with governance requirements and a low-risk pilot path.
Read MoreSee the daily briefing and the operational guides. This page is an archive note, not an invitation to start a project.