Commit Graph

26 Commits

Author SHA1 Message Date
gemini-cli[bot] f146618b6b fix(core): route personal OAuth users to stable models for auto aliases
This PR implements auth-aware model routing to prevent 404/400 errors for users using personal OAuth (`oauth-personal`).

### Problem
When using the `auto-gemini-3` model alias with personal OAuth, the CLI occasionally resolves it to `gemini-3-pro-preview`. However, many personal accounts do not have access to this specific preview model, leading to API errors (404/400). Currently, the CLI only falls back to stable models if the user has NO access to ANY preview models, which is too broad if they have access to older preview models but not the latest ones.

### Solution
- Added `authType` to the `ModelResolutionContext` and `ModelCapabilityContext`.
- Updated `ModelConfigService` to support conditions based on `authType`.
- Modified `DEFAULT_MODEL_CONFIGS` and `settings.schema.json` to explicitly route `oauth-personal` users to stable models (e.g., `gemini-2.5-pro`) for `auto` and `pro` aliases.
- Updated `resolveModel` to pass the current `authType` to the resolution engine.

These changes ensure that personal OAuth users always get a working stable model by default, while API key and Vertex AI users can still access the latest previews.

Fixes: #26857

cc @NTaylorMullen
2026-05-15 21:42:45 +00:00
Anish Sabharwal b36788eb2a fix(core): add aliases and thinking config for gemini-3.1 models (#27007) 2026-05-15 16:29:15 +00:00
David Pierce 749657cbf9 feat(cli): merge Auto modes into a single Auto mode (#26714) 2026-05-13 16:55:43 +00:00
joshualitt 8a3fde4c33 fix(context): Change snapshotter model config. (#26745) 2026-05-11 15:06:55 +00:00
Adam Weidman 3aedbbc067 fix(core): distinguish fallback chains and fix maxAttempts for auto vs explicit model selection (#26163) 2026-04-29 20:23:37 +00:00
David Pierce 54b7586106 Update policy so transient errors are not marked terminal (#26066) 2026-04-28 16:01:27 +00:00
Abhijit Balaji d4c5333dcf feat(core,cli): add support for Gemma 4 models (experimental) (#25604) 2026-04-23 23:02:17 +00:00
joshualitt 320c8aba4c feat(core): Land AgentHistoryProvider. (#23978) 2026-03-27 19:22:35 +00:00
christine betts 3ada29fb51 feat(core,ui): Add experiment-gated support for gemini flash 3.1 lite (#23794) 2026-03-25 20:28:49 +00:00
kevinjwang1 d78f54a08a Fix dynamic model routing for gemini 3.1 pro to customtools model (#23641)
Co-authored-by: Sehoon Shon <sshon@google.com>
2026-03-25 03:16:44 +00:00
kevinjwang1 06a7873c51 Add ModelChain support to ModelConfigService and make ModelDialog dynamic (#22914) 2026-03-19 22:22:26 +00:00
kevinjwang1 27a50191e3 Add support for dynamic model Resolution to ModelConfigService (#22578) 2026-03-17 21:15:50 +00:00
kevinjwang1 0bf7ea60c5 Add ModelDefinitions to ModelConfigService (#22302) 2026-03-14 21:45:21 +00:00
joshualitt 55c628e967 feat(core): experimental in-progress steering hints (1 of 3) (#19008) 2026-02-17 22:59:33 +00:00
Sandy Tao bfa791e13d feat(core): update internal utility models to Gemini 3 (#18773) 2026-02-11 20:20:14 +00:00
Tommaso Sciortino bf90b59935 feat: launch Gemini 3 Flash in Gemini CLI ️ (#15196)
Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
Co-authored-by: joshualitt <joshualitt@google.com>
Co-authored-by: Sehoon Shon <sshon@google.com>
Co-authored-by: Adam Weidman <65992621+adamfweidman@users.noreply.github.com>
Co-authored-by: Adib234 <30782825+Adib234@users.noreply.github.com>
Co-authored-by: Jenna Inouye <jinouye@google.com>
2025-12-17 09:43:21 -08:00
joshualitt c8b688655c feat(core): Plumbing for late resolution of model configs. (#14597) 2025-12-10 17:36:27 +00:00
joshualitt ba0e053ffc bug(core): Add default chat compression config. (#13766) 2025-11-24 23:02:00 +00:00
joshualitt e50bf6adad feat(core): Migrate chatCompressionService to model configs. (#12863) 2025-11-24 20:24:45 +00:00
joshualitt 8e531dc029 feat(core): Incorporate Gemini 3 into model config hierarchy. (#13447) 2025-11-20 21:07:14 +00:00
joshualitt 257cd07a3a feat(core): Wire up chat code path for model configs. (#12850) 2025-11-20 04:41:16 +00:00
anthony bushong 2987b473dd feat(core): set default chat base model configs (#12951) 2025-11-13 01:01:31 +00:00
Sandy Tao 408b885689 feat(core): enhance loop detection with 2-stage check (#12902) 2025-11-12 04:49:00 +00:00
joshualitt a4415f15d3 feat(core): Migrate generateContent to model configs. (#12834) 2025-11-11 16:10:50 +00:00
joshualitt fdb6088603 feat(core): Migrate generateJson to resolved model configs. (#12626) 2025-11-07 22:18:45 +00:00
joshualitt 956ab94452 feat(core): Add ModelConfigService. (#12556) 2025-11-06 01:18:42 +00:00