feat: Add Gemini 2.5 Flash model to code generation available models
What does this merge request do and why?
Related gitlab-org/gitlab#549161 (closed)
Blocks gitlab-org/gitlab!194860 (merged)
Add support for Gemini 2.5 Flash model for Code Generation.
Model selection will work via feature flag gitlab-org/gitlab#550215.
How to set up and validate locally
- Checkout this branch in the AI GW project
- Checkout the branch from gitlab-org/gitlab!194860 (merged) in the GitLab project
- In the GitLab project, run
bundle exec rails r "Feature.enable(:use_gemini_2_5_flash_in_code_generation)" - Change the GitLab account in your workspace to your local instance (e.g. https://docs.gitlab.com/editor_extensions/visual_studio_code/#switch-gitlab-accounts-in-vs-code)
- In your editor, trigger a code generation by adding a comment with instructions to GitLab Duo
- You should see the log below in you AI GW logs:
AI GW Logs
2025-06-20_14:44:31.21644 gitlab-ai-gateway : 2025-06-20 15:44:31 [info ] Returning prompt from the registry correlation_id=01JY6WRR4F6XW4BKSNDJV48QWF model_identifier=None prompt_id=code_suggestions/generations/base prompt_name='Gemini 2.5 Flash Code Generations Agent' prompt_version=1.2.0-dev
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Edited by Wanderson Policarpo