Allow using Gemini 2.5 Flash for code generations
What does this MR do and why?
Introduce a new feature flag use_gemini_2_5_flash_in_code_generation to control whether Gemini 2.5 Flash should be used for code generation.
References
Related to #549161 (closed)
How to set up and validate locally
- Checkout this branch in GitLab project
- Checkout the branch from gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!2806 (merged) in the AI GW 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
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Wanderson Policarpo