Model selection at runtime is a different engineering problem than training: it’s an inference-architecture and ops problem first, a modeling problem second. Companies that treat every request the same pay for peak quality on 100% of traffic; companies that route intelligently pay for peak quality on 10–30% of traffic and still hit user-facing SLOs.

Direct answer: Model selection at runtime is the practice of routing each inference request to a model instance based on cost, latency, and a per-request quality score. Implemented correctly, it reduces monthly inference cost by 40–70% on typical SaaS workloads (5M requests/month, 1,000 tokens/request) by sending 10–30% of traffic to a high-cost model and the remainder to cheaper, lower-latency models while keeping 95th-percentile latency under 300 ms.

Two short stakes. First: cost. If a high-quality large model charges $0.10 per 1k tokens and a smaller model charges $0.005 per 1k tokens, 5M requests at 1k tokens each cost $500k/month vs $25k/month respectively. Routing 20% of requests to the expensive model and 80% to the cheap model yields $105k/month — a 79% saving versus the expensive-only baseline. Second: latency and UX. Smaller models commonly return p95 latency of 60–120 ms; larger models are 300–800 ms at p95. A uniform strategy trades latency for accuracy; routing lets you tune both.

Model selection at runtime

There are three knobs you can use when you build runtime model selection: routing policy, confidence scoring, and blending/fallback. Routing policy is the mapping from request metadata to candidate models — for example, route documents under 200 tokens to a small model, route high-entropy prompts to a larger model, or route premium customers to the highest-quality option. Confidence scoring estimates per-response reliability and is how you decide whether a cheap model’s answer is sufficient or needs escalation.

Concrete costs and savings matter. If your average request is 500 tokens, a high-quality model at $0.08/1k tokens costs $0.04/request. A smaller model at $0.004/1k tokens costs $0.002/request. At 2M requests/month, a naive single-model deployment to the high-quality model costs $80k/month; model selection that sends 25% of traffic to the expensive model and 75% to the cheap model costs $21k/month — a $59k/month saving, or $708k/year.

Latency budgets and SLOs must be encoded into routing rules. If your product requires p95 < 300 ms, you should measure both inference time and end-to-end latency including network and queuing. For many customers a two-tier policy (fast small model for 70% traffic, slow high-quality model for 30% traffic) keeps p95 under 300 ms because the majority of traffic never waits on the slow model. For latency-critical flows, use synchronous routing with cached outputs; for non-critical flows, use asynchronous escalation with background verification.

Operational complexity is the tax. You will need per-request telemetry, an online calibration loop for confidence thresholds, and a fallback graph for model failure. Building those three systems typically costs a 1–2 engineer-month initial investment plus 0.25 engineer FTE ongoing. Compare that to the recurring savings: if routing saves $59k/month (above), the payback on a $30k implementation is under one month.

Route for marginal value: pay the expensive model only when expected quality delta times business value exceeds the incremental cost.

Architectural patterns and trade-offs

Pattern 1 — deterministic routing with business rules. Use explicit rules you control: premium customers → high-quality model; short prompts → small model. This is cheap to implement and auditable for compliance. The downside is brittleness: you overpay on edge cases and you cannot capture soft signals like perplexity or semantic difficulty without instrumenting additional models.

Pattern 2 — confidence-based escalation. Run a lightweight quality predictor (a small classifier or a shallow heuristic like token-entropy) alongside the cheap model. If confidence < threshold, escalate. Implemented well, this reduces cost by 50–70% versus high-quality-only deployments. Expect to invest 2–4% of your inference CPU budget into the predictor and maintain an evaluation dataset; otherwise false negatives or positives will erode savings.

Pattern 3 — ensemble / blending only when necessary. For tasks where partial answers can be fused — e.g., extractive QA or multi-tool pipelines — blend outputs from multiple models and score the fused answer. Blending improves accuracy but costs additional latency and compute. Use blending on at most 5–10% of traffic; beyond that the cost quickly outpaces accuracy gains.

Tooling choices influence cost and latency. Use model serving frameworks like Ray Serve or KServe when you need autoscaling with custom routing hooks. If you rely on hosted model providers (Anthropic, Mistral, Cohere), push routing logic to a thin gateway that tracks cost-per-token and rejects or reroutes requests when budgets hit thresholds. For embeddings or cached outputs use Pinecone or Weaviate to avoid re-invoking models for repeated queries; caching can cut calls by 10–50% depending on request locality.

What this means for a CTO

You should treat routing as a product feature with an economic objective function. Define a dollar-value per unit quality for each customer segment and use that to set confidence thresholds. If you operate at 1M+ monthly requests, routing is not optional: a 40–70% reduction in inference cost materially changes your burn rate and pricing strategy.

Start with a single automated policy and a measurement pipeline. Instrument per-request: model id, tokens in, tokens out, p50/p95 latency, confidence score, and business outcome (click, conversion, correction). Expect the measurement pipeline to cost $1k–$3k/month on managed monitoring; that’s trivial next to six-figure monthly inference bills.

Operational controls you must add before routing wide: hard cost caps, per-customer model entitlements, replay logging for audit, and a rollback API. Without these, routing introduces tail-risk where a mis-calibrated threshold sends high-value traffic to cheap models and damages retention — a single incident can wipe out months of cost savings.

Rollout checklist and quick FAQ

1) Run an offline simulation for 30 days of logs to predict cost and accuracy delta if routing were applied. 2) Deploy a shadow mode where the cheap model serves but the expensive model is called in parallel for 1–5% of traffic to calibrate confidence. 3) Move to live routing with strict caps and start at 5–10% traffic for the first two weeks.

FAQ — "When should I not route?" If your application requires provable uniform quality (regulated financial advice, legal judgments) you must use the highest-quality model for all requests. FAQ — "How many models are too many?" Two-to-four model tiers cover >95% of cost/latency trade-offs; more tiers add combinatorial complexity for little marginal gain.

FAQ — "How do I evaluate confidence predictors?" Measure recall@k for error detection on a labeled test set and track production false-positive and false-negative rates monthly. Aim for a coverage where false negatives (missed escalations) are under 1–2% on high-value flows.

Key takeaways

1. Model selection at runtime reduces inference spend by 40–70% for most SaaS workloads by sending only 10–30% of traffic to high-cost models.
2. Implement routing with confidence scoring, caching, and a fallback graph; expect a 1–2 engineer-month initial cost and sub-quarter payback at scale.
3. Start with shadowing and strict cost caps; measurable telemetry (tokens, latency, confidence, business outcome) is mandatory.
4. Use 2–4 model tiers and avoid blending on more than 10% of traffic to keep complexity manageable.
5. If your product requires uniform, auditable output for regulatory reasons, do not route—use the highest-quality model for all requests.

Runtime model selection flips the engineering decision from "which model is best" to "which model is best for this request." That small reframing drives large economic outcomes: it turns a fixed inference bill into a controllable margin lever. The architecture you choose — rules, predictor, or ensemble — determines whether you capture those savings or merely add operational burden. Route for marginal value, not for hero-model vanity.