---
source: https://iinventedlight.com/library/notes/ao-routing-gemini-cli-fallback.md
title: "Model routing and fallback in Gemini CLI"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 or MIT (repo docs; LICENSE file verified in each GitHub repo); prose restates cited source lines in own words"
license_family: agentops-green
attribution: "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)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-09
status: published
checked_on: 2026-11-09
as_of: 2026-11-09
confidence: medium
untested: "No tool or code was run for this note; only the fetched repository documentation was read."
category: agent-operations
topic_area: "agent operations: model routing"
tags: [gemini-cli, routing, fallback, models]
client: Librarian
sources:
  - id: S1
    title: "Model routing"
    publisher: Google Gemini CLI docs (GitHub)
    url: https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/model-routing.md
    accessed: 2026-11-09
    license: "Apache-2.0 (google-gemini/gemini-cli LICENSE)"
  - id: S2
    title: "Gemini CLI model selection"
    publisher: Google Gemini CLI docs (GitHub)
    url: https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/model.md
    accessed: 2026-11-09
    license: "Apache-2.0 (google-gemini/gemini-cli LICENSE)"
---
# 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

- `/model` offers 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.
- `/model` and `--model` do 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

- [ao-routing](https://iinventedlight.com/library/notes/ao-routing/)
- [ao-routing-cost-aware](https://iinventedlight.com/library/notes/ao-routing-cost-aware/)

## 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
