From 3511e84dc3ecdc121ca657e77859f302d514d271 Mon Sep 17 00:00:00 2001 From: sasha-gitg <44654632+sasha-gitg@users.noreply.github.com> Date: Tue, 27 May 2025 10:00:07 -0700 Subject: fix: default to Gemini API if GEMINI_API_KEY is set and when GOOGLE_GENAI_USE_VERTEXAI is set to True (#566) --- packages/cli/src/config/config.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'packages/cli/src') diff --git a/packages/cli/src/config/config.ts b/packages/cli/src/config/config.ts index 783a1a88..740142f0 100644 --- a/packages/cli/src/config/config.ts +++ b/packages/cli/src/config/config.ts @@ -132,6 +132,7 @@ export async function loadCliConfig(settings: Settings): Promise { const userAgent = await createUserAgent(); const apiKeyForServer = geminiApiKey || googleApiKey || ''; + const useVertexAI = hasGeminiApiKey ? false : undefined; return createServerConfig( apiKeyForServer, @@ -149,6 +150,8 @@ export async function loadCliConfig(settings: Settings): Promise { userAgent, memoryContent, fileCount, + undefined, // alwaysSkipModificationConfirmation - not set by CLI args directly + useVertexAI, ); } -- cgit v1.2.3