How do you configure OmniRoute for multi-provider failover? #139
|
I'd like to understand the best practices for setting up OmniRoute with multiple AI providers for automatic failover. Questions:
Any tips or examples from your setup would be greatly appreciated! 🚀 |
Replies: 4 comments 1 reply
|
here are some suggestions :D Health Checks: Latency Tips: Practical Advice: |
|
Great question — here's the OmniRoute-native way to set this up: 1. Combos = your failover configuration 2. Routing modes
3. How health detection works 4. Latency tips
The |
|
Closing this thread as stale due to inactivity. No maintainer follow-up happened after the last maintainer message for over 15 days. If this is still relevant, feel free to open a new discussion with updated logs/steps and I’ll pick it up with fresh context. |
|
Here's how we run multi-provider failover in production (290+ providers routed via OmniRoute): 1. Combo priority = failover order (exactly as Diego described)
2. Health checks are per-provider-account, not per-provider-type
3. Latency reduction tips that actually matter:
4. Our production combo config snippet: combos:
- name: "primary-reasoning"
strategy: "priority"
providers:
- name: "openai-gpt4o"
weight: 100
timeout_seconds: 15
- name: "anthropic-claude-3.5-sonnet"
weight: 80
timeout_seconds: 20
- name: "google-gemini-1.5-pro"
weight: 60
timeout_seconds: 15
health_check_interval_seconds: 30
max_retries: 1
stream: true5. Gotcha we hit: Free-tier providers (Groq, Together, OpenRouter free models) return 502/429 differently than paid — they often succeed on HTTP but return error in body. We added a response validator in our wrapper that treats Happy to share our full docker-compose + Traefik labels if useful — we run this behind Traefik with TLS termination and it's been stable for months. |
here are some suggestions :D
Priority Configuration:
List providers in your routing config by order (OpenAI first, then Anthropic, then Google). The router switches to the next if one fails.
Health Checks:
Automated checks (like ping or simple prompt) run every few seconds/minutes. If a provider doesn’t respond or errors, it’s temporarily skipped.
Latency Tips:
Cache health check results, keep connections warm, and avoid per-request checks. Only hit next provider if the first fails—don’t wait for long timeouts.
Practical Advice:
Monitor provider status, set reasonable failover thresholds, and observe usage/latency through metrics. Start with simple priority and only tweak as needed.