
Smart LLM routing can cut your AI spend by 30-85% without users noticing a quality drop. That's not a marketing claim — it's the documented production result from companies that have moved past the "one default model for everything" pattern most founders ship with.
If you're an early-stage founder watching your monthly AI bill climb past $1,000, $5,000, or $20,000 — the issue is almost never that you picked the wrong model. The issue is that you picked one model. The teams shipping the most cost-efficient AI products in 2026 don't have a "primary LLM." They have a routing strategy.
This guide walks through what model routing actually is, the five strategies that work in production, how to compare the major AI gateway tools (OpenRouter, LiteLLM, Portkey), and how to build a routing layer for your own product — including a section on why Sarvam matters specifically for founders building for Indian-language audiences.
What Is LLM Model Routing?
Model routing is the practice of directing each user request to the most appropriate model based on the request's characteristics — instead of sending every request to a single default model.
In a non-routed system, every user interaction hits one model. Simple FAQ questions and complex reasoning tasks both go to the same place. You pay premium-model prices for trivial queries and risk premium-model latency for fast lookups.
In a routed system, a router (rule-based, semantic, or LLM-based) examines each request and forwards it to the model best suited for that specific task. A pricing question goes to a small, fast model. A complex multi-step reasoning task goes to a frontier model. A query in Tamil might be routed to a specialized Indic model. The user sees the same product. The business sees a dramatically smaller AI bill.
Why Routing Matters More Than Ever in 2026
The AI model landscape in 2026 has fundamentally changed the economics of routing:
Year | Median enterprise blended cost per million tokens |
|---|---|
Mid-2025 | $18.40 |
April 2026 | $6.07 |
Best-in-class routed architectures (April 2026) | $2.31 |
Two things stand out. First, raw token prices have dropped 67% year-over-year. Second — and more importantly — the gap between an unrouted production stack ($6.07/M) and a routed one ($2.31/M) is more than 2.6x. That gap exists at every scale. At 1,000 active users, it's the difference between a $300/month and a $115/month AI bill. At 100,000 users, it's $30,000 vs $11,500 per month. The arithmetic is the same; the consequences scale.
For Indian SaaS founders specifically: the gap matters more because customer LTV is typically lower than US/EU SaaS. A 60% reduction in AI costs can be the difference between a unit-economics-positive product and a money-losing one.
The 5 Routing Strategies That Actually Work in Production
Production routing systems in 2026 use one or more of these patterns. Each has trade-offs in complexity, latency, and accuracy.
Strategy | How it works | Latency overhead | Accuracy | Best for |
|---|---|---|---|---|
1. Rule-based | If-then logic on metadata (user tier, query length, region, language detection) | 10-50ms | Medium — good for clear cases | Most early-stage products. Start here. |
2. Semantic (embedding-based) | Vector similarity matching to predefined categories, each mapping to a model | 20-100ms | High — handles fuzzy intent well | Customer support, multi-domain Q&A, content workflows |
3. Lightweight classifier | BERT-style fine-tuned classifier predicts request difficulty | 30-80ms | High | High-volume products where 1ms routing overhead matters |
4. LLM-based routing | A small LLM (Haiku, GPT-5 nano, Gemini Flash) decides which model to call | 300-800ms | Very high — handles edge cases | Low-volume, high-stakes routing (legal, medical) |
5. Ensemble / hybrid | Combines fast rules upfront + semantic for ambiguous cases + LLM fallback | 10-200ms (avg) | Highest | Mature production systems with diverse traffic |
Most successful production routing systems start with strategy 1 (rule-based) and evolve toward strategy 5 (hybrid ensemble) as they accumulate data on which routes win.
The Three-Tier Stack Pattern
The single most common architecture pattern I implement as a fractional CTO is the Three-Tier Stack:
Fast tier (60-80% of traffic): Claude Haiku 4.5, GPT-5 nano, or Gemini 2.5 Flash. For greetings, simple Q&A, lookups, basic intent classification. Cost: ~$0.25/M input tokens.
Smart tier (15-30% of traffic): Claude Sonnet 4.6 or GPT-5. For nuanced reasoning, code generation, structured analysis. Cost: ~$3/M input tokens.
Power tier (1-5% of traffic): Claude Opus 4.7 or GPT-5 Pro. For complex multi-step reasoning, legal/medical-grade decisions, high-stakes outputs. Cost: ~$15/M input tokens.
When implemented correctly, this pattern routes 60-80% of traffic to models that cost 1/12th of the premium tier — while preserving quality where it matters. The math compounds quickly at scale.
AI Gateway Comparison: OpenRouter vs LiteLLM vs Portkey
You have three serious choices for the routing infrastructure layer in 2026. Picking wrong burns either money or engineering time. Here's the honest comparison:
Gateway | Model | Routing capability | Best monthly spend tier | Trade-off |
|---|---|---|---|---|
OpenRouter | SaaS marketplace — one API key for 200+ models, pay-per-token | Auto-routes by provider availability, price, and speed | Under $2,000/mo | Easiest to start. Routing logic is theirs, not yours. Marketplace fee kicks in at scale. |
LiteLLM | Open-source Python proxy — 100+ LLMs, self-hosted | Full control via YAML — fallback chains, round-robin, least-latency, cost-optimized | $10,000+/mo | Most cost-efficient at scale. Requires DevOps capacity. You own the infrastructure. |
Portkey | Enterprise AI gateway with semantic caching, guardrails, observability | Conditional routing on metadata, circuit breakers, request-level overrides, semantic caching | $2,000-$10,000/mo (where observability matters) | Most production-grade features. Best for enterprise compliance. Higher monthly base. |
The Rule of Thumb for Gateway Selection
Based on production data I've seen across client engagements:
Under $2K/month AI spend: OpenRouter wins. Zero infrastructure work, simplest API, fastest to deploy. LiteLLM's setup cost exceeds the savings at this scale.
$2K-$10K/month: Portkey wins if observability matters to you (production-critical or compliance-heavy use cases). Otherwise OpenRouter or LiteLLM are both viable.
Over $10K/month: LiteLLM becomes the clear cost winner. The marketplace fees from OpenRouter become a significant line item at this scale, and self-hosted infrastructure starts paying for itself.
Portkey's semantic caching alone can reduce costs by up to 40% by caching responses to similar prompts. For high-volume support or FAQ-heavy products, this single feature can justify the platform fee.
Indic Language Routing: Why Sarvam Belongs in Your Stack
If your product serves customers writing in Indian languages — Hindi, Tamil, Bengali, Punjabi, Marathi — you should know about Sarvam AI as a specialized route in your model stack.
Sarvam's models are India-built and trained specifically on Indian language data. For Hindi, Tamil, and Bengali conversation, they outperform Gemini and Claude on nuance, cultural context, and code-switching (when users mix English with their native language mid-sentence — a pattern common in Indian SaaS conversations).
How to Route to Sarvam Effectively
Language detection at request entry: Use a fast classifier (BERT-base detection or a regex pattern for Devanagari/Tamil/Bengali scripts) to identify language.
Confidence-based routing: If detected language is Indian + confidence > 80%, route to Sarvam. Otherwise fall back to Gemini 2.5 Flash (the global model with the best Indic support).
Hybrid fallback: For code-switched messages (Hindi + English in same message), test both Sarvam and Gemini on a sample of your real traffic. Pick the winner per use case.
Cost reality: Sarvam's pricing is competitive with Gemini Flash, so the quality upgrade is essentially free when serving Indic-language users.
For Indian B2B SaaS founders specifically, ignoring Sarvam in your routing strategy is leaving 20-40% conversion lift on the table when your customer base speaks regional languages. We covered this in more depth in our multi-agent AI cost analysis — model selection isn't the moat. Routing is.
Routing code: OpenRouter, LiteLLM & Portkey
Enough theory — here is the minimal, copy-pasteable version of each gateway. Model IDs are illustrative; swap in whatever your provider currently exposes.
1. OpenRouter (Python) — tiered routing with automatic fallback. One API key for 200+ models; the models array is tried in order if the first is unavailable.
from openai import OpenAI
client = OpenAI(base_url="https://openrouter.ai/api/v1",
api_key=OPENROUTER_API_KEY)
TIERS = {
"simple": "anthropic/claude-haiku-4.5",
"complex": "anthropic/claude-sonnet-4.6",
"hard": "anthropic/claude-opus-4.7",
}
def ask(user_msg, tier="simple"):
return client.chat.completions.create(
model=TIERS[tier],
messages=[{"role": "user", "content": user_msg}],
extra_body={"models": ["google/gemini-2.5-flash"]}, # auto-fallback
)
2. LiteLLM (YAML) — self-hosted proxy with cost tiers + fallback chains. Cheapest at scale; you own the infrastructure.
# config.yaml
model_list:
- model_name: fast
litellm_params: { model: anthropic/claude-haiku-4.5 }
- model_name: smart
litellm_params: { model: anthropic/claude-sonnet-4.6 }
- model_name: power
litellm_params: { model: anthropic/claude-opus-4.7 }
router_settings:
routing_strategy: latency-based-routing
fallbacks:
- { fast: ["smart"] }
- { smart: ["power"] }
num_retries: 2
3. Portkey (Python) — conditional routing on request metadata. The route lives in a Portkey config; metadata such as language or user tier decides the model (e.g. Hindi → Sarvam).
from portkey_ai import Portkey
portkey = Portkey(api_key=PORTKEY_API_KEY,
config="pc-router-xxxx") # conditions live in the config
resp = portkey.chat.completions.create(
messages=[{"role": "user", "content": user_msg}],
metadata={"user_tier": "free", "lang": "hi"}, # drives the route
)
Start with snippet 1 while you are under roughly $2K/month, then graduate to LiteLLM or Portkey as spend and control needs grow — the exact progression in the gateway table above.
How to Build a Routing Layer (Step by Step)
For early-stage founders shipping AI products, this is the minimal path from no routing to working routing in two weeks:
Week 1: Audit Current Usage
Log every request hitting your AI for one week: input length, output length, language, user tier, response time, cost
Categorize requests into buckets (simple Q&A, code, reasoning, regional language, etc.)
Identify what percentage of requests are "simple" vs "complex"
Calculate current cost per category
Week 2: Implement Rule-Based Routing
Pick an AI gateway based on your monthly spend (OpenRouter for <$2K, Portkey for $2-10K, LiteLLM for >$10K)
Define 4-6 rules based on your audit (e.g., "short queries → Haiku", "code in request → Sonnet", "Hindi script → Sarvam")
Implement fallback chains for each route (if model fails, try next)
Deploy to production with 10% traffic split, compare quality + cost vs baseline
Weeks 3-4: Evolve to Hybrid Routing
Identify request categories where rule-based routing fails (false positives, false negatives)
Add semantic routing for those categories (embedding-based matching)
Add semantic caching for repeated/similar queries (Portkey supports this natively)
Roll out to 100% of traffic once cost reduction is verified without quality regression
When You Should NOT Use Model Routing
Honest counter-argument. Three cases where routing isn't worth it:
You're below $500/month in AI spend. The engineering time to build routing exceeds the savings. Stay on a single model until volume justifies optimization.
Your traffic is highly homogeneous. If 99% of your requests are essentially the same complexity (e.g., a translation-only product), there's nothing meaningful to route. Pick the right single model and optimize prompts instead.
Your product is in early prototyping. Until you have product-market fit, premature routing is over-engineering. Use the best single model and ship.
The right time to invest in routing is when your AI bill becomes visible on your monthly burn rate — typically when you cross $1,000-$2,000/month and growing.
The Pattern That Scales
The routing architecture I implement most often for production AI products combines six elements:
Fast heuristics at the entry point (language detection, query classification)
Three-tier model stack (Fast / Smart / Power) with cost-optimized defaults
Semantic caching for repeated queries
Sarvam route for Indic-language users (where applicable)
Fallback chains so model outages don't break the product
Per-request cost tracking for ongoing optimization
This pattern consistently delivers 50-70% cost reduction vs. unrouted baselines, without measurable quality degradation. The engineering cost is roughly 2-3 weeks of focused work for an experienced engineer. Payback period at most production volumes: 30-60 days.
Closing
If you're paying more than $1,000/month for AI and you don't have a routing strategy, the highest-ROI engineering project on your roadmap is implementing one. The math is rarely close.
For the deeper companion piece on architecture decisions that compound over time, see Multi-Agent AI in 2026: Why It Costs 5-30x More and our coverage of Calm-Tech AI architecture principles.
If you're working through routing decisions and want a second opinion — fractional CTO work is something I do for founders shipping production AI products. Reach out on LinkedIn or contact us via Rian Infotech.
Further Reading
Frequently Asked Questions

Rishav Shankar
Rishav Shankar is a calm-tech architect who blends AI, engineering, and psychology to design systems that think before they act. He builds products that turn complex human problems into intuitive digital experiences, redefining how founders and teams operate. At the intersection of automation, strategy, and imagination, Rishav is creating the future one intelligent workflow at a time.
Comments
Loading...


