Skip to content

Rolling production to 20% using Gemini 3 for Flash and Flash Lite from 2.5#6176

Open
shixiao-coder wants to merge 6 commits intodatacommonsorg:masterfrom
shixiao-coder:prod-20p-rolling-to-gemini3
Open

Rolling production to 20% using Gemini 3 for Flash and Flash Lite from 2.5#6176
shixiao-coder wants to merge 6 commits intodatacommonsorg:masterfrom
shixiao-coder:prod-20p-rolling-to-gemini3

Conversation

@shixiao-coder
Copy link
Copy Markdown
Contributor

This change enables 20% usage of Gemini 3. Will be merged once staging and autopush looks fine

@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 initiates a phased rollout of the Gemini 3 Flash model in the production environment. By enabling the corresponding feature flag with a 20% traffic allocation, the team aims to monitor performance and stability before considering a wider release.

Highlights

  • Feature Flag Update: Enabled the 'enable_gemini_3_flash' feature flag in the production configuration.
  • Rollout Strategy: Set the rollout percentage to 20% for the Gemini 3 Flash model integration.
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 enables the 'enable_gemini_3_flash' feature flag in production and introduces a 20% rollout percentage. A critical issue was identified regarding the non-deterministic implementation of the rollout logic, which could cause inconsistent state and request failures when the flag is checked multiple times within a single request.

"owner": "shixiao",
"description": "Enables Gemini 3 Flash for NL detection."
"description": "Enables Gemini 3 Flash for NL detection.",
"rollout_percentage": 20
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Adding a rollout_percentage here introduces a significant risk due to the current implementation of is_feature_enabled in server/lib/feature_flags.py. The function uses random.random() on every call, making the result non-deterministic within a single request. In server/lib/nl/detection/llm_api.py, is_feature_enabled is called twice: once to determine the api_version (line 86) and once via detect_model_name() (line 93) to determine the model_name. With a 20% rollout, there is a high probability (approximately 32%) that one call returns True and the other returns False, leading to a mismatch between the API version (v1beta vs v1) and the model name. This will likely cause request failures. The rollout logic should be updated to be deterministic per request (e.g., by caching the result in flask.g) before enabling a partial rollout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant