Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/cli/src/config/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@
const config = await loadCliConfig(
{
model: {
name: 'gemini-9001-ultra',

Check warning on line 1307 in packages/cli/src/config/config.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Found sensitive keyword "gemini-9001". Please make sure this change is appropriate to submit.
},
},
[],
Expand All @@ -1312,7 +1312,7 @@
argv,
);

expect(config.getModel()).toBe('gemini-9001-ultra');

Check warning on line 1315 in packages/cli/src/config/config.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Found sensitive keyword "gemini-9001". Please make sure this change is appropriate to submit.
});

it('uses the default gemini model if nothing is set', async () => {
Expand All @@ -1327,16 +1327,16 @@
argv,
);

expect(config.getModel()).toBe('auto');
expect(config.getModel()).toBe(DEFAULT_GEMINI_MODEL);
});

it('always prefers model from argv', async () => {
process.argv = ['node', 'script.js', '--model', 'gemini-8675309-ultra'];

Check warning on line 1334 in packages/cli/src/config/config.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Found sensitive keyword "gemini-8675309". Please make sure this change is appropriate to submit.
const argv = await parseArguments({} as Settings);
const config = await loadCliConfig(
{
model: {
name: 'gemini-9001-ultra',

Check warning on line 1339 in packages/cli/src/config/config.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Found sensitive keyword "gemini-9001". Please make sure this change is appropriate to submit.
},
},
[],
Expand All @@ -1344,11 +1344,11 @@
argv,
);

expect(config.getModel()).toBe('gemini-8675309-ultra');

Check warning on line 1347 in packages/cli/src/config/config.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Found sensitive keyword "gemini-8675309". Please make sure this change is appropriate to submit.
});

it('selects the model from argv if provided', async () => {
process.argv = ['node', 'script.js', '--model', 'gemini-8675309-ultra'];

Check warning on line 1351 in packages/cli/src/config/config.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Found sensitive keyword "gemini-8675309". Please make sure this change is appropriate to submit.
const argv = await parseArguments({} as Settings);
const config = await loadCliConfig(
{
Expand All @@ -1359,7 +1359,7 @@
argv,
);

expect(config.getModel()).toBe('gemini-8675309-ultra');

Check warning on line 1362 in packages/cli/src/config/config.test.ts

View workflow job for this annotation

GitHub Actions / Lint

Found sensitive keyword "gemini-8675309". Please make sure this change is appropriate to submit.
});
});

Expand Down Expand Up @@ -1640,12 +1640,12 @@
});

describe('loadCliConfig useModelRouter', () => {
it('should be true by default when useModelRouter is not set in settings', async () => {
it('should be false 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(true);
expect(config.getUseModelRouter()).toBe(false);
});

it('should be true when useModelRouter is set to true in settings', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ export async function loadCliConfig(
);
}

const useModelRouter = settings.experimental?.useModelRouter ?? true;
const useModelRouter = settings.experimental?.useModelRouter ?? false;
const defaultModel = useModelRouter
? DEFAULT_GEMINI_MODEL_AUTO
: DEFAULT_GEMINI_MODEL;
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/config/settingsSchema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ describe('SettingsSchema', () => {
).toBe('Experimental');
expect(
getSettingsSchema().experimental.properties.useModelRouter.default,
).toBe(true);
).toBe(false);
});
});
});
2 changes: 1 addition & 1 deletion packages/cli/src/config/settingsSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ const SETTINGS_SCHEMA = {
label: 'Use Model Router',
category: 'Experimental',
requiresRestart: true,
default: true,
default: false,
description:
'Enable model routing to route requests to the best model based on complexity.',
showInDialog: true,
Expand Down