fix: default to Gemini API if GEMINI_API_KEY is set and when GOOGLE_GENAI_USE_VERTEXAI is set to True (#566)

This commit is contained in:
sasha-gitg
2025-05-27 10:00:07 -07:00
committed by GitHub
parent b3f52e215a
commit 3511e84dc3
3 changed files with 13 additions and 0 deletions

View File

@@ -132,6 +132,7 @@ export async function loadCliConfig(settings: Settings): Promise<Config> {
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<Config> {
userAgent,
memoryContent,
fileCount,
undefined, // alwaysSkipModificationConfirmation - not set by CLI args directly
useVertexAI,
);
}