Routing rules

Tell Relay how to route each kind of request — by task, cost, latency, or region.

Cheap summaries
When task = summarization
groq/llama-3.3-70bdeepseek/reasoner
Goal: Lowest costMax cost: $0.002Max latency: 800msRegion: AUTO
Premium coding
When task = code
openai/gpt-4.1anthropic/claude-sonnet
Goal: Best qualityMax cost: $0.08Max latency: 2000msRegion: US
Long context docs
When context > 100K
google/gemini-2.5-proanthropic/claude-sonnet
Goal: BalancedMax cost: $0.05Max latency: 3000msRegion: AUTO
Fallback for OpenAI
When provider = openai AND error
anthropic/claude-sonnetgoogle/gemini-2.5-pro
Goal: ReliabilityMax cost: $0.1Max latency: 3000msRegion: AUTO