fix(core): ensure correct flash model steering in plan mode implementation phase#21871
fix(core): ensure correct flash model steering in plan mode implementation phase#21871
Conversation
…ation phase This fix addresses an issue where using the 'auto' model alias would steer to Gemini 2.5 Flash during the implementation phase, even when Gemini 3 models were preferred. - Updated isPreviewModel to include the generic 'auto' alias. - Refactored ApprovalModeStrategy to use resolveClassifierModel for consistent resolution that respects Gemini 3.1 launch status. - Added getUseCustomToolModel and getUseCustomToolModelSync to Config class to centralize custom model resolution logic based on auth type. - Consolidated duplicate custom model resolution logic in ClassifierStrategy, NumericalClassifierStrategy, and policyHelpers. - Added regression tests for the 'auto' alias and Gemini 3.1 routing in ApprovalModeStrategy.
|
Size Change: +870 B (0%) Total Size: 26.1 MB ℹ️ View Unchanged
|
|
/patch preview |
|
✅ Patch workflow(s) dispatched successfully! 📋 Details:
🔗 Track Progress: |
…ation phase (#21871) # Conflicts: # packages/core/src/availability/policyHelpers.ts
|
🚀 Patch PR Created! 📋 Patch Details:
📝 Next Steps:
🔗 Track Progress: |
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 a critical issue where the 'auto' model alias would incorrectly default to Gemini 2.5 Flash during the implementation phase, even when newer Gemini 3 models were available and preferred. The changes centralize and streamline the logic for model selection, ensuring that the system consistently steers to the appropriate Gemini 3.1 models based on configuration and authentication type, thereby improving the accuracy and efficiency of model usage. Highlights
Changelog
Activity
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 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 counter productive. 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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively addresses an issue with model steering in plan mode by ensuring the 'auto' model alias correctly resolves to Gemini 3 models when appropriate. The changes include a crucial update to isPreviewModel to recognize the 'auto' alias. More importantly, the PR introduces a significant refactoring by centralizing the logic for determining custom tool model usage into new methods within the Config class. This removes duplicated code from several routing strategies (ApprovalModeStrategy, ClassifierStrategy, NumericalClassifierStrategy) and helper files, replacing it with calls to the new centralized methods. This not only fixes the bug but also improves code maintainability and consistency. The addition of regression tests for the 'auto' alias and Gemini 3.1 routing further strengthens the changes. The implementation is clean and well-executed.
|
🚀 Patch Release Started! 📋 Release Details:
⏳ Status: The patch release is now running. You'll receive another update when it completes. 🔗 Track Progress: |
|
✅ Patch Release Complete! 📦 Release Details:
🎉 Status: Your patch has been successfully released and published to npm! 📝 What's Available:
🔗 Links: |
This fix addresses an issue where using the 'auto' model alias would steer to Gemini 2.5 Flash during the implementation phase, even when Gemini 3 models were preferred.
Closes #21868
Notice
Responding with gemini-3.1-pro-previewwhen in Plan mode andAuto (Gemini 3)model selection :Notice

Responding with gemini-3-flash-previewafter exiting Plan mode andAuto (Gemini 3)model selection :Session stats showing

gemini-3.1-pro-previewandgemini-3-flash-previewuse: