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 modelRoutingFilter 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.
Gemini — the whole family
Any google/gemini-* model is accepted. You don't need to wait for a specific version to
be added here: we serve Gemini on Vertex AI, so a model released after this page was
written works the moment Google ships it.
| Model ID | Notes |
|---|---|
google/gemini-3.6-flash | Current flash generation |
google/gemini-3.5-flash | Previous flash generation |
google/gemini-3.1-flash-lite | Smallest and cheapest |
google/gemini-3.1-pro-preview | Pro tier, reasoning-capable |
google/gemini-3-flash-preview | Preview build |
These are examples, not the limit — any other Gemini ID is accepted too.
One exception: Gemini 2.x is not accepted. google/gemini-2.5-flash,
google/gemini-2.0-flash, and every other google/gemini-2* ID is rejected, because
Gemini 2 is deprecated on Vertex AI. Use a Gemini 3 model instead.
The prefix covers Gemini only — other Google models such as google/gemma-* are not
accepted.
Other providers
These are matched exactly, so this list is the complete set:
| Model ID | Provider |
|---|---|
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