Skip to content

feat(gemma4): support Gemma4 in Gemini#5117

Open
douglas-reid wants to merge 1 commit intogoogle:mainfrom
douglas-reid:gemma4-docs-clarity
Open

feat(gemma4): support Gemma4 in Gemini#5117
douglas-reid wants to merge 1 commit intogoogle:mainfrom
douglas-reid:gemma4-docs-clarity

Conversation

@douglas-reid
Copy link
Copy Markdown
Contributor

@douglas-reid douglas-reid commented Apr 2, 2026

The main intent of this PR is to clarify Gemma 3 classes and add Gemma 4 sample now that Gemma 4 is released. As part of that work, this PR adds gemma-4-* to the allowlist for Gemini models for use in ADK.

This PR:

  • Adds gemma-4-* to the allowlist for Gemini models
  • Updates docstrings for Gemma, Gemma3Ollama, and GemmaFunctionCallingMixin to clarify they are Gemma 3-only
  • Adds Gemma 4 usage guidance pointing to Gemini/LiteLlm classes
  • Adds hello_world_gemma4 sample using standard Gemini class
  • Adds header comments and READMEs to existing Gemma 3 samples
  • Adds registry non-collision test for Gemma 4 model strings
  • Updates registration comments in models/init.py

Testing Plan

Please describe the tests that you ran to verify your changes. This is required
for all PRs that are not small documentation or typo fixes.

Unit Tests:

  • [ X ] I have added or updated unit tests for my change.
  • [ X ] All unit tests pass locally.

Please include a summary of passed pytest results.

❯ pytest tests/unittests/models/test_google_llm.py
...
tests/unittests/models/test_google_llm.py ...............................................                                                                                              [100%]
...
=============================================================================== 47 passed, 3 warnings in 4.40s ===============================================================================

❯ pytest tests/unittests/models/test_gemma_llm.py
....
tests/unittests/models/test_gemma_llm.py ......................                                                                                                                        [100%]

===================================================================================== 22 passed in 1.05s =====================================================================================

Manual End-to-End (E2E) Tests:

Ran adk run contributing/samples/hello_world_gemma4 with success

Checklist

  • [ X ] I have read the CONTRIBUTING.md document.
  • [ X ] I have performed a self-review of my own code.
  • [ X ] I have commented my code, particularly in hard-to-understand areas.
  • [ X ] I have added tests that prove my fix is effective or that my feature works.
  • [ X ] New and existing unit tests pass locally with my changes.
  • [ X ] I have manually tested my changes end-to-end.
  • [ X ] Any dependent changes have been merged and published in downstream modules.

Additional context

- Update docstrings for Gemma, Gemma3Ollama, and
  GemmaFunctionCallingMixin to clarify they are Gemma 3-only
- Add Gemma 4 usage guidance pointing to Gemini/LiteLlm classes
- Add hello_world_gemma4 sample using standard Gemini class
- Add header comments and READMEs to existing Gemma 3 samples
- Add registry non-collision test for Gemma 4 model strings
- Update registration comments in models/__init__.py
@adk-bot adk-bot added the models [Component] Issues related to model support label Apr 2, 2026
@douglas-reid douglas-reid changed the title docs(models): clarify Gemma 3 classes, add Gemma 4 sample feat(gemma4): support Gemma4 in Gemini Apr 2, 2026
@rohityan rohityan self-assigned this Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

models [Component] Issues related to model support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants