OmniRoute Route Planning Features: 14 Strategies for Intelligent LLM Routing
OmniRoute is a unified AI proxy that automatically plans the optimal route for LLM requests across 250+ providers using 14 built-in routing strategies, zero-config auto-combo scoring, and intelligent fallback chains.
OmniRoute delivers intelligent route planning for LLM requests through a unified AI proxy that abstracts away provider complexity. Located in the diegosouzapw/OmniRoute repository, the platform serves as a fault-tolerant, cost-aware routing layer that dynamically selects the best path for every request. These OmniRoute route planning features enable developers to send a single request while the engine handles provider selection, load balancing, and automatic failover behind the scenes.
The Combo Routing Engine
The combo routing system is the core abstraction in OmniRoute. It allows you to define a group of providers and models under a single combo name (e.g., my-combo), then dispatch requests to that combo rather than individual endpoints.
In open-sse/services/combo.ts, the handleComboChat() function processes incoming requests by expanding the combo reference into an ordered list of targets. The resolveComboTargets() helper then resolves this list based on the combo's configured strategy and current system state. This architecture decouples your application code from provider-specific endpoints, allowing the routing engine to make real-time decisions about which model actually processes the request.
14 Built-in Routing Strategies
OmniRoute implements 14 distinct routing strategies defined in the ROUTING_STRATEGY_VALUES enum located in src/shared/constants/routingStrategies.ts. These strategies range from simple load distribution to sophisticated, ML-aware selection:
- Priority – Routes to the first available target in a ranked list.
- Weighted – Distributes traffic according to configured weight percentages.
- Round-robin – Cycles through targets evenly.
- P2C – Power of Two Choices selection for better load distribution.
- Least-used – Selects the target with the lowest current utilization.
- Reset-aware – Considers provider rate-limit reset windows.
- Cost-optimized – Minimizes request cost based on live pricing data.
- Auto-combo – Zero-config automatic selection based on fitness scores.
- LKG-P – Last Known Good Provider preference for session continuity.
- Context-optimized – Routes based on context window requirements.
- Context-relay – Specialized handling for multi-turn context preservation.
- Headroom – Monitors capacity headroom to prevent overload.
- Fusion – Aggregates responses from multiple providers.
- Quota-share – Internal mode respecting per-account quota limits.
Auto-Combo and Zero-Config Intelligence
The auto-combo feature eliminates manual configuration by automatically selecting the best model on-the-fly. This system lives in open-sse/services/autoCombo/builtinCatalog.ts and the scoring logic within open-sse/services/combo.ts.
Auto-combo evaluates live cost, latency, and arena-ELO scores to determine the optimal provider for each request. You can define cost-optimized tiers using strategies like auto/cheap, allowing the engine to dynamically route to the most economical option that meets your quality threshold without hardcoding specific models.
Intent Classification and Task-Aware Routing
OmniRoute employs dynamic intent classification to route requests based on their content type. The open-sse/services/intentClassifier.ts module detects whether a request involves chat, embeddings, image generation, or code assistance, then steers traffic to specialized providers (e.g., Cursor for code, Gemini for vision).
For long-running operations, the task-aware router in open-sse/services/taskAwareRouter.ts identifies batch or sustained workloads and routes them to providers optimized for such tasks, such as Ollama or vLLM instances, ensuring appropriate resource allocation.
Resilience Patterns and Observability
Fault tolerance is built into every route decision through fallback chains implemented in open-sse/services/combo.ts. If a target fails, the engine automatically tries the next option in the resolved list, applying exponential back-off and respecting circuit-breaker state managed in src/lib/db/combos.ts.
The system also considers quota-share and headroom saturation when selecting targets, preventing account overload via logic in src/lib/db/quotaSnapshots.ts. For compliance requirements, optional IP-filter and geo-routing rules in open-sse/services/ipFilter.ts steer traffic to specific regions or datacenters.
Every routing decision is logged for auditability. The open-sse/services/routingLogger.ts captures latency, cost, and error rates, while the smart-routing A2A skill in src/lib/a2a/skills/smartRouting.ts returns human-readable explanations of why specific routes were chosen.
Management Interfaces (CLI and MCP)
You can define and test combos through command-line tools documented in skills/cli-routing/SKILL.md or via the Model Context Protocol (MCP) server described in open-sse/mcp-server/README.md. These interfaces allow you to create, list, update, and simulate routing decisions without writing code.
// Example: Creating a combo with cost-optimized auto-routing
await db.combos.create({
id: "fast-cheap-combo",
description: "Fast, low-cost routing for chat",
strategy: "auto/cheap",
targets: [
{ providerId: "openai", model: "gpt-4o-mini" },
{ providerId: "anthropic", model: "claude-3.5-sonnet" },
{ providerId: "groq", model: "mixtral-8x7b" }
]
});
# CLI: Send a request via the combo
omniroute chat \
--model fast-cheap-combo \
--prompt "Explain the difference between REST and GraphQL."
// A2A skill: Get routing explanation
const result = await a2aCall("message/send", {
skill: "smart-routing",
messages: [{ role: "user", content: "Which model will answer my query?" }]
});
console.log(result.metadata.routing_explanation);
// → "Selected groq-mixtral-8x7b via provider \"groq\" (latency: 820 ms, cost: $0.0012)"
Summary
- OmniRoute provides unified route planning across 250+ LLM providers through the combo abstraction in
open-sse/services/combo.ts. - 14 routing strategies support everything from simple priority lists to ML-driven auto-combo selection based on real-time cost and latency data.
- Intent classification and task-aware routing automatically match request types to specialized providers.
- Fallback chains, circuit breakers, and quota-aware selection ensure resilience under load.
- CLI and MCP interfaces allow full lifecycle management of routing configurations without application redeployment.
Frequently Asked Questions
How does OmniRoute handle provider failures?
OmniRoute implements automatic fallback chains in open-sse/services/combo.ts. When a provider fails, the engine immediately attempts the next target in the resolved combo list while applying exponential back-off and respecting circuit-breaker states defined in src/lib/db/combos.ts. This ensures high availability without manual intervention.
What is the difference between combo routing and auto-combo?
Combo routing refers to the general architecture where you define a named group of providers (a combo) that the system treats as a single endpoint. Auto-combo is a specific routing strategy within that system that requires zero configuration—it automatically selects the best provider from your catalog based on live scoring of cost, latency, and quality metrics from open-sse/services/autoCombo/builtinCatalog.ts.
How does intent classification improve routing decisions?
The open-sse/services/intentClassifier.ts module analyzes request content to determine if it involves chat, embeddings, image generation, or code completion. This allows OmniRoute to send vision tasks to providers like Gemini, code assistance to Cursor, and general chat to other optimized endpoints, ensuring each request reaches the most capable model for its specific task type.
Can I use OmniRoute route planning features with my own infrastructure?
Yes. OmniRoute supports routing to self-hosted providers such as Ollama and vLLM through the task-aware router in open-sse/services/taskAwareRouter.ts. You can define custom combos targeting your internal endpoints alongside commercial providers, and the same routing strategies, fallback logic, and quota management apply uniformly to all targets.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →