feat(core,cli): add support for Gemma 4 models (experimental)#25604
feat(core,cli): add support for Gemma 4 models (experimental)#25604Abhijit-2592 merged 4 commits intomainfrom
Conversation
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 introduces support for the Gemma 4 model family into the Gemini CLI. The changes involve registering the new models within the core configuration, defining their specific capabilities such as 'Thinking' mode, and ensuring they are correctly exposed in the user interface for selection. These updates allow users to leverage the latest Gemma 4 models directly through the CLI. 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. Footnotes
|
|
Hi @Abhijit-2592, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
|
Size Change: +2.66 kB (+0.01%) Total Size: 33.7 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request adds support for the gemma-4-31b-it and gemma-4-26b-a4b-it models. The changes include defining model constants, updating configurations with 'thinking' features enabled, adding the models to the UI selection dialog, and expanding test coverage. Feedback was provided to add the displayName property to the model configurations in defaultModelConfigs.ts to ensure consistency with the project's configuration patterns.
506a8ea to
317b4e2
Compare
3b0551f to
2fc8d43
Compare
Added support for gemma-4-31b-it and gemma-4-26b-a4b-it models. Includes: - Core model registry and display names - Generative configuration with ThinkingLevel.HIGH - UI visibility in ModelDialog - Token quota management (16k cap) to prevent 429 errors
This change introduces a mechanism to hide recently added Gemma 4 models behind an 'experimental.gemma' configuration flag. Changes: - Added 'experimental.gemma' boolean flag to settingsSchema.ts (default: false). - Enabled 'experimental.gemma: true' in the repository's .gemini/settings.json. - Updated core Config class to store and expose the experimentalGemma flag. - Modified isActiveModel in models.ts to return false for Gemma 4 models unless experimentalGemma is explicitly enabled. - Updated ModelDialog.tsx to conditionally show Gemma 4 models in the UI. - Updated Gemma 4 display strings to use their technical IDs (e.g., 'gemma-4-31b-it'). - Added/updated tests in models.test.ts to verify the gating logic and display names.
Followed suggestion from gemini-code-assist to include the displayName property in defaultModelConfigs.ts for Gemma 4 models, ensuring consistency with established configuration patterns.
2fc8d43 to
2fe690e
Compare
Summary
This PR adds support for the Gemma 4 models (
gemma-4-31b-itandgemma-4-26b-a4b-it). To maintain stability, these models are currently hidden behind an experimental flag.Key Changes
experimental.gemma(boolean, default:false) to settings. The models are only available when this flag is enabled.experimental.gemma: truein.gemini/settings.jsonfor this repository.ModelDialog(under the Manual selection) based on the experimental flag.gemma-4-31b-it) for clarity.displayNameand technical specs (256K context limit, thinking enabled) todefaultModelConfigs.ts.isActiveModellogic and expanded unit tests to verify gating behavior and mock configurations.How to Test
GEMINI_API_KEY="Your API KEY" npm run build-and-start/then selectModel).~/.gemini/settings.json) to include:{ "experimental": { "gemma": true } }gemma-4-31b-itandgemma-4-26b-a4b-itare now available for selection.