Support GOOGLE_API_KEY hoisting in sandbox too (#998)

This commit is contained in:
Mark McDonald 2025-06-13 16:32:15 +08:00 committed by GitHub
parent 7bcc60e996
commit ff478781ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -535,10 +535,13 @@ export async function start_sandbox(sandbox: string) {
const containerName = `${imageName}-${index}`;
args.push('--name', containerName, '--hostname', containerName);
// copy GEMINI_API_KEY
// copy GEMINI_API_KEY(s)
if (process.env.GEMINI_API_KEY) {
args.push('--env', `GEMINI_API_KEY=${process.env.GEMINI_API_KEY}`);
}
if (process.env.GOOGLE_API_KEY) {
args.push('--env', `GOOGLE_API_KEY=${process.env.GOOGLE_API_KEY}`);
}
// copy GEMINI_MODEL
if (process.env.GEMINI_MODEL) {