← All notes

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

  1. Failure: the currently selected model fails and the CLI starts the fallback process.
  2. Consent: depending on the policy, the CLI may prompt you to switch (by default it always prompts).
  3. 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

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

Sources

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

Permanent ID: iil:note:mgqbq2x8

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.},
}

Markdown

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.