Low-Cost LLM Inference: Model Tiering and Routing for Engineering Teams
This article explains how to cut LLM inference costs by 10x to 100x through a tiered model strategy and intelligent routing. It covers building a cost model, designing a four-layer routing architecture with fallback logic, setting up offline and online evaluation with quality, cost, and latency gates, and implementing observability and capacity governance. It also lists common pitfalls and a practical rollout checklist.
1. Why Low-Cost Inference Became an Architecture Problem
Over the past two years, the bottleneck in LLM applications has shifted from “can we build it” to “can we afford to run it.” As workloads move from demos to production and call volume grows from thousands to tens of millions, the per-token price turns into a significant structural cost. One emerging trend is that model families are now tiered internally by capability and price, forming a flagship–balanced–lightweight gradient that lets teams allocate compute budgets according to task difficulty.
Against this backdrop, a cloud vendor released two new models in September 2026, completing a model matrix that already included a flagship model. The lightweight option is priced at $0.10 per million input tokens and $0.50 per million output tokens, targeting professional office work, coding assistance, workflow automation, and computer-use tasks. According to the vendor, at higher reasoning effort settings, its performance can rival the previous generation’s balanced model at roughly one percent of the cost. This article does not focus on a specific product. Instead, it abstracts the phenomenon into a general engineering problem: how to build a “tiered models + intelligent routing” inference system that reduces overall cost to one tenth or even one percent of the original.
2. Cost Model: Understand How the Bill Adds Up
Before cutting costs, you need a computable cost model. The cost of a single request can be approximated as:
cost per request = input tokens × input price + output tokens × output pricemonthly cost = Σ(cost per request) × request volume × (1 - cache hit rate) + retry and failure overhead
The formula yields three important conclusions:
- Output is generally more expensive than input. In the example above, the output price is five times the input price, so “making the model say less” is often more effective than “making the model read less.” Structured output, field trimming, and summary-style responses can significantly reduce the bill.
- Context length is a hidden amplifier. System prompts, conversation history, and retrieved snippets are billed repeatedly on every request if left ungoverned. Compressing the always-on context to the necessary minimum typically yields more than 30% in direct savings.
- Retries and failures also cost money. Repeated calls caused by timeouts, rate limiting, and format parsing failures can account for more than 10% during peak hours. Without observability, this overhead is often completely overlooked.
3. Tiering and Routing: Putting Cost Reduction into the Architecture
The value of low-cost models is not to “replace flagship models across the board” but to handle most low- and medium-difficulty requests. The recommended tiered routing strategy is:
- Layer 1: Rules and cache. Route high-frequency repeated questions through a semantic cache; handle deterministic logic with code rather than a model.
- Layer 2: Lightweight model. Handle classification, extraction, rewriting, routine Q&A, and boilerplate code generation.
- Layer 3: Balanced model. Handle multi-step reasoning, cross-file refactoring, and complex troubleshooting.
- Layer 4: Flagship model. Reserve for long-chain planning, extremely difficult defect localization, and high-risk decisions, with mandatory human review.
Routing decisions can be implemented with “difficulty scoring + confidence fallback.” Example code:
def route(task):score = estimate_difficulty(task) # length, number of steps, domain, historical failure rateif cache.hit(task):return cache_layer(task)if score < 0.35:return light_model(task) # low-cost layerif score < 0.75:return balanced_model(task)return flagship_model(task, human_review=True)def with_fallback(call, retry=1):for i in range(retry + 1):try:return call()except (TimeoutError, RateLimitError):if i == retry:return balanced_model(note="degraded") # degrade instead of failing outright
Three engineering points also matter. First, reasoning effort should be exposed as a tunable parameter to the business side: lower it for simple tasks to trade for latency and cost, and raise it for complex tasks to trade for accuracy. Second, output must be verifiable, backed by schema validation and unit tests, to avoid “cheap but unusable.” Third, fallback paths must be explicitly designed: any layer’s failure should be caught by the next layer rather than throwing an exception to the user.
4. Evaluation: No Measurement, No Cost Reduction
Cost reduction must be premised on quality; otherwise, it merely shifts cost into rework. A three-layer evaluation system is recommended:
- Offline benchmark set. Sample from historical real requests, cover all business lines, annotate standard answers or acceptance scripts, and form a fixed regression set.
- Online canary comparison. Canary the new routing strategy with 5% of traffic and compare accuracy, time to first token, completion rate, and human takeover rate.
- Cost attribution dashboard. Break down token consumption and cost by business line, task type, and model tier to locate the “most expensive 10% of requests.”
An example of a practical acceptance gate:
Quality gate: accuracy on critical tasks no lower than 98% of baselineCost gate: cost per request reduced by ≥ 60%Latency gate: P95 time to first token no higher than 1.2× baseline
Only when all three are met simultaneously can the canary ratio be expanded.
5. Observability and Capacity Governance
Low-cost models often mean higher concurrency and finer-grained calls, which increases operational complexity. At a minimum, collect the following metrics: call volume and token distribution by tier, cache hit rate, rate-limiting and retry counts, fallback trigger rate, cost per request, and failure reason clustering. Logs and distributed tracing should carry a request ID across the entire chain so that an anomaly can be traced back to a specific prompt and parameter combination. For capacity planning, reserve burst headroom for the lightweight layer and set budget alerts and circuit-breaker thresholds to prevent abnormal traffic from burning through the monthly budget within hours.
6. Common Pitfalls
- Pitfall 1: Replacing everything at once. Ignoring the task difficulty distribution causes quality collapse on complex tasks.
- Pitfall 2: Looking only at unit price, not total cost of ownership. Rework, human review, and customer complaints are hidden expenses.
- Pitfall 3: Neglecting prompt governance. Verbose system prompts are the biggest source of waste under high concurrency.
- Pitfall 4: Treating cost reduction as a one-time project. Models and prices keep evolving, so routing strategies need quarterly reviews.
7. Implementation Checklist
- Establish cost and token baselines, and identify the most expensive task types;
- Build a tiered model matrix and routing rules, canary first, then scale;
- Introduce semantic caching and structured output to compress duplication and redundancy;
- Build an offline regression set and an online canary dashboard, and set the triple quality/cost/latency gates;
- Improve observability, budget alerts, and fallback plans;
- Review price and capability changes quarterly and dynamically adjust the tier mix.
Conclusion
The essence of low-cost inference is not “switching to a cheaper model” but using engineering means to send the right request to the right capability tier. When a model family forms a clear gradient and the price gap reaches two orders of magnitude, whoever first makes routing, caching, evaluation, and observability solid can gain several times the business throughput under the same budget. If an enterprise wants to validate the above approach on Baidu AI Cloud, it can use general-purpose capabilities such as container platforms, message queues, log services, and monitoring alerts to build the evaluation and canary pipeline, completing the loop without binding to any proprietary interface.
