Model routing
Declarative routing rules with transparent, per-response decisions — never a silent model swap.
Routing rules let you say what you want (lowest cost, lowest latency, a fallback chain) without hard-coding which model handles every request. Rules can match on cost, latency, or token count, or act purely as fallbacks.
Create a Routing Rule
- Go to Routing in the dashboard.
- Select New rule.
- Choose what the rule matches on: cost, latency, or token count.
- Order your candidate models — Relixr tries them in sequence, falling through to the next on failure.
- Select Save rule.
Every response — streaming or not — carries structured routing metadata, so you always know exactly which model answered and why.
When no rule matches, route.rule_id is "default" and selection_reason documents the fallback strategy that was used.
Set up a fallback chain, not just a single preferred model — pin your primary model, and list one or two cheaper or faster alternatives as fallbacks. If the primary provider has an outage or a spike in latency, your requests keep flowing instead of failing outright.