Skip to content

fix(core): preserve explicit flash model IDs - #28893

Open
sylvesterkaczmarek wants to merge 2 commits into
google-gemini:mainfrom
sylvesterkaczmarek:fix/preserve-explicit-flash-model-28859
Open

fix(core): preserve explicit flash model IDs#28893
sylvesterkaczmarek wants to merge 2 commits into
google-gemini:mainfrom
sylvesterkaczmarek:fix/preserve-explicit-flash-model-28859

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Fixes #28859

Summary

  • restrict the Gemini 3.5 Flash rollout rewrite to the generic flash alias and known rollout IDs
  • preserve explicit model IDs such as gemini-3.6-flash and gemini-3.7-flash
  • allow invalid explicit IDs to pass through so the API rejects them instead of silently substituting another model
  • add focused regression coverage

Why

The static resolver could rewrite explicit model IDs ending in flash to the Gemini 3.5 Flash rollout target. This made published models unreachable by name and allowed nonexistent model IDs to appear to work.

Validation

Added focused unit coverage in packages/core/src/config/models.explicit-flash.test.ts.

Opening as draft because the full repository preflight was not available in this environment.

@sylvesterkaczmarek
sylvesterkaczmarek requested a review from a team as a code owner August 18, 2026 17:24
@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 refines the static model resolver to ensure that explicit model IDs are not incorrectly rewritten to the Gemini 3.5 Flash target. By narrowing the scope of the rollout logic, the system now correctly preserves specific model versions while still allowing the generic 'flash' alias to be promoted as intended.

Highlights

  • Model Resolution Logic: Updated the model resolution logic to restrict the Gemini 3.5 Flash rollout to specific aliases and known rollout IDs, preventing the unintended rewriting of explicit model IDs.
  • Removal of Deprecated Helper: Removed the isFlashModel helper function as it was no longer needed with the more precise resolution criteria.
  • Regression Testing: Added a new test suite in packages/core/src/config/models.explicit-flash.test.ts to ensure explicit model IDs are preserved correctly during the rollout.
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 the 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 counterproductive. 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.

@github-actions github-actions Bot added the size/m A medium sized PR label Aug 18, 2026
@github-actions

Copy link
Copy Markdown

📊 PR Size: size/M

  • Lines changed: 68
  • Additions: +55
  • Deletions: -13
  • Files changed: 2

@gemini-cli gemini-cli Bot added priority/p1 Important and should be addressed in the near term. area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality labels Aug 18, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request refactors the model resolution logic in packages/core/src/config/models.ts by removing the isFlashModel helper function and explicitly checking for specific flash model identifiers and aliases during the Gemini 3.5 Flash rollout. It also introduces a new test suite in models.explicit-flash.test.ts to verify that explicit flash model IDs are preserved correctly. No review comments were provided, so there is no additional feedback.

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

Labels

area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality priority/p1 Important and should be addressed in the near term. size/m A medium sized PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.55.1: any --model gemini-<X.Y>-flash is silently served by gemini-3.5-flash, including versions that do not exist

1 participant