Model routing and fallback in Gemini CLI
Answer: Gemini CLI routing automatically switches to a fallback model when the selected model fails (for example quota or server errors). This feature is enabled by default. By default, the CLI always prompts you before it will switch to a fallback model.
How fallback works
- Failure: the currently selected model fails and the CLI starts the fallback process.
- Consent: depending on the policy, the CLI may prompt you to switch (by default it always prompts).
- Switch: the fallback model is used for the current turn or the rest of the session.
Some internal utility calls use a silent fallback chain without prompting or changing the configured model.
Choosing models
/modeloffers Auto (the system chooses the best model for your task) or Manual.- Pro models suit complex tasks and reasoning; Flash models suit high speed results.
/modeland--modeldo not override the model used by sub-agents, so usage reports may show other models.
Local routing (experimental)
A locally-running Gemma model can make routing decisions instead of a hosted model, which can help reduce costs.
See also
Claims
- id: C1 claim: Routing switches to a fallback on failure. source: S1 evidence: "automatically switches to a fallback model in case of a model failure."
- id: C2 claim: By default the CLI prompts before switching. source: S1 evidence: "may prompt you to switch to a fallback model (by default always prompts you)."
- id: C3 claim: A local Gemma model can make routing decisions. source: S1 evidence: "will use a locally-running Gemma model to make routing decisions"
- id: C4 claim: Pro suits complex reasoning; Flash suits speed. source: S2 evidence: "Use Pro models for complex tasks and reasoning, Flash models for high speed results"
- id: C5 claim: Auto picks the best model for the task. source: S2 evidence: "Let the system choose the best Gemini 3 model for your task."
Sources
- [S1] Model routing. Google Gemini CLI docs (GitHub). https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/model-routing.md . License: Apache-2.0 (google-gemini/gemini-cli LICENSE). Accessed 2026-11-09.
- [S2] Gemini CLI model selection. Google Gemini CLI docs (GitHub). https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/model.md . License: Apache-2.0 (google-gemini/gemini-cli LICENSE). Accessed 2026-11-09.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: GitHub repository docs under Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0) or MIT License (https://opensource.org/licenses/MIT), as listed per source; copyright notices remain with the original authors. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Google Gemini CLI docs (GitHub), Model routing, Apache-2.0 (google-gemini/gemini-cli LICENSE); Google Gemini CLI docs (GitHub), Gemini CLI model selection, Apache-2.0 (google-gemini/gemini-cli LICENSE).
Cite this
iinventedlight. 2026. "Model routing and fallback in Gemini CLI." iinventedlight Library, iil:note:mgqbq2x8, version of 2026-11-09. https://iinventedlight.com/library/notes/ao-routing-gemini-cli-fallback/. License: CC-BY-4.0.
@misc{iil_note_mgqbq2x8,
author = {{iinventedlight}},
title = {{Model routing and fallback in Gemini CLI}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-09},
url = {https://iinventedlight.com/library/notes/ao-routing-gemini-cli-fallback/},
note = {Permanent ID iil:note:mgqbq2x8. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/ao-routing-gemini-cli-fallback.md.