Skip to content

fix(cli): expose model.name setting in settings dialog for persistence#19605

Merged
Adib234 merged 5 commits intogoogle-gemini:mainfrom
achaljhawar:main
Feb 25, 2026
Merged

fix(cli): expose model.name setting in settings dialog for persistence#19605
Adib234 merged 5 commits intogoogle-gemini:mainfrom
achaljhawar:main

Conversation

@achaljhawar
Copy link
Contributor

Summary

Expose the model.name setting in the /settings dialog so users can persist their preferred Gemini model across sessions.

Details

The model.name setting in settingsSchema.ts had showInDialog: false, which hid it from the /settings UI. Users had no way to set a persistent default model through the interactive dialog, so model selection was lost between sessions.

This change flips showInDialog to true and regenerates the settings documentation to include the new Model row.

Related Issues

Fixes #17987

How to Validate

  1. Build: npm run build
  2. Start CLI, run /settings
  3. Navigate to Model category — "Model" should now be visible as an editable string field
  4. Enter a model name (e.g. gemini-2.5-pro), confirm
  5. Exit and restart CLI — verify the model selection persisted

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@achaljhawar achaljhawar requested review from a team as code owners February 20, 2026 03:59
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @achaljhawar, 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 enhances the user experience by enabling persistent configuration of the Gemini model within the CLI. By making the model.name setting visible and editable in the /settings dialog, users can now set their preferred model once, and it will be retained across different sessions, eliminating the need for repeated manual selection.

Highlights

  • Settings UI Exposure: The model.name setting is now exposed in the /settings dialog, allowing users to configure their preferred Gemini model persistently.
  • Persistent Model Selection: Users can now save their chosen Gemini model across sessions, addressing the previous issue where model selection was lost.
  • Documentation Update: The CLI settings documentation (docs/cli/settings.md) has been updated to reflect the newly exposed model.name setting.
Changelog
  • docs/cli/settings.md
    • Added the model.name setting to the 'Model' section of the CLI settings documentation table.
  • packages/cli/src/config/settingsSchema.ts
    • Changed the showInDialog property for the model.name setting from false to true.
Activity
  • The model.name setting's showInDialog property was updated to true in settingsSchema.ts.
  • The CLI settings documentation (docs/cli/settings.md) was updated to reflect the new model.name entry.
  • The author has validated the changes on MacOS using npm run.
  • Relevant documentation and README have been updated.
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
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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.

Copy link
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 exposes the model.name setting in the settings dialog, which allows users to persist their preferred Gemini model across sessions. The change is straightforward, limited to enabling the setting in the UI and updating the corresponding documentation. This successfully addresses the issue of model selection not being persistent. The implementation is consistent with how other settings are defined in the project. The changes look good and I don't see any high or critical issues.

@gemini-cli gemini-cli bot added priority/p2 Important but can be addressed in a future release. area/core Issues related to User Interface, OS Support, Core Functionality help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! labels Feb 20, 2026
@achaljhawar
Copy link
Contributor Author

cc @bdmorgan (tagging for better visibility)

@Adib234 Adib234 self-assigned this Feb 25, 2026
@Adib234 Adib234 enabled auto-merge February 25, 2026 19:17
@Adib234 Adib234 added this pull request to the merge queue Feb 25, 2026
Merged via the queue into google-gemini:main with commit b765fb8 Feb 25, 2026
26 of 27 checks passed
BryanBradfo pushed a commit to BryanBradfo/gemini-cli that referenced this pull request Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! priority/p2 Important but can be addressed in a future release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model selection does not persist across sessions

2 participants