Skip to content

feat(cli): Enable model router by default and add to settings dialog#9262

Merged
abhipatel12 merged 2 commits intomainfrom
abhipatel12/routing-default-true
Sep 24, 2025
Merged

feat(cli): Enable model router by default and add to settings dialog#9262
abhipatel12 merged 2 commits intomainfrom
abhipatel12/routing-default-true

Conversation

@abhipatel12
Copy link
Copy Markdown
Collaborator

@abhipatel12 abhipatel12 commented Sep 23, 2025

TLDR

This PR enables the Model Router feature by default and adds a toggle for it within the /settings dialog. This improves user experience by making it easier for users to opt-out of model routing without needing to manually edit their settings.json file.

Key changes for reviewers:

  • packages/cli/src/config/settingsSchema.ts: The default for useModelRouter is now true and showInDialog is set to true.
  • packages/cli/src/config/config.ts: The hardcoded fallback for useModelRouter has been updated to true to ensure backward compatibility for users without this setting in their config.
  • Associated tests in settingsSchema.test.ts, config.test.ts, and SettingsDialog.test.tsx have been updated to reflect the new default behavior.

Ex of Setting:

Screenshot 2025-09-23 at 3 56 09 PM

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 /model command, this preference doesn't persist.

Previously, the only way to permanently disable model routing was to manually find and edit the settings.json file, 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

  1. Pull down this branch and run npm run preflight to ensure all checks pass.
  2. Start the Gemini CLI (npm start).
  3. Open the settings dialog by running the /settings command.
  4. Verify: The "Use Model Router" setting is now visible in the "Experimental" category and is enabled (true) by default.
  5. Navigate to the setting, toggle it off (false), and exit the dialog.
  6. Re-open the settings dialog and confirm the setting has persisted as false.
  7. Check your user settings.json file (~/.gemini/settings.json) and verify that experimental.useModelRouter is now set to false.
  8. Manually remove the entire experimental object from your settings.json file and save it.
  9. Restart the CLI and open /settings again.
  10. Verify: The "Use Model Router" setting has correctly defaulted back to true.

Testing Matrix

🍏 🪟 🐧
npm run
npx
Docker
Podman - -
Seatbelt -

Linked issues / bugs

This PR makes progress on #6079

@abhipatel12 abhipatel12 requested a review from a team as a code owner September 23, 2025 20:38
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @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 /settings dialog. This change eliminates the previous necessity for users to manually modify their settings.json file to disable model routing, thereby simplifying configuration and improving accessibility for this core feature.

Highlights

  • Model Router Enabled by Default: The useModelRouter feature is now enabled by default, streamlining the initial user experience.
  • Settings Dialog Integration: A toggle for useModelRouter has been added to the /settings dialog, allowing users to easily manage this feature without manual configuration file edits.
  • Configuration Updates: settingsSchema.ts and config.ts have been updated to reflect the new default value for useModelRouter and ensure proper display in the settings dialog and backward compatibility.
  • Test Suite Adjustments: Corresponding unit and integration tests in config.test.ts, settingsSchema.test.ts, and SettingsDialog.test.tsx have been updated to align with these changes.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 23, 2025

Size Change: -5 B (0%)

Total Size: 17.4 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 17.4 MB -5 B (0%)
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB 0 B
./bundle/sandbox-macos-permissive-open.sb 830 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B

compressed-size-action

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@abhipatel12 abhipatel12 requested a review from anj-s September 23, 2025 21:07
@abhipatel12 abhipatel12 added this pull request to the merge queue Sep 24, 2025
Merged via the queue into main with commit ee36307 Sep 24, 2025
17 of 19 checks passed
@abhipatel12 abhipatel12 deleted the abhipatel12/routing-default-true branch September 24, 2025 21:38
@abhipatel12
Copy link
Copy Markdown
Collaborator Author

/patch preview

@github-actions
Copy link
Copy Markdown

Patch workflow(s) dispatched successfully!

📋 Details:

  • Channels: preview
  • Commit: ee36307495ea247e2eb6d2da7aedeb81cd37a734
  • Workflows Created: 1

🔗 Track Progress:

@github-actions
Copy link
Copy Markdown

Patch creation failed!

There was an error creating the patch release.

🔍 Troubleshooting:

  • Check the workflow logs for detailed error information
  • Verify the commit SHA is valid and accessible
  • Ensure you have permissions to create branches and PRs

🔗 Links:

abhipatel12 added a commit that referenced this pull request Sep 25, 2025
thacio added a commit to thacio/auditaria that referenced this pull request Oct 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants