mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-17 01:21:10 -07:00
fix(auth): prioritize GEMINI_API_KEY env var and skip unnecessary key… (#14745)
This commit is contained in:
@@ -66,7 +66,7 @@ export async function createContentGeneratorConfig(
|
||||
authType: AuthType | undefined,
|
||||
): Promise<ContentGeneratorConfig> {
|
||||
const geminiApiKey =
|
||||
(await loadApiKey()) || process.env['GEMINI_API_KEY'] || undefined;
|
||||
process.env['GEMINI_API_KEY'] || (await loadApiKey()) || undefined;
|
||||
const googleApiKey = process.env['GOOGLE_API_KEY'] || undefined;
|
||||
const googleCloudProject =
|
||||
process.env['GOOGLE_CLOUD_PROJECT'] ||
|
||||
|
||||
Reference in New Issue
Block a user