Repository navigation
fix(core): preserve explicit versioned model IDs across resolutions - #29422
Pcmhacker-piro wants to merge 1 commit into
Conversation
|
📊 PR Size: size/M
|
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
c14ae8d to
54a7f92
Compare
54a7f92 to
d8723ba
Compare
|
Hi @google-gemini team, This PR addresses the issue identified in #29417 (and #29213) by ensuring explicit model IDs (such as Could you please review when you have a moment? Thank you! /gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the Gemini model resolution logic to ensure that the explicit gemini-3-pro-preview model is preserved and resolved to itself instead of being redirected when useGemini3_1 is active. Additionally, it simplifies the default model configurations by removing obsolete contexts for several Gemini models, updates the flash alias configuration, and adds unit tests to validate these changes. I have no feedback to provide as the changes are clean and well-tested.
|
Hi there! Thank you for your interest in contributing to Gemini CLI. To ensure we maintain high code quality and focus on our prioritized roadmap, we only guarantee review and consideration of pull requests for issues that are explicitly labeled as 'help wanted'. This PR will be closed in 7 days if it remains without that designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding. |
|
This pull request is being closed as it has been open for 14 days without a 'help wanted' designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding. |
Summary
Preserve explicit versioned model IDs (such as
gemini-3-pro-previewandgemini-2.5-flash) instead of silently remapping them during rollout promotions. This keeps--modelpinning accurate, fixes Vertex AI failures where 3.5 Flash is inaccessible, and extends the guarantees introduced in #29252.Details
PREVIEW_GEMINI_MODEL(gemini-3-pro-preview) from falling through into theuseGemini3_1promotion logic inpackages/core/src/config/models.ts. Promotions now strictly apply to alias models (auto,pro,auto-gemini-3).gemini-2.5-flash,gemini-3.5-flash, andgemini-3-pro-previewinpackages/core/src/config/defaultModelConfigs.ts.classifierIdResolutions.flashindefaultModelConfigs.tssorequestedModelsmatches beforeuseGemini3_5Flash.packages/core/src/config/models.test.tsverifying that explicit versioned models are preserved across all flag combinations.Related Issues
Fixes #29417
Fixes #29213
Related to #29252
Related to #28859
How to Validate
Run the focused core tests:
npm exec --workspace @google/gemini-cli-core -- vitest run src/config/models.test.ts --coverage.enabled=falseExpected: Tests pass verifying that explicit
gemini-3-pro-previewandgemini-2.5-flashremain unchanged while aliases likeflashandpropromote appropriately.Verify dynamic and legacy resolution:
resolveModel('gemini-3-pro-preview', true)returns'gemini-3-pro-preview'.resolveModel('gemini-2.5-flash', false, false, true, config, true)returns'gemini-2.5-flash'.resolveModel('flash', false, false, true, config, true)returns'gemini-3.5-flash'.resolveModel('pro', true, false, true, config, false)returns'gemini-3.1-pro-preview'.Pre-Merge Checklist
--modeltakes precedence)