Routing Decision Flow
RoutingDecision
Every request produces aRoutingDecision:
Routing Strategies
Configurable per provider:| Strategy | Behavior |
|---|---|
session_affinity | Prefer endpoint with session cache (default) |
round_robin | Equal distribution across endpoints |
least_used | Route to endpoint with lowest utilization |
Error-Aware Routing
When a request fails on the selected endpoint:- Rate limit (429): Automatically retry on next available endpoint in the capacity pool
- Server error (5xx): Retry on a different provider if available
- Permanent error (4xx): Return error immediately (no retry)
overloaded (retryable) and invalid_api_key (permanent).