From 83d0bdc32e997d4bc04820e45ee453084b24d47f Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Thu, 20 Nov 2025 20:08:37 +0000 Subject: [PATCH] feat(zed-integration): Use default model routing for Zed integration (#13398) Co-authored-by: Shreya Keshive --- .../cli/src/zed-integration/zedIntegration.ts | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/packages/cli/src/zed-integration/zedIntegration.ts b/packages/cli/src/zed-integration/zedIntegration.ts index 426b4e1305..43f8bb8a73 100644 --- a/packages/cli/src/zed-integration/zedIntegration.ts +++ b/packages/cli/src/zed-integration/zedIntegration.ts @@ -27,11 +27,9 @@ import { DiscoveredMCPTool, StreamEventType, ToolCallEvent, - DEFAULT_GEMINI_MODEL, - DEFAULT_GEMINI_MODEL_AUTO, - DEFAULT_GEMINI_FLASH_MODEL, debugLogger, ReadManyFilesTool, + getEffectiveModel, } from '@google/gemini-cli-core'; import * as acp from './acp.js'; import { AcpFileSystemService } from './fileSystemService.js'; @@ -47,19 +45,6 @@ import { randomUUID } from 'node:crypto'; import type { CliArgs } from '../config/config.js'; import { loadCliConfig } from '../config/config.js'; -/** - * Resolves the model to use based on the current configuration. - * - * If the model is set to "auto", it will use the flash model if in fallback - * mode, otherwise it will use the default model. - */ -export function resolveModel(model: string, isInFallbackMode: boolean): string { - if (model === DEFAULT_GEMINI_MODEL_AUTO) { - return isInFallbackMode ? DEFAULT_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_MODEL; - } - return model; -} - export async function runZedIntegration( config: Config, settings: LoadedSettings, @@ -264,9 +249,10 @@ class Session { const functionCalls: FunctionCall[] = []; try { - const model = resolveModel( - this.config.getModel(), + const model = getEffectiveModel( this.config.isInFallbackMode(), + this.config.getModel(), + this.config.getPreviewFeatures(), ); const responseStream = await chat.sendMessageStream( { model },