Skip to main content

Overview

OpenModex’s intelligent routing engine automatically selects the optimal provider for each request. Instead of hardcoding a single provider, you can let OpenModex choose based on your priorities.

Routing Strategies

Cost Optimized

Route to the cheapest provider that can fulfill the request:

Latency Optimized

Route to the fastest available provider:

Quality Optimized

Route to the provider with the highest quality scores:

Server-Side Fallbacks

Define a fallback chain that executes automatically if the primary model fails:
If gpt-4o is unavailable (5xx or rate limited), OpenModex automatically tries claude-3.5-sonnet, then gemini-2.0-flash.

Allow Upgrade

Let OpenModex route to a more capable model when available at the same price tier:

Circuit Breaker

OpenModex monitors provider health in real-time. When a provider starts failing:
  1. Healthy — requests route normally
  2. Degraded — after consecutive failures, traffic is reduced
  3. Open — provider is temporarily removed from routing
  4. Recovery — periodic health checks restore the provider
This happens automatically — you don’t need to configure anything.

Check What Happened

Every response includes routing metadata: