Skip to content

Create a feature flag for 3 Flash to help migrate from 2.5 Flash#6162

Merged
shixiao-coder merged 4 commits intodatacommonsorg:masterfrom
shixiao-coder:gemini-3-feature-flag
Apr 2, 2026
Merged

Create a feature flag for 3 Flash to help migrate from 2.5 Flash#6162
shixiao-coder merged 4 commits intodatacommonsorg:masterfrom
shixiao-coder:gemini-3-feature-flag

Conversation

@shixiao-coder
Copy link
Copy Markdown
Contributor

No description provided.

@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 a new feature flag to manage the transition to Gemini 3 Flash for natural language detection. By centralizing this toggle in the configuration files and updating the internal feature flag library, the team can safely control the rollout of the new model across different deployment environments.

Highlights

  • Feature Flag Implementation: Added a new feature flag 'enable_gemini_3_flash' to the configuration files to facilitate the migration from Gemini 2.5 Flash to 3 Flash.
  • Configuration Updates: Enabled the feature flag for 'autopush' and 'staging' environments, while keeping it disabled for 'custom', 'dev', and 'local' environments.
  • Codebase Integration: Registered the new feature flag constant in 'server/lib/feature_flags.py' for use within the application logic.
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 a new feature flag, enable_gemini_3_flash, for NL detection across multiple environment configuration files and defines the corresponding constant in feature_flags.py. Feedback focuses on maintaining alphabetical order and consistent verb tense in the JSON configurations to ensure consistency, as well as a suggestion to enable the flag by default in the development environment.

Comment thread server/config/feature_flag_configs/autopush.json
Comment thread server/config/feature_flag_configs/custom.json
Comment thread server/config/feature_flag_configs/dev.json
Comment thread server/config/feature_flag_configs/local.json
Comment thread server/config/feature_flag_configs/staging.json
Comment thread server/lib/feature_flags.py Outdated
ENABLE_STAT_VAR_AUTOCOMPLETE = 'enable_stat_var_autocomplete'
ENABLE_NL_AGENT_DETECTOR = 'enable_nl_agent_detector'
NEW_RANKING_PAGE = 'new_ranking_page'
ENABLE_GEMINI_3_FLASH = 'enable_gemini_3_flash'
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.

This should go in with the code, not the PR to update feature flags!

Think about it this way, if this somehow breaks all the environments, we want to revert just the feature flags, so we wouldnt be able to revert this PR because it also has this line of code.

Just move that in the other PR and we're good :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

},
{
"name": "enable_gemini_3_flash",
"enabled": true,
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.

Can you make all the defaults be FALSE
Then when you've submitted the code and you're ready to test in the environments, we can re enable it?

Otherwise we run into the same issue where a rleease to that environment is affecting the code being run which is a more dangerous pattern.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

@shixiao-coder shixiao-coder requested a review from gmechali April 2, 2026 14:06
@shixiao-coder shixiao-coder merged commit 5728042 into datacommonsorg:master Apr 2, 2026
13 checks passed
@shixiao-coder shixiao-coder deleted the gemini-3-feature-flag branch April 2, 2026 16:16
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.

2 participants