feat(cli): Enable model router by default and add to settings dialog#9262
feat(cli): Enable model router by default and add to settings dialog#9262abhipatel12 merged 2 commits intomainfrom
Conversation
Summary of ChangesHello @abhipatel12, 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 significantly enhances the user experience by making the Model Router feature active by default and providing a convenient, in-app toggle within the 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 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
|
|
Size Change: -5 B (0%) Total Size: 17.4 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request correctly enables the model router by default and exposes the setting in the settings dialog, which is a great user experience improvement. The changes in the settings schema and related tests are all aligned with this goal. I've found one potential logic issue in how the useModelRouter flag is determined, which could lead to an inconsistent state being passed to the core configuration. My review includes a suggestion to address this.
|
/patch preview |
|
✅ Patch workflow(s) dispatched successfully! 📋 Details:
🔗 Track Progress: |
|
❌ Patch creation failed! There was an error creating the patch release. 🔍 Troubleshooting:
🔗 Links: |
… add to settings dialog (google-gemini#9262)
TLDR
This PR enables the Model Router feature by default and adds a toggle for it within the
/settingsdialog. This improves user experience by making it easier for users to opt-out of model routing without needing to manually edit theirsettings.jsonfile.Key changes for reviewers:
packages/cli/src/config/settingsSchema.ts: ThedefaultforuseModelRouteris nowtrueandshowInDialogis set totrue.packages/cli/src/config/config.ts: The hardcoded fallback foruseModelRouterhas been updated totrueto ensure backward compatibility for users without this setting in their config.settingsSchema.test.ts,config.test.ts, andSettingsDialog.test.tsxhave been updated to reflect the new default behavior.Ex of Setting:
Dive Deeper
As we move towards making model routing the default behavior, we need to provide users with a straightforward way to disable it if they choose. While a user can force a specific model for a single session with the
/modelcommand, this preference doesn't persist.Previously, the only way to permanently disable model routing was to manually find and edit the
settings.jsonfile, which creates unnecessary friction. By exposing the "Use Model Router" setting in the main settings dialog, we empower users to easily control this feature, improving the overall usability of the CLI.Reviewer Test Plan
npm run preflightto ensure all checks pass.npm start)./settingscommand.true) by default.false), and exit the dialog.false.settings.jsonfile (~/.gemini/settings.json) and verify thatexperimental.useModelRouteris now set tofalse.experimentalobject from yoursettings.jsonfile and save it./settingsagain.true.Testing Matrix
Linked issues / bugs
This PR makes progress on #6079