@@ -9,8 +9,6 @@ import * as os from 'node:os';
99import * as path from 'node:path' ;
1010import {
1111 DEFAULT_FILE_FILTERING_OPTIONS ,
12- DEFAULT_GEMINI_MODEL ,
13- DEFAULT_GEMINI_MODEL_AUTO ,
1412 OutputFormat ,
1513 SHELL_TOOL_NAME ,
1614 WRITE_FILE_TOOL_NAME ,
@@ -1364,100 +1362,6 @@ describe('loadCliConfig model selection', () => {
13641362 } ) ;
13651363} ) ;
13661364
1367- describe ( 'loadCliConfig model selection with model router' , ( ) => {
1368- beforeEach ( ( ) => {
1369- vi . spyOn ( ExtensionManager . prototype , 'getExtensions' ) . mockReturnValue ( [ ] ) ;
1370- } ) ;
1371-
1372- afterEach ( ( ) => {
1373- vi . resetAllMocks ( ) ;
1374- } ) ;
1375-
1376- it ( 'should use auto model when useModelRouter is true and no model is provided' , async ( ) => {
1377- process . argv = [ 'node' , 'script.js' ] ;
1378- const argv = await parseArguments ( { } as Settings ) ;
1379- const config = await loadCliConfig (
1380- {
1381- experimental : {
1382- useModelRouter : true ,
1383- } ,
1384- } ,
1385- 'test-session' ,
1386- argv ,
1387- ) ;
1388-
1389- expect ( config . getModel ( ) ) . toBe ( DEFAULT_GEMINI_MODEL_AUTO ) ;
1390- } ) ;
1391-
1392- it ( 'should use default model when useModelRouter is false and no model is provided' , async ( ) => {
1393- process . argv = [ 'node' , 'script.js' ] ;
1394- const argv = await parseArguments ( { } as Settings ) ;
1395- const config = await loadCliConfig (
1396- {
1397- experimental : {
1398- useModelRouter : false ,
1399- } ,
1400- } ,
1401- 'test-session' ,
1402- argv ,
1403- ) ;
1404-
1405- expect ( config . getModel ( ) ) . toBe ( DEFAULT_GEMINI_MODEL ) ;
1406- } ) ;
1407-
1408- it ( 'should prioritize argv over useModelRouter' , async ( ) => {
1409- process . argv = [ 'node' , 'script.js' , '--model' , 'gemini-from-argv' ] ;
1410- const argv = await parseArguments ( { } as Settings ) ;
1411- const config = await loadCliConfig (
1412- {
1413- experimental : {
1414- useModelRouter : true ,
1415- } ,
1416- } ,
1417- 'test-session' ,
1418- argv ,
1419- ) ;
1420-
1421- expect ( config . getModel ( ) ) . toBe ( 'gemini-from-argv' ) ;
1422- } ) ;
1423-
1424- it ( 'should prioritize settings over useModelRouter' , async ( ) => {
1425- process . argv = [ 'node' , 'script.js' ] ;
1426- const argv = await parseArguments ( { } as Settings ) ;
1427- const config = await loadCliConfig (
1428- {
1429- experimental : {
1430- useModelRouter : true ,
1431- } ,
1432- model : {
1433- name : 'gemini-from-settings' ,
1434- } ,
1435- } ,
1436- 'test-session' ,
1437- argv ,
1438- ) ;
1439-
1440- expect ( config . getModel ( ) ) . toBe ( 'gemini-from-settings' ) ;
1441- } ) ;
1442-
1443- it ( 'should prioritize environment variable over useModelRouter' , async ( ) => {
1444- process . argv = [ 'node' , 'script.js' ] ;
1445- vi . stubEnv ( 'GEMINI_MODEL' , 'gemini-from-env' ) ;
1446- const argv = await parseArguments ( { } as Settings ) ;
1447- const config = await loadCliConfig (
1448- {
1449- experimental : {
1450- useModelRouter : true ,
1451- } ,
1452- } ,
1453- 'test-session' ,
1454- argv ,
1455- ) ;
1456-
1457- expect ( config . getModel ( ) ) . toBe ( 'gemini-from-env' ) ;
1458- } ) ;
1459- } ) ;
1460-
14611365describe ( 'loadCliConfig folderTrust' , ( ) => {
14621366 beforeEach ( ( ) => {
14631367 vi . resetAllMocks ( ) ;
@@ -1633,32 +1537,6 @@ describe('loadCliConfig useRipgrep', () => {
16331537 const config = await loadCliConfig ( settings , 'test-session' , argv ) ;
16341538 expect ( config . getUseRipgrep ( ) ) . toBe ( true ) ;
16351539 } ) ;
1636-
1637- describe ( 'loadCliConfig useModelRouter' , ( ) => {
1638- it ( 'should be true by default when useModelRouter is not set in settings' , async ( ) => {
1639- process . argv = [ 'node' , 'script.js' ] ;
1640- const argv = await parseArguments ( { } as Settings ) ;
1641- const settings : Settings = { } ;
1642- const config = await loadCliConfig ( settings , 'test-session' , argv ) ;
1643- expect ( config . getUseModelRouter ( ) ) . toBe ( true ) ;
1644- } ) ;
1645-
1646- it ( 'should be true when useModelRouter is set to true in settings' , async ( ) => {
1647- process . argv = [ 'node' , 'script.js' ] ;
1648- const argv = await parseArguments ( { } as Settings ) ;
1649- const settings : Settings = { experimental : { useModelRouter : true } } ;
1650- const config = await loadCliConfig ( settings , 'test-session' , argv ) ;
1651- expect ( config . getUseModelRouter ( ) ) . toBe ( true ) ;
1652- } ) ;
1653-
1654- it ( 'should be false when useModelRouter is explicitly set to false in settings' , async ( ) => {
1655- process . argv = [ 'node' , 'script.js' ] ;
1656- const argv = await parseArguments ( { } as Settings ) ;
1657- const settings : Settings = { experimental : { useModelRouter : false } } ;
1658- const config = await loadCliConfig ( settings , 'test-session' , argv ) ;
1659- expect ( config . getUseModelRouter ( ) ) . toBe ( false ) ;
1660- } ) ;
1661- } ) ;
16621540} ) ;
16631541
16641542describe ( 'screenReader configuration' , ( ) => {
0 commit comments