fix(patch): cherry-pick fd2cbac to release/v0.12.0-preview.9-pr-12399 [CONFLICTS] (#12488)

Co-authored-by: Abhi <43648792+abhipatel12@users.noreply.github.com>
This commit is contained in:
gemini-cli-robot
2025-11-03 11:29:38 -08:00
committed by GitHub
parent 1c44586582
commit a2cb116980
3 changed files with 15 additions and 2 deletions
+13
View File
@@ -634,6 +634,19 @@ describe('Server Config (config.ts)', () => {
expect(config.getUseModelRouter()).toBe(true);
expect(config.getModel()).toBe(chosenModel);
});
it('should NOT switch to auto model if cli provides specific model, even if router is enabled', async () => {
const config = new Config({
...baseParams,
useModelRouter: true,
model: 'gemini-flash-latest',
});
await config.refreshAuth(AuthType.LOGIN_WITH_GOOGLE);
expect(config.getUseModelRouter()).toBe(true);
expect(config.getModel()).toBe('gemini-flash-latest');
});
});
describe('ContinueOnFailedApiCall Configuration', () => {
-2
View File
@@ -559,8 +559,6 @@ export class Config {
if (this.model === DEFAULT_GEMINI_MODEL_AUTO) {
this.model = DEFAULT_GEMINI_MODEL;
}
} else if (this.useModelRouter && this.model === DEFAULT_GEMINI_MODEL) {
this.model = DEFAULT_GEMINI_MODEL_AUTO;
}
// Vertex and Genai have incompatible encryption and sending history with