Skip to content

fix(patch): cherry-pick aa9163d to release/v0.30.0-preview.3-pr-19991 to patch version v0.30.0-preview.3 and create version 0.30.0-preview.4#20040

Merged
sehoon38 merged 1 commit into
release/v0.30.0-preview.3-pr-19991from
hotfix/v0.30.0-preview.3/0.30.0-preview.4/preview/cherry-pick-aa9163d/pr-19991
Feb 23, 2026
Merged

fix(patch): cherry-pick aa9163d to release/v0.30.0-preview.3-pr-19991 to patch version v0.30.0-preview.3 and create version 0.30.0-preview.4#20040
sehoon38 merged 1 commit into
release/v0.30.0-preview.3-pr-19991from
hotfix/v0.30.0-preview.3/0.30.0-preview.4/preview/cherry-pick-aa9163d/pr-19991

Conversation

@gemini-cli-robot

Copy link
Copy Markdown
Collaborator

This PR automatically cherry-picks commit aa9163d to patch version v0.30.0-preview.3 in the preview release to create version 0.30.0-preview.4.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @gemini-cli-robot, 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 automates the cherry-picking of a commit that enhances the system's model availability policies. It introduces the capability to utilize Gemini 3.1 models, including a specific version for custom tools, by updating the logic that determines which model chain to use based on new configuration options and authentication context. This ensures that the application can leverage the latest model capabilities when enabled.

Highlights

  • Gemini 3.1 Model Integration: Integrated support for Gemini 3.1 models, including a specialized custom tools model, into the model policy chain resolution logic.
  • Dynamic Model Resolution: Updated the getModelPolicyChain and resolvePolicyChain functions to dynamically select the appropriate Gemini 3.1 model based on useGemini31 and useCustomToolModel configuration flags, as well as the user's authentication type.
  • Expanded Test Coverage: Added new test cases to policyCatalog.test.ts and policyHelpers.test.ts to ensure correct behavior when resolving Gemini 3.1 and custom tool model chains under various conditions.
Changelog
  • packages/core/src/availability/policyCatalog.test.ts
    • Imported new Gemini 3.1 model constants.
    • Added test cases to verify the correct Gemini 3.1 model chain is returned when useGemini31 and useCustomToolModel flags are enabled.
  • packages/core/src/availability/policyCatalog.ts
    • Imported resolveModel function.
    • Extended ModelPolicyOptions interface with useGemini31 and useCustomToolModel properties.
    • Removed the static PREVIEW_CHAIN constant.
    • Modified getModelPolicyChain to dynamically construct the preview chain using resolveModel based on the new options.
  • packages/core/src/availability/policyHelpers.test.ts
    • Imported new Gemini 3.1 model constants and AuthType.
    • Updated createMockConfig to include getGemini31LaunchedSync and getContentGeneratorConfig mocks.
    • Added test cases for resolvePolicyChain to confirm correct selection of Gemini 3.1 Pro and Gemini 3.1 Pro Custom Tools chains when auto-gemini-3 is requested and Gemini 3.1 is launched.
  • packages/core/src/availability/policyHelpers.ts
    • Imported AuthType.
    • Introduced useGemini31 and useCustomToolModel variables to determine model resolution parameters.
    • Updated the resolveModel call to pass useGemini31 and useCustomToolModel.
    • Modified getModelPolicyChain calls to include useGemini31 and useCustomToolModel in the options.
Activity
  • This pull request was automatically generated to cherry-pick commit aa9163d to the release/v0.30.0-preview.3-pr-19991 branch, creating version 0.30.0-preview.4.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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

Copy link
Copy Markdown

Size Change: +379 B (0%)

Total Size: 24.5 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 24.5 MB +379 B (0%)
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B

compressed-size-action

@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

The pull request introduces changes to how model policy chains are resolved, specifically to support Gemini 3.1 models with and without custom tools. This involves updating policyCatalog.test.ts to include new test cases for Gemini 3.1 chains, modifying policyCatalog.ts to dynamically resolve the preview model based on Gemini 3.1 and custom tool flags, and updating policyHelpers.test.ts and policyHelpers.ts to incorporate these new flags into the policy chain resolution logic. The changes ensure that the correct Gemini 3.1 model is selected when useGemini31 and useCustomToolModel flags are enabled.

Comment on lines 59 to 62
definePolicy({ model: DEFAULT_GEMINI_FLASH_MODEL, isLastResort: true }),
];

const PREVIEW_CHAIN: ModelPolicyChain = [
definePolicy({ model: PREVIEW_GEMINI_MODEL }),
definePolicy({ model: PREVIEW_GEMINI_FLASH_MODEL, isLastResort: true }),
];

const FLASH_LITE_CHAIN: ModelPolicyChain = [

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

The PREVIEW_CHAIN constant has been removed. While the logic is now inlined within getModelPolicyChain, removing a constant that was previously used might reduce readability if the chain structure was meant to be easily identifiable and reusable. Consider if this chain might be reused in other contexts or if its structure warrants being a named constant for clarity.

@gemini-cli gemini-cli Bot added the status/need-issue Pull requests that need to have an associated issue. label Feb 23, 2026
@sehoon38 sehoon38 merged commit 09c6514 into release/v0.30.0-preview.3-pr-19991 Feb 23, 2026
60 of 67 checks passed
@sehoon38 sehoon38 deleted the hotfix/v0.30.0-preview.3/0.30.0-preview.4/preview/cherry-pick-aa9163d/pr-19991 branch February 23, 2026 19:48
kuishou68 pushed a commit to iOfficeAI/gemini-cli-pro that referenced this pull request Feb 27, 2026
… to patch version v0.30.0-preview.3 and create version 0.30.0-preview.4 (google-gemini#20040)

Co-authored-by: Sehoon Shon <sshon@google.com>
@sripasg sripasg added the size/m A medium sized PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m A medium sized PR status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants