Skip to main content

Scenario Routing

Automatically route requests to different providers based on request characteristics.

Supported Scenarios

ScenarioDescription
thinkThinking mode enabled
imageContains image content
longContextContent exceeds threshold
webSearchUses web_search tool
backgroundUses Haiku model

Fallback Mechanism

If all providers for a scenario fail, it automatically falls back to the profile's default providers.

Configuration Example

{
"profiles": {
"smart": {
"providers": ["main-api"],
"long_context_threshold": 60000,
"routing": {
"think": {
"providers": [{"name": "thinking-api", "model": "claude-opus-4-5"}]
},
"longContext": {
"providers": [{"name": "long-context-api"}]
}
}
}
}
}