mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-30 01:26:35 +00:00
# feat(routing): Introduce useModelRouter feature flag (#8366)
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
||||
getCurrentGeminiMdFilename,
|
||||
ApprovalMode,
|
||||
DEFAULT_GEMINI_MODEL,
|
||||
DEFAULT_GEMINI_MODEL_AUTO,
|
||||
DEFAULT_GEMINI_EMBEDDING_MODEL,
|
||||
DEFAULT_MEMORY_FILE_FILTERING_OPTIONS,
|
||||
FileDiscoveryService,
|
||||
@@ -98,7 +99,6 @@ export async function parseArguments(settings: Settings): Promise<CliArgs> {
|
||||
alias: 'm',
|
||||
type: 'string',
|
||||
description: `Model`,
|
||||
default: process.env['GEMINI_MODEL'],
|
||||
})
|
||||
.option('prompt', {
|
||||
alias: 'p',
|
||||
@@ -550,6 +550,16 @@ export async function loadCliConfig(
|
||||
);
|
||||
}
|
||||
|
||||
const useModelRouter = settings.experimental?.useModelRouter ?? false;
|
||||
const defaultModel = useModelRouter
|
||||
? DEFAULT_GEMINI_MODEL_AUTO
|
||||
: DEFAULT_GEMINI_MODEL;
|
||||
const resolvedModel: string =
|
||||
argv.model ||
|
||||
process.env['GEMINI_MODEL'] ||
|
||||
settings.model?.name ||
|
||||
defaultModel;
|
||||
|
||||
const sandboxConfig = await loadSandboxConfig(settings, argv);
|
||||
const screenReader =
|
||||
argv.screenReader !== undefined
|
||||
@@ -611,7 +621,7 @@ export async function loadCliConfig(
|
||||
cwd,
|
||||
fileDiscoveryService: fileService,
|
||||
bugCommand: settings.advanced?.bugCommand,
|
||||
model: argv.model || settings.model?.name || DEFAULT_GEMINI_MODEL,
|
||||
model: resolvedModel,
|
||||
extensionContextFilePaths,
|
||||
maxSessionTurns: settings.model?.maxSessionTurns ?? -1,
|
||||
experimentalZedIntegration: argv.experimentalAcp || false,
|
||||
@@ -637,6 +647,7 @@ export async function loadCliConfig(
|
||||
output: {
|
||||
format: (argv.outputFormat ?? settings.output?.format) as OutputFormat,
|
||||
},
|
||||
useModelRouter,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user