Routing rules
Tell Relay how to route each kind of request — by task, cost, latency, or region.
Cheap summaries
When task = summarization
groq/llama-4-scoutdeepseek/v4-pro
Goal: Lowest costMax cost: $0.002Max latency: 800msRegion: AUTO
Premium coding
When task = code
openai/gpt-6-solanthropic/claude-sonnet-5
Goal: Best qualityMax cost: $0.08Max latency: 2000msRegion: US
Long context docs
When context > 100K
google/gemini-3.1-proanthropic/claude-sonnet-5
Goal: BalancedMax cost: $0.05Max latency: 3000msRegion: AUTO
Fallback for OpenAI
When provider = openai AND error
anthropic/claude-sonnet-5google/gemini-3.1-pro
Goal: ReliabilityMax cost: $0.1Max latency: 3000msRegion: AUTO