OmniRoute Routing Strategies: Complete List of 17+ Dispatch Methods Explained

OmniRoute supports 17 public routing strategies—including priority, weighted, round-robin, p2c, auto, and fusion—plus an internal quota-share scheduler, all defined in src/shared/constants/routingStrategies.ts and documented in open-sse/services/AGENTS.md.

OmniRoute is an open-source intelligent routing engine designed to distribute AI inference requests across multiple providers. The library implements diverse dispatch algorithms that balance cost, latency, and reliability, giving developers granular control over how prompts reach backend models.

Complete List of OmniRoute Routing Strategies

The canonical enumeration of routing strategies resides in src/shared/constants/routingStrategies.ts. According to the source code, the ROUTING_STRATEGY_VALUES array exports 17 public strategies available via the REST API and MCP tools.

Public Routing Strategies

These strategies are accessible when configuring combos through the /api/combos endpoint or the omniroute_set_routing_strategy tool:

  • priority — Selects the first available provider in a tier-ordered list; this is the default fallback behavior.
  • weighted — Chooses providers proportionally based on assigned weight profiles defined in the combo configuration.
  • fill-first — Sends traffic to the highest-capacity provider until its quota is exhausted, then cascades to the next tier.
  • round-robin — Cycles through healthy providers in a fixed sequential order, allocating one request per provider before repeating.
  • p2c (Power-of-Two-Choices) — Randomly selects two candidate providers and routes to the one with lower concurrent load.
  • random — Selects a provider using uniform random distribution across all healthy endpoints.
  • least-used — Routes to the provider that has processed the fewest requests in the current time window.
  • reset-aware — Prefers providers that have recently recovered from circuit-breaker resets, avoiding cold providers.
  • reset-window — Grants a short-lived capacity boost to providers that just reopened after a cooldown period.
  • cost-optimized — Orders candidates by cost-per-token, selecting the cheapest viable provider first.
  • strict-random — Random selection that enforces no reuse of the same provider within a single request batch.
  • auto — Evaluates a 15-factor scoring model (quota, health, latency, cost, task fit) to dynamically select the optimal candidate.
  • lkgp (Least-Known-Good-Providers) — Uses historical success rates to avoid providers with recent failure patterns.
  • context-optimized — Prioritizes providers capable of handling the specific token context length of the request.
  • context-relay — Chains multiple providers sequentially, passing partially-generated context forward through the pipeline.
  • headroom — Selects the provider with the most remaining capacity (tokens per second) to prevent saturation.
  • fusion — Fans out the prompt to a panel of providers in parallel, then uses a judge model to synthesize a single coherent answer.

Internal Strategies

In addition to the public list, the source code implements one internal-only scheduler:

  • quota-share — A Deficit Round-Robin (DRR) scheduler used for internal quota management; this strategy is not exposed in public APIs and is handled automatically by the quota subsystem.

How Routing Strategies Work in the Source Code

In src/shared/constants/routingStrategies.ts, strategies are defined as string literals within the ROUTING_STRATEGY_VALUES readonly array. When a combo is initialized, open-sse/services/combo/comboSetup.ts validates the requested strategy against this array to ensure type safety before dispatch.

The auto strategy implementation is particularly complex, drawing from 15 weighted factors including quota, health, costInv (inverse cost), latencyInv (inverse latency), and taskFit to generate a composite score for each provider.

Configuring Routing Strategies in Practice

You can specify a routing strategy when creating a combo or update it dynamically at runtime.

Create a Combo with a Specific Strategy

// POST /api/combos
{
  "id": "production-combo",
  "name": "Production GPT-4",
  "strategy": "weighted",
  "models": [
    { "model": "openai/gpt-4o", "weight": 0.7 },
    { "model": "anthropic/claude-3-5-sonnet", "weight": 0.3 }
  ]
}

Update Strategy at Runtime via MCP

// Using the omniroute_set_routing_strategy tool
await omniroute_set_routing_strategy({
  comboId: "production-combo",
  strategy: "least-used"
});

Configure the Auto Strategy with Custom Weights

// POST /api/combos
{
  "id": "auto-optimized",
  "name": "Auto Combo",
  "strategy": "auto",
  "config": {
    "auto": {
      "candidatePool": ["openai", "anthropic", "google"],
      "weights": {
        "quota": 0.2,
        "health": 0.3,
        "costInv": 0.1,
        "latencyInv": 0.3,
        "taskFit": 0.1
      }
    }
  }
}

Summary

  • OmniRoute defines 17 public routing strategies in src/shared/constants/routingStrategies.ts, ranging from simple algorithms like random and round-robin to intelligent dispatchers like auto and fusion.
  • The auto strategy uses 15-factor composite scoring to optimize for cost, latency, and reliability simultaneously.
  • An internal quota-share strategy implements Deficit Round-Robin scheduling for quota management but remains private to the API.
  • Strategy configuration occurs via the combo creation endpoint or the omniroute_set_routing_strategy MCP tool.
  • Human-readable documentation is maintained in open-sse/services/AGENTS.md and detailed auto-strategy scoring is documented in docs/routing/AUTO-COMBO.md.

Frequently Asked Questions

How many routing strategies does OmniRoute support?

OmniRoute exposes 17 public routing strategies through its REST API and MCP interface, plus one internal quota-share strategy used for quota management. The complete list is enumerated in src/shared/constants/routingStrategies.ts.

What is the difference between auto and priority routing strategies?

The priority strategy statically selects the first available provider in a pre-defined tier order, making it predictable but insensitive to real-time conditions. The auto strategy dynamically evaluates 15 factors—including quota availability, health status, latency, and cost—to calculate a composite score and select the optimal provider for each individual request.

Can I combine multiple routing strategies in a single combo?

Each combo configuration accepts exactly one strategy field. However, you can achieve hybrid behavior by creating multiple combos with different strategies and orchestrating traffic between them using higher-level routing rules, or by using the fusion strategy which inherently parallelizes across multiple providers.

Where are the routing strategies documented in the repository?

The canonical type definitions live in src/shared/constants/routingStrategies.ts. High-level overviews appear in open-sse/services/AGENTS.md, while the complex scoring algorithm behind the auto strategy is detailed in docs/routing/AUTO-COMBO.md. The validation and setup logic resides in open-sse/services/combo/comboSetup.ts.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →