Repository navigation
fix(patch): cherry-pick 62364cb to release/v0.60.0-pr-29443 [CONFLICTS] - #29456
gemini-cli-robot wants to merge 1 commit into
Conversation
# Conflicts: # packages/core/src/config/models.test.ts # packages/core/src/config/models.ts # packages/core/src/core/geminiChat.test.ts
|
📊 PR Size: size/XL
|
Summary of ChangesHello, 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 PR cherry-picks commit 62364cb to the v0.60.0 release branch to facilitate the release of version 0.60.1. The changes introduce new Gemini Flash models and update the underlying model routing and configuration infrastructure to support these additions. Note that this PR contains merge conflicts that require manual resolution before merging. 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 the 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 counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for the latest Gemini models, specifically gemini-3.8-flash and gemini-3.5-flash-lite, by updating configuration files, routing strategies, model mappings, and tests to dynamically check for the latest GA models. However, several critical unresolved merge conflict markers were found in models.test.ts, models.ts, and geminiChat.test.ts that will cause syntax and compilation errors and must be resolved.
Note: Security Review did not run due to the size of the PR.
| <<<<<<< HEAD | ||
| it('should resolve all but preview flash models to DEFAULT_GEMINI_FLASH_MODEL when useGemini3_5Flash is true (legacy)', () => { | ||
| ======= | ||
| it('should resolve known non-preview flash models to LATEST_GEMINI_FLASH_MODEL when useGemini3_5Flash is true (legacy)', () => { | ||
| >>>>>>> 62364cb20 (Feat/gemini 3.8 flash 3.5 flash lite (#29443)) |
There was a problem hiding this comment.
Unresolved merge conflict marker detected. This will cause syntax and compilation errors. Please resolve the conflict by keeping the updated test case for LATEST_GEMINI_FLASH_MODEL.
it('should resolve known non-preview flash models to LATEST_GEMINI_FLASH_MODEL when useGemini3_5Flash is true (legacy)', () => {| <<<<<<< HEAD | ||
| it('should resolve all but preview flash models to gemini-3.5-flash when useGemini3_5Flash is true (dynamic)', () => { | ||
| ======= | ||
| it.each([ | ||
| 'gemini-3.6-flash', | ||
| 'gemini-3.7-flash', | ||
| 'gemini-3.9-flash', | ||
| 'gemini-9.9-flash', | ||
| ])( | ||
| 'should preserve the explicit versioned model %s when useGemini3_5Flash is true (legacy)', | ||
| (model) => { | ||
| expect(resolveModel(model, false, false, true, undefined, true)).toBe( | ||
| model, | ||
| ); | ||
| }, | ||
| ); | ||
|
|
||
| it('should resolve known non-preview flash models to LATEST_GEMINI_FLASH_MODEL when useGemini3_5Flash is true (dynamic)', () => { | ||
| >>>>>>> 62364cb20 (Feat/gemini 3.8 flash 3.5 flash lite (#29443)) |
There was a problem hiding this comment.
Unresolved merge conflict marker detected. This will cause syntax and compilation errors. Please resolve the conflict by keeping the incoming test cases.
it.each([
'gemini-3.6-flash',
'gemini-3.7-flash',
'gemini-3.9-flash',
'gemini-9.9-flash',
])(
'should preserve the explicit versioned model %s when useGemini3_5Flash is true (legacy)',
(model) => {
expect(resolveModel(model, false, false, true, undefined, true)).toBe(
model,
);
},
);
it('should resolve known non-preview flash models to LATEST_GEMINI_FLASH_MODEL when useGemini3_5Flash is true (dynamic)', () => {| <<<<<<< HEAD | ||
| useGemini3_5Flash && | ||
| isFlashModel(resolved) && | ||
| ======= | ||
| effectiveUseLatestFlash && | ||
| isPromotableFlashModel(resolved) && | ||
| >>>>>>> 62364cb20 (Feat/gemini 3.8 flash 3.5 flash lite (#29443)) |
| <<<<<<< HEAD | ||
| model === 'flash' || | ||
| model.endsWith('flash') | ||
| ======= | ||
| model === GEMINI_MODEL_ALIAS_FLASH || | ||
| model === BASE_GEMINI_FLASH_MODEL || | ||
| model === LEGACY_CCPA_FLASH_MODEL | ||
| ); | ||
| } | ||
|
|
||
| function isPromotableFlashLiteModel(model: string): boolean { | ||
| return ( | ||
| model === DEFAULT_GEMINI_FLASH_LITE_MODEL || | ||
| model === BASE_GEMINI_FLASH_LITE_MODEL || | ||
| model === GEMINI_MODEL_ALIAS_FLASH_LITE | ||
| >>>>>>> 62364cb20 (Feat/gemini 3.8 flash 3.5 flash lite (#29443)) |
There was a problem hiding this comment.
Unresolved merge conflict marker detected. This will cause syntax and compilation errors. Please resolve the conflict by keeping the updated mappings and adding isPromotableFlashLiteModel.
Note: You must also rename the function header on line 359 from isFlashModel to isPromotableFlashModel to match the call on line 316 and prevent compilation errors.
model === GEMINI_MODEL_ALIAS_FLASH ||
model === BASE_GEMINI_FLASH_MODEL ||
model === LEGACY_CCPA_FLASH_MODEL
);
}
function isPromotableFlashLiteModel(model: string): boolean {
return (
model === DEFAULT_GEMINI_FLASH_LITE_MODEL ||
model === BASE_GEMINI_FLASH_LITE_MODEL ||
model === GEMINI_MODEL_ALIAS_FLASH_LITE| <<<<<<< HEAD | ||
| ======= | ||
| it('should send an explicit versioned Flash model unchanged when Gemini 3.5 Flash GA is enabled', async () => { | ||
| vi.mocked(mockConfig.hasLatestFlashGAAccess).mockReturnValue(true); | ||
| vi.mocked(mockContentGenerator.generateContentStream).mockResolvedValue( | ||
| (async function* () { | ||
| yield { | ||
| candidates: [ | ||
| { | ||
| content: { parts: [{ text: 'response' }], role: 'model' }, | ||
| finishReason: 'STOP', | ||
| }, | ||
| ], | ||
| } as unknown as GenerateContentResponse; | ||
| })(), | ||
| ); | ||
|
|
||
| const stream = await chat.sendMessageStream( | ||
| { model: 'gemini-3.8-flash' }, | ||
| 'hello', | ||
| 'prompt-id-explicit-flash', | ||
| new AbortController().signal, | ||
| LlmRole.MAIN, | ||
| ); | ||
| for await (const _ of stream) { | ||
| // consume stream | ||
| } | ||
|
|
||
| expect(mockContentGenerator.generateContentStream).toHaveBeenCalledWith( | ||
| expect.objectContaining({ model: 'gemini-3.8-flash' }), | ||
| 'prompt-id-explicit-flash', | ||
| LlmRole.MAIN, | ||
| ); | ||
| }); | ||
|
|
||
| >>>>>>> 62364cb20 (Feat/gemini 3.8 flash 3.5 flash lite (#29443)) |
There was a problem hiding this comment.
Unresolved merge conflict marker detected. This will cause syntax and compilation errors. Please resolve the conflict by keeping the new test case. Additionally, prefer using hardcoded literal values instead of importing constants in tests to ensure they are self-contained.
it('should send an explicit versioned Flash model unchanged when Gemini 3.5 Flash GA is enabled', async () => {
vi.mocked(mockConfig.hasLatestFlashGAAccess).mockReturnValue(true);
vi.mocked(mockContentGenerator.generateContentStream).mockResolvedValue(
(async function* () {
yield {
candidates: [
{
content: { parts: [{ text: 'response' }], role: 'model' },
finishReason: 'STOP',
},
],
} as unknown as GenerateContentResponse;
})(),
);
const stream = await chat.sendMessageStream(
{ model: 'gemini-3.8-flash' },
'hello',
'prompt-id-explicit-flash',
new AbortController().signal,
'main',
);
for await (const _ of stream) {
// consume stream
}
expect(mockContentGenerator.generateContentStream).toHaveBeenCalledWith(
expect.objectContaining({ model: 'gemini-3.8-flash' }),
'prompt-id-explicit-flash',
'main',
);
});References
- In tests, prefer using hardcoded literal values instead of importing constants to ensure tests are self-contained and less brittle.
This PR automatically cherry-picks commit 62364cb to patch version v0.60.0 in the stable release to create version 0.60.1.
This cherry-pick resulted in merge conflicts that need manual resolution.
🔧 Next Steps:
📋 Files with conflicts:
The commit has been created with conflict markers for easier manual resolution.
🚨 Important: