fix(config): don't rewrite explicit gemini-2.5-flash model selection - #29217
fix(config): don't rewrite explicit gemini-2.5-flash model selection#29217TECHIE-TITAN wants to merge 1 commit into
Conversation
|
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. |
|
📊 PR Size: size/M
|
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses an issue where the Gemini CLI was incorrectly and silently rewriting explicitly requested model IDs (specifically Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses issue #29213 where explicitly requested concrete flash models (such as gemini-2.5-flash) were being unexpectedly resolved/upgraded to gemini-3.5-flash. This was fixed by removing the gemini-2.5-flash mapping from defaultModelConfigs.ts and removing the generic endsWith('flash') check in isFlashModel within models.ts. Unit tests have been added to verify that explicitly requested model IDs remain untouched. I have no feedback to provide as there are no review comments.
Summary
isFlashModel()used a broadmodel.endsWith('flash')match to decide whichmodels get auto-upgraded to
gemini-3.5-flashonce 3.5 Flash GA is active fora backend. That also matched the explicitly pinned
gemini-2.5-flash, so--model gemini-2.5-flashwas silently rewritten togemini-3.5-flashonbackends (e.g. Vertex AI) where GA is assumed but not actually available,
causing a
ModelNotFoundError.isFlashModel()to only match known flash aliases/pointers, notarbitrary pinned model IDs, and removed the equivalent auto-upgrade rule for
gemini-2.5-flashin the experimental dynamic model-config table.Fixes #29213
Test plan
vitest run src/config/models.test.ts src/config/config.test.ts src/services/modelConfigService.test.ts— 371 passednpm run lint --workspace @google/gemini-cli-core— cleannpm run typecheck --workspace @google/gemini-cli-core— clean