fix: unset GEMINI_API_KEY env var if empty (#7214)

This commit is contained in:
Gaurav
2025-08-27 06:20:14 -07:00
committed by GitHub
parent ed68f8f03e
commit 83a40ff9d4

View File

@@ -227,6 +227,14 @@ export async function main() {
); );
} }
} }
// Empty key causes issues with the GoogleGenAI package.
if (process.env['GEMINI_API_KEY']?.trim() === '') {
delete process.env['GEMINI_API_KEY'];
}
if (process.env['GOOGLE_API_KEY']?.trim() === '') {
delete process.env['GOOGLE_API_KEY'];
}
setMaxSizedBoxDebugging(config.getDebugMode()); setMaxSizedBoxDebugging(config.getDebugMode());