Address model resolution redundancy in src/config/config.ts

This commit is contained in:
davidapierce
2026-05-11 16:22:27 +00:00
parent 54ca805077
commit 01e6dd13d6

View File

@@ -81,13 +81,11 @@ import { tokenLimit } from '../core/tokenLimits.js';
import {
DEFAULT_GEMINI_EMBEDDING_MODEL,
DEFAULT_GEMINI_FLASH_MODEL,
DEFAULT_GEMINI_MODEL,
DEFAULT_GEMINI_MODEL_AUTO,
isAutoModel,
isPreviewModel,
isGemini2Model,
PREVIEW_GEMINI_FLASH_MODEL,
PREVIEW_GEMINI_MODEL,
resolveModel,
} from './models.js';
import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
@@ -2024,7 +2022,7 @@ export class Config implements McpContext, AgentLoopContext {
);
const isPreview = isPreviewModel(primaryModel, this);
const proModel = isPreview ? PREVIEW_GEMINI_MODEL : DEFAULT_GEMINI_MODEL;
const proModel = primaryModel;
const flashModel = isPreview
? PREVIEW_GEMINI_FLASH_MODEL
: DEFAULT_GEMINI_FLASH_MODEL;