Commit Graph

17 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
David Pierce 749657cbf9 feat(cli): merge Auto modes into a single Auto mode (#26714) 2026-05-13 16:55:43 +00:00
Sri Pasumarthi 6b303a13eb fix(acp) refactor(core,cli): centralize model discovery logic in ModelConfigService (#24392) 2026-04-01 18:03:30 +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 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
Sandy Tao e844a57bfc feat(core): fallback to chat-base when using unrecognized models for chat (#19016) 2026-02-13 19:00:08 +00:00
Christian Gunderman fd65416a2f Disallow unsafe type assertions (#18688) 2026-02-10 00:10:15 +00:00
joshualitt 92e31e3c4a feat(core, cli): Add support for agents in settings.json. (#16433) 2026-01-13 20:16:02 +00:00
joshualitt eb75f59a96 bug(core): fix issue with overrides to bases. (#15255) 2026-01-08 14:59:58 +00:00
joshualitt a1dd19738e feat(core): Preliminary changes for subagent model routing. (#16035) 2026-01-07 21:21:10 +00:00
Christian Gunderman 942bcfc61e Disallow redundant typecasts. (#15030) 2025-12-13 01:43:43 +00:00
joshualitt c8b688655c feat(core): Plumbing for late resolution of model configs. (#14597) 2025-12-10 17:36:27 +00:00
joshualitt 42c2e1b217 feat(core): Add support for custom aliases for model configs. (#13546) 2025-11-22 00:13:10 +00:00
joshualitt 257cd07a3a feat(core): Wire up chat code path for model configs. (#12850) 2025-11-20 04:41:16 +00:00
joshualitt 956ab94452 feat(core): Add ModelConfigService. (#12556) 2025-11-06 01:18:42 +00:00