mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-11 06:31:01 -07:00
feat(cli): Enable model router by default and add to settings dialog (#9262)
This commit is contained in:
@@ -1485,7 +1485,7 @@ describe('loadCliConfig model selection', () => {
|
||||
argv,
|
||||
);
|
||||
|
||||
expect(config.getModel()).toBe('gemini-2.5-pro');
|
||||
expect(config.getModel()).toBe(DEFAULT_GEMINI_MODEL_AUTO);
|
||||
});
|
||||
|
||||
it('always prefers model from argvs', async () => {
|
||||
@@ -1803,7 +1803,7 @@ describe('loadCliConfig useRipgrep', () => {
|
||||
const argv = await parseArguments({} as Settings);
|
||||
const settings: Settings = {};
|
||||
const config = await loadCliConfig(settings, [], 'test-session', argv);
|
||||
expect(config.getUseModelRouter()).toBe(false);
|
||||
expect(config.getUseModelRouter()).toBe(true);
|
||||
});
|
||||
|
||||
it('should be true when useModelRouter is set to true in settings', async () => {
|
||||
|
||||
@@ -587,7 +587,7 @@ export async function loadCliConfig(
|
||||
);
|
||||
}
|
||||
|
||||
const useModelRouter = settings.experimental?.useModelRouter ?? false;
|
||||
const useModelRouter = settings.experimental?.useModelRouter ?? true;
|
||||
const defaultModel = useModelRouter
|
||||
? DEFAULT_GEMINI_MODEL_AUTO
|
||||
: DEFAULT_GEMINI_MODEL;
|
||||
|
||||
@@ -328,7 +328,7 @@ describe('SettingsSchema', () => {
|
||||
).toBe('Experimental');
|
||||
expect(
|
||||
getSettingsSchema().experimental.properties.useModelRouter.default,
|
||||
).toBe(false);
|
||||
).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -986,10 +986,10 @@ const SETTINGS_SCHEMA = {
|
||||
label: 'Use Model Router',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
default: true,
|
||||
description:
|
||||
'Enable model routing to route requests to the best model based on complexity.',
|
||||
showInDialog: false,
|
||||
showInDialog: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -342,7 +342,7 @@ describe('SettingsDialog', () => {
|
||||
|
||||
await wait();
|
||||
|
||||
expect(lastFrame()).toContain('● Folder Trust');
|
||||
expect(lastFrame()).toContain('● Use Model Router');
|
||||
|
||||
unmount();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user