mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
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:
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user