Routing strategies
You can control how Inferoute selects a provider by specifying a routing strategy. Each strategy optimizes for a different dimension of performance.- Latency-optimized
- Cost-optimized
- Availability
- Round-robin
Inferoute routes to the provider with the lowest measured response time for the requested model at the moment of the call. This is the best choice for interactive applications where response speed is critical.
If you do not specify
X-Inferoute-Strategy, Inferoute uses the balanced strategy by default. Balanced weighs latency, cost, and availability together to make a reasonable choice for most workloads.Specifying routing preferences
You have two ways to communicate your routing preference to Inferoute.Via the model parameter
You can embed the strategy directly in the model name using a routing suffix. This works with any OpenAI-compatible client without modifying headers.:latency, :cost, :availability, :round-robin.
Via the X-Inferoute-Strategy header
Pass the strategy as a custom request header. This keeps your model names clean and lets you change strategy at the request level without altering model identifiers.Fallback behavior
Inferoute automatically retries failed requests on alternative providers. If the primary provider returns an error or times out, Inferoute selects the next best option according to your strategy and retries the request — without any additional code on your side. Fallback behavior covers:- Provider-side 5xx errors
- Request timeouts
- Rate limit responses (429s) when no retry window is available