fix(patch): cherry-pick d96bd05 to release/v0.30.0-preview.5-pr-19867 to patch version v0.30.0-preview.5 and create version 0.30.0-preview.6 - #20109
Conversation
|
You already have 7 pull requests open. Please work on getting existing PRs merged before opening more. |
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 integrates updates to the core configuration logic to accurately recognize and grant access to the latest Gemini 3.1 preview models. By generalizing the preview model detection mechanism and explicitly including new model IDs, the system ensures that users with appropriate quotas can utilize cutting-edge AI capabilities. Highlights
Changelog
Activity
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
|
There was a problem hiding this comment.
Code Review
This pull request cherry-picks a fix to support new preview models, specifically gemini-3.1-pro-preview and gemini-3.1-pro-preview-customtools. The changes correctly update the isPreviewModel helper and the logic in refreshUserQuota to use it. The tests are also updated, but there's an opportunity to improve test coverage for one of the new models, which I've commented on.
| it('should update hasAccessToPreviewModel to true if quota includes Gemini 3.1 preview model', async () => { | ||
| mockCodeAssistServer.retrieveUserQuota.mockResolvedValue({ | ||
| buckets: [ | ||
| { | ||
| modelId: 'gemini-3.1-pro-preview', | ||
| remainingAmount: '100', | ||
| remainingFraction: 1.0, | ||
| }, | ||
| ], | ||
| }); | ||
|
|
||
| await config.refreshUserQuota(); | ||
| expect(config.getHasAccessToPreviewModel()).toBe(true); | ||
| }); |
There was a problem hiding this comment.
While this test covers gemini-3.1-pro-preview, the related change in packages/core/src/config/models.ts also adds PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL to isPreviewModel. To ensure full test coverage for the new logic, it would be beneficial to add another test case for gemini-3.1-pro-preview-customtools.
it('should update hasAccessToPreviewModel to true if quota includes Gemini 3.1 preview model', async () => {
mockCodeAssistServer.retrieveUserQuota.mockResolvedValue({
buckets: [
{
modelId: 'gemini-3.1-pro-preview',
remainingAmount: '100',
remainingFraction: 1.0,
},
],
});
await config.refreshUserQuota();
expect(config.getHasAccessToPreviewModel()).toBe(true);
});
it('should update hasAccessToPreviewModel to true if quota includes Gemini 3.1 custom tools preview model', async () => {
mockCodeAssistServer.retrieveUserQuota.mockResolvedValue({
buckets: [
{
modelId: 'gemini-3.1-pro-preview-customtools',
remainingAmount: '100',
remainingFraction: 1.0,
},
],
});
await config.refreshUserQuota();
expect(config.getHasAccessToPreviewModel()).toBe(true);
});
This PR automatically cherry-picks commit d96bd05 to patch version v0.30.0-preview.5 in the preview release to create version 0.30.0-preview.6.