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
Conversation
Summary of ChangesHello @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 Highlights
Using Gemini Code AssistThe 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
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 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
|
|
Size Change: +255 B (0%) Total Size: 17.7 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
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.
| currentParams.config = { | ||
| ...currentParams.config, | ||
| temperature: 1, | ||
| }; |
There was a problem hiding this comment.
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.
This PR automatically cherry-picks commit 8dc397c to patch version v0.9.0 in the stable release to create version 0.9.1.