mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 14:10:37 -07:00
@@ -1327,7 +1327,7 @@ describe('loadCliConfig model selection', () => {
|
||||
argv,
|
||||
);
|
||||
|
||||
expect(config.getModel()).toBe(DEFAULT_GEMINI_MODEL);
|
||||
expect(config.getModel()).toBe('auto');
|
||||
});
|
||||
|
||||
it('always prefers model from argv', async () => {
|
||||
@@ -1640,12 +1640,12 @@ describe('loadCliConfig useRipgrep', () => {
|
||||
});
|
||||
|
||||
describe('loadCliConfig useModelRouter', () => {
|
||||
it('should be false by default when useModelRouter is not set in settings', async () => {
|
||||
it('should be true by default when useModelRouter is not set in settings', async () => {
|
||||
process.argv = ['node', 'script.js'];
|
||||
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 () => {
|
||||
|
||||
@@ -542,7 +542,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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1071,7 +1071,7 @@ 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: true,
|
||||
|
||||
Reference in New Issue
Block a user