Files
gemini-cli/packages
gemini-cli[bot] d744945ff4 fix(core): add gemini-2.5-flash-lite to default fallback policy chain
This PR adds `gemini-2.5-flash-lite` to the default model policy chain as the final fallback model.

Previously, the chain stopped at `gemini-2.5-flash`, which meant that free-tier users who exhausted their Pro and Flash quotas would see a `QUOTA_EXHAUSTED` error even if they had remaining capacity on Flash-Lite (which has a much higher daily quota).

Changes:
- Updated `getModelPolicyChain` in `packages/core/src/availability/policyCatalog.ts` to include `DEFAULT_GEMINI_FLASH_LITE_MODEL` as the `isLastResort` policy.
- Updated the previous last resort (`DEFAULT_GEMINI_FLASH_MODEL`) to no longer be marked as such.
- Updated unit tests in `packages/core/src/availability/policyCatalog.test.ts` to verify the new chain order and length.

Fixes: #26841

cc @adamfweidman
2026-05-18 22:39:52 +00:00
..