Skip to content

feat: add support for Gemma 4 model#25560

Open
akh64bit wants to merge 6 commits intomainfrom
gemma4_apr16
Open

feat: add support for Gemma 4 model#25560
akh64bit wants to merge 6 commits intomainfrom
gemma4_apr16

Conversation

@akh64bit
Copy link
Copy Markdown
Contributor

Summary

This PR adds support for the Gemma 4 model (gemma-4-26b-a4b-it) to the Gemini CLI. It makes the model selectable via the UI and manageable through the Agent Control Protocol (ACP).

Details

  • Added DEFAULT_GEMMA_4_MODEL and GEMMA_MODEL_ALIAS_4 constants in packages/core/src/config/models.ts.
  • Configured the gemma4 alias in packages/core/src/config/defaultModelConfigs.ts, including resolution to the concrete model ID and visibility in the UI.
  • Updated the ModelDialog component in packages/cli to include Gemma 4 in the manual model selection list.
  • Updated acpClient in packages/cli to expose Gemma 4 as an available model.
  • Updated model configuration golden files to reflect the new alias.
  • Added unit tests to verify Gemma 4 visibility and resolution.

Related Issues

N/A

How to Validate

  1. Run the CLI and open the model selection dialog (e.g., using /model manage).
  2. Verify that "Gemma 4 (26B)" is visible in the "Manual" model selection list.
  3. Select "Gemma 4 (26B)" and verify the model is updated.
  4. Run unit tests: npm test -w @google/gemini-cli-core -- src/config/models.test.ts and npm test -w @google/gemini-cli -- src/ui/components/ModelDialog.test.tsx.

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:
    • Linux
      • npm run

@akh64bit akh64bit requested review from a team as code owners April 16, 2026 21:42
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 within the Gemini CLI ecosystem. It enables users to select this model through the UI and manages it via the Agent Control Protocol. Additionally, the PR refactors the model selection logic by removing dynamic routing in favor of a fixed default model, ensuring more predictable behavior in the client and local executor.

Highlights

  • Gemma 4 Model Support: Added support for the Gemma 4 model (gemma-4-26b-a4b-it) across the CLI and core packages, including configuration, UI selection, and ACP integration.
  • Model Routing Changes: Replaced dynamic model routing with a static default (PREVIEW_GEMINI_FLASH_MODEL) in the client and local executor, simplifying model selection logic.
  • Testing and Documentation: Updated unit tests, golden files, and documentation to reflect the new model and the changes in routing behavior.
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.

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
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 introduces support for the Gemma 4 model across the CLI and core packages, including configuration, UI components, and tests. Additionally, it removes the dynamic model routing logic in GeminiClient and LocalAgentExecutor, replacing it with a hardcoded default to PREVIEW_GEMINI_FLASH_MODEL when an auto model is requested. Several tests related to model routing and specific retry behaviors have been skipped or updated to reflect these changes. I have no feedback to provide.

@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant