Model Routing
You can give the platform several candidate models instead of one, and constrain which of them may be used. Candidates are validated and filtered before a generation run starts, so an impossible request fails immediately in the HTTP response rather than asynchronously, minutes later.
Set models for a fallback chain, and model_routing_filter to require capabilities —
a minimum context window, image input, a cost ceiling. Candidates that fail are dropped;
generation proceeds with whatever survives. If nothing survives, you get an error up
front.
Setting no filter is a valid choice and changes nothing about how a thread behaves.
Allowed models
Read this first: the platform accepts a curated allowlist, not the full OpenRouter catalog. Everything else on this page filters within this set.
| Model ID | Provider |
|---|---|
google/gemini-3.6-flash | |
google/gemini-3.5-flash | |
google/gemini-3.1-flash-lite | |
google/gemini-3.1-pro-preview | |
google/gemini-3-flash-preview | |
anthropic/claude-sonnet-5 | Anthropic |
anthropic/claude-sonnet-4.6 | Anthropic |
deepseek/deepseek-v4-flash | DeepSeek |
deepseek/deepseek-v4-pro | DeepSeek |
openrouter/auto | Router — picks a model for you |
Requesting anything else — in model or any entry of models — fails immediately:
{
"code": "MODEL_INVALID",
"message": "model \"openai/gpt-5\" is not allowed",
"reason": "MODEL_NOT_ALLOWED"
}
OpenRouter variant suffixes are fine — :nitro, :free, and :floor are stripped before
the check, so google/gemini-3.6-flash:nitro is allowed. Leaving model unset is also
fine; you get the platform default.
The same allowlist applies when storing a per-user default via
update-generation-config.
Where to next
| Page | Covers |
|---|---|
| Filtering | Where to set a filter, every field, and how they combine |
| Error Handling | The synchronous error shape and each error code |
| Examples | Long-context, cost-capped, and structured-output recipes |
Related
- Conversations — Thread lifecycle and generation config
- Configuration — The full generation config
- LLM API Reference — Full endpoint reference