mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +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:
parent
b3f52e215a
commit
3511e84dc3
3 changed files with 13 additions and 0 deletions
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue