Skip to content

fix(patch): cherry-pick 8dc397c to release/v0.9.0-pr-10866 to patch version v0.9.0 and create version 0.9.1#11367

Merged
mrcabbage972 merged 1 commit into
release/v0.9.0-pr-10866from
hotfix/v0.9.0/0.9.1/stable/cherry-pick-8dc397c/pr-10866
Oct 17, 2025
Merged

fix(patch): cherry-pick 8dc397c to release/v0.9.0-pr-10866 to patch version v0.9.0 and create version 0.9.1#11367
mrcabbage972 merged 1 commit into
release/v0.9.0-pr-10866from
hotfix/v0.9.0/0.9.1/stable/cherry-pick-8dc397c/pr-10866

Conversation

@gemini-cli-robot

Copy link
Copy Markdown
Collaborator

This PR automatically cherry-picks commit 8dc397c to patch version v0.9.0 in the stable release to create version 0.9.1.

@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 introduces a strategic enhancement to the Gemini chat retry mechanism. By dynamically adjusting the model's temperature to 1 during retry attempts, the system encourages the generation of varied responses, thereby increasing the likelihood of a successful outcome when an initial API call fails or returns invalid content. This change is accompanied by a dedicated test to ensure its correct functionality.

Highlights

  • Retry Mechanism Enhancement: When the sendMessageStream encounters an issue and retries, the temperature parameter for the Gemini API call is now automatically set to 1. This aims to encourage the model to generate a different response on retry attempts, improving resilience.
  • New Test Coverage: A new test case has been added to geminiChat.test.ts to specifically verify that the temperature is correctly adjusted to 1 during retry attempts.
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: +255 B (0%)

Total Size: 17.7 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 17.7 MB +255 B (0%)
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB 0 B
./bundle/sandbox-macos-permissive-open.sb 830 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-closed.sb 3.29 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

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

This pull request cherry-picks a fix that adjusts the retry logic for API calls. When a retry is triggered due to invalid content from the model, the temperature is now set to 1 to encourage a different, hopefully valid, response. The implementation is straightforward and includes a corresponding unit test to verify the new behavior.

My review identifies one high-severity issue related to a naming inconsistency (config vs. generationConfig) compared to the imported @google/genai types. While the current change is consistent with the existing file, this discrepancy should be addressed in a follow-up to improve code correctness and maintainability.

Comment on lines +279 to +282
currentParams.config = {
...currentParams.config,
temperature: 1,
};

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

There's a potential issue here regarding the use of config versus generationConfig. The SendMessageParameters type is imported from @google/genai, which uses generationConfig for generation settings. This file, including this new change, consistently uses a config property instead. This discrepancy can lead to type-related bugs and confusion.

While this change is consistent with the existing code in this file, a broader refactoring to use generationConfig would be beneficial for long-term maintainability and correctness. A full fix would require changes outside of this diff (e.g., in makeApiCallAndProcessStream), so I am not providing a direct suggestion here.

@mrcabbage972 mrcabbage972 merged commit 293fda8 into release/v0.9.0-pr-10866 Oct 17, 2025
28 of 32 checks passed
@mrcabbage972 mrcabbage972 deleted the hotfix/v0.9.0/0.9.1/stable/cherry-pick-8dc397c/pr-10866 branch October 17, 2025 16:35
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants