mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-04 00:44:05 -07:00
Add ModelChain support to ModelConfigService and make ModelDialog dynamic (#22914)
This commit is contained in:
@@ -102,11 +102,24 @@ export function resolveModel(
|
||||
config?: ModelCapabilityContext,
|
||||
): string {
|
||||
if (config?.getExperimentalDynamicModelConfiguration?.() === true) {
|
||||
return config.modelConfigService.resolveModelId(requestedModel, {
|
||||
const resolved = config.modelConfigService.resolveModelId(requestedModel, {
|
||||
useGemini3_1,
|
||||
useCustomTools: useCustomToolModel,
|
||||
hasAccessToPreview,
|
||||
});
|
||||
|
||||
if (!hasAccessToPreview && isPreviewModel(resolved, config)) {
|
||||
// Fallback for unknown preview models.
|
||||
if (resolved.includes('flash-lite')) {
|
||||
return DEFAULT_GEMINI_FLASH_LITE_MODEL;
|
||||
}
|
||||
if (resolved.includes('flash')) {
|
||||
return DEFAULT_GEMINI_FLASH_MODEL;
|
||||
}
|
||||
return DEFAULT_GEMINI_MODEL;
|
||||
}
|
||||
|
||||
return resolved;
|
||||
}
|
||||
|
||||
let resolved: string;
|
||||
|
||||
Reference in New Issue
Block a user