gemini-cli - 💡(How to fix) Fix Default fallback policy chain missing gemini-2.5-flash-lite — users lose 1,000 RPD of available capacity [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#26841Fetched 2026-05-11 03:26:57
View on GitHub
Comments
1
Participants
2
Timeline
11
Reactions
0
Timeline (top)
labeled ×7added_to_project_v2 ×1commented ×1issue_type_added ×1

The default fallback policy chain includes only gemini-2.5-progemini-2.5-flash. The gemini-2.5-flash-lite model is missing entirely. When both Pro and Flash quotas are exhausted, the CLI fails hard—even though Flash-Lite has 10x Pro's daily quota and is the intended last-resort model for free-tier users.

Error Message

  1. Observe: QUOTA_EXHAUSTED error, exit code 1. No fallback to Flash-Lite.

Root Cause

Root Cause Analysis

Code Example

definePolicy({ model: DEFAULT_GEMINI_MODEL }),
definePolicy({ model: DEFAULT_GEMINI_FLASH_MODEL, isLastResort: true })

---

definePolicy({ model: DEFAULT_GEMINI_MODEL }),
definePolicy({ model: DEFAULT_GEMINI_FLASH_MODEL }),
definePolicy({ model: DEFAULT_GEMINI_FLASH_LITE_MODEL, isLastResort: true })
RAW_BUFFERClick to expand / collapse

Summary

The default fallback policy chain includes only gemini-2.5-progemini-2.5-flash. The gemini-2.5-flash-lite model is missing entirely. When both Pro and Flash quotas are exhausted, the CLI fails hard—even though Flash-Lite has 10x Pro's daily quota and is the intended last-resort model for free-tier users.

Environment

  • OS: Windows 11 Pro (10.0.26200)
  • Node.js: v22.19.0
  • gemini-cli: 0.41.2
  • Auth: Google OAuth (gemini login) — AuthType.USE_GEMINI (free tier)

Root Cause Analysis

1. Incomplete Policy Chain

The default fallback chain is defined in chunk-6DSAZLFF.js (~line 270025) as:

definePolicy({ model: DEFAULT_GEMINI_MODEL }),
definePolicy({ model: DEFAULT_GEMINI_FLASH_MODEL, isLastResort: true })

The DEFAULT_GEMINI_FLASH_LITE_MODEL (gemini-2.5-flash-lite) is not present in the chain.

2. Quota Impact

ModelRPD (Free Tier)In Fallback Chain
gemini-2.5-pro100
gemini-2.5-flash250
gemini-2.5-flash-lite1,000Missing

When Pro (100) + Flash (250) are exhausted, the CLI fails despite 1,000 Flash-Lite requests remaining. The tool appears "broken" to the user when ~74% of their daily capacity is actually untouched.

Steps to Reproduce

  1. Auth: Log in via gemini login.
  2. Exhaust Quota: Exhaust RPD limits on both gemini-2.5-pro and gemini-2.5-flash.
  3. Execute: Run gemini -y -p "hello"
  4. Observe: QUOTA_EXHAUSTED error, exit code 1. No fallback to Flash-Lite.
  5. Verify: Run gemini -y --model gemini-2.5-flash-lite -p "hello". This succeeds, proving Flash-Lite quota was available.

Expected Behaviour

The fallback chain should be: gemini-2.5-progemini-2.5-flashgemini-2.5-flash-lite.

Actual Behaviour

The chain stops at Flash. The CLI exits with QUOTA_EXHAUSTED despite 1,000 Flash-Lite RPD remaining.

Suggested Fix

Update the policy chain to include the Flash-Lite model as the final resort:

definePolicy({ model: DEFAULT_GEMINI_MODEL }),
definePolicy({ model: DEFAULT_GEMINI_FLASH_MODEL }),
definePolicy({ model: DEFAULT_GEMINI_FLASH_LITE_MODEL, isLastResort: true })

Model IDs confirmed working via --model flag:

  • gemini-2.5-pro
  • gemini-2.5-flash
  • gemini-2.5-flash-lite

Note: This issue compounds with a related bug (reported separately) where QUOTA_EXHAUSTED does not trigger fallback in headless -p mode at all. Together, these bugs effectively block free-tier users from CLI access prematurely.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING