Skip to content

fix(patch): cherry-pick 5dd2dab to release/v0.33.0-preview.11-pr-21871#21876

Merged
jerop merged 2 commits intorelease/v0.33.0-preview.11-pr-21871from
hotfix/v0.33.0-preview.11/0.33.0-preview.12/preview/cherry-pick-5dd2dab/pr-21871
Mar 10, 2026
Merged

fix(patch): cherry-pick 5dd2dab to release/v0.33.0-preview.11-pr-21871#21876
jerop merged 2 commits intorelease/v0.33.0-preview.11-pr-21871from
hotfix/v0.33.0-preview.11/0.33.0-preview.12/preview/cherry-pick-5dd2dab/pr-21871

Conversation

@gemini-cli-robot
Copy link
Copy Markdown
Collaborator

@gemini-cli-robot gemini-cli-robot commented Mar 10, 2026

This PR automatically cherry-picks commit 5dd2dab to patch version v0.33.0-preview.11 in the preview release to create version 0.33.0-preview.12.

✅ Merge Conflicts Resolved

The merge conflicts resulting from this cherry-pick have been successfully resolved.

🚨 Important:

  • The automated patch release will trigger once this PR is merged

…ation phase (#21871)

# Conflicts:
#	packages/core/src/availability/policyHelpers.ts
@gemini-cli-robot gemini-cli-robot requested a review from a team as a code owner March 10, 2026 13:58
@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Mar 10, 2026
@github-actions
Copy link
Copy Markdown

Size Change: +872 B (0%)

Total Size: 25.9 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 25.4 MB +872 B (0%)
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 221 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 227 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 11.5 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./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

@jerop jerop changed the title fix(patch): cherry-pick 5dd2dab to release/v0.33.0-preview.11-pr-21871 [CONFLICTS] fix(patch): cherry-pick 5dd2dab to release/v0.33.0-preview.11-pr-21871 Mar 10, 2026
@jerop jerop enabled auto-merge (squash) March 10, 2026 14:25
@jerop jerop merged commit 6431ea8 into release/v0.33.0-preview.11-pr-21871 Mar 10, 2026
26 checks passed
@jerop jerop deleted the hotfix/v0.33.0-preview.11/0.33.0-preview.12/preview/cherry-pick-5dd2dab/pr-21871 branch March 10, 2026 14:48
@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 focuses on refining the model routing strategies within the application, particularly concerning the automatic model selection and the integration of Gemini 3.1 features. The changes ensure that the correct models are selected based on the configuration, approval mode, and the availability of Gemini 3.1, including custom tool models. The updates also include new test cases to validate the routing logic.

Highlights

  • Model Routing Logic: This PR refactors the model routing logic to correctly handle the GEMINI_MODEL_ALIAS_AUTO alias and to ensure proper routing to preview models when Gemini 3.1 is launched or when using custom tool models.
  • Configuration Updates: Introduces a new configuration method, getUseCustomToolModelSync, to determine whether the custom tool model should be used, and updates related configurations.
  • Test Coverage: Adds new test cases to approvalModeStrategy.test.ts to verify the routing behavior when using the auto alias and when Gemini 3.1 is launched with an approved plan.
Changelog
  • packages/core/src/availability/policyHelpers.ts
    • Refactor: Removed direct import of AuthType and used config.getUseCustomToolModelSync() to determine custom tool model usage.
  • packages/core/src/config/config.ts
    • Feat: Added getUseCustomToolModel and getUseCustomToolModelSync methods to determine if the custom tool model should be used.
  • packages/core/src/routing/strategies/approvalModeStrategy.ts
    • Refactor: Updated model selection logic to use resolveClassifierModel and consider useGemini3_1 and useCustomToolModel.
  • packages/core/src/routing/strategies/classifierStrategy.ts
    • Refactor: Updated model selection logic to use resolveClassifierModel and consider useGemini3_1 and useCustomToolModel.
  • packages/core/src/routing/strategies/numericalClassifierStrategy.ts
    • Refactor: Updated model selection logic to use resolveClassifierModel and consider useGemini3_1 and useCustomToolModel.
Activity
  • Cherry-picked commit 5dd2dab to release/v0.33.0-preview.11-pr-21871
  • Resolved merge conflicts resulting from the cherry-pick.
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.

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 is a cherry-pick that introduces several refactorings, such as encapsulating logic for determining model usage into new methods on the Config class. However, a critical issue was found in packages/core/src/availability/policyHelpers.ts where merge conflict markers were left in the code. This will break the build and must be fixed. The other changes appear to be correct refactorings and test updates to support the new logic.

Note: Security Review did not run due to the size of the PR.

I am having trouble creating individual review comments. Click here to see my feedback.

packages/core/src/availability/policyHelpers.ts (48-55)

critical

This file contains unresolved merge conflict markers (<<<<<<<, =======, >>>>>>>), which will cause syntax errors and prevent the code from compiling. It appears the merge conflict was not resolved correctly.

Specifically:

  • The variable useCustomToolModel is declared twice within the conflict block.
  • The variable hasAccessToPreview is declared inside the conflict block and again on line 64.
  • The AuthType import was removed, making the code in the HEAD portion of the conflict invalid.

Please resolve the conflict by removing the markers and duplicate declarations.

  const useCustomToolModel = config.getUseCustomToolModelSync?.() ?? false;

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

Labels

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.

2 participants