Update to model resolution

This commit is contained in:
davidapierce
2026-05-11 18:01:34 +00:00
parent d93455414d
commit e22cb3e16e
2 changed files with 22 additions and 5 deletions

View File

@@ -364,7 +364,7 @@ export const DEFAULT_MODEL_CONFIGS: ModelConfigServiceConfig = {
auto: {
displayName: 'Auto',
tier: 'auto',
isPreview: false,
isPreview: true,
isVisible: true,
dialogDescription: 'Let Gemini CLI decide the best model for the task.',
features: { thinking: true, multimodalToolUse: false },
@@ -526,7 +526,11 @@ export const DEFAULT_MODEL_CONFIGS: ModelConfigServiceConfig = {
default: 'gemini-3-flash-preview',
contexts: [
{
condition: { requestedModels: ['gemini-2.5-pro'] },
condition: { hasAccessToPreview: false },
target: 'gemini-2.5-flash',
},
{
condition: { requestedModels: ['gemini-2.5-pro', 'auto-gemini-2.5'] },
target: 'gemini-2.5-flash',
},
],
@@ -534,12 +538,16 @@ export const DEFAULT_MODEL_CONFIGS: ModelConfigServiceConfig = {
pro: {
default: 'gemini-3-pro-preview',
contexts: [
{
condition: { hasAccessToPreview: false },
target: 'gemini-2.5-pro',
},
{
condition: { releaseChannel: 'stable', requestedModels: ['auto'] },
target: 'gemini-2.5-pro',
},
{
condition: { requestedModels: ['gemini-2.5-pro'] },
condition: { requestedModels: ['gemini-2.5-pro', 'auto-gemini-2.5'] },
target: 'gemini-2.5-pro',
},
{

View File

@@ -248,15 +248,24 @@ export function resolveClassifierModel(
requestedModel === PREVIEW_GEMINI_MODEL ||
requestedModel === GEMINI_MODEL_ALIAS_AUTO
) {
return PREVIEW_GEMINI_FLASH_MODEL;
return hasAccessToPreview
? PREVIEW_GEMINI_FLASH_MODEL
: DEFAULT_GEMINI_FLASH_MODEL;
}
return resolveModel(GEMINI_MODEL_ALIAS_FLASH);
return resolveModel(
GEMINI_MODEL_ALIAS_FLASH,
false,
false,
false,
hasAccessToPreview,
);
}
return resolveModel(
requestedModel,
useGemini3_1,
useGemini3_1FlashLite,
useCustomToolModel,
hasAccessToPreview,
);
}