fix: unset GEMINI_API_KEY env var if empty (#7214)
This commit is contained in:
parent
ed68f8f03e
commit
83a40ff9d4
1 changed files with 8 additions and 0 deletions
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue