Support CODEX_API_KEY for codex exec (#4615)

Allows to set API key per invocation of `codex exec`
This commit is contained in:
pakrym-oai
2025-10-02 09:59:45 -07:00
committed by GitHub
parent 35c76ad47d
commit 2f6fb37d72
13 changed files with 109 additions and 68 deletions

View File

@@ -58,7 +58,7 @@ export class CodexExec {
env.OPENAI_BASE_URL = args.baseUrl;
}
if (args.apiKey) {
env.OPENAI_API_KEY = args.apiKey;
env.CODEX_API_KEY = args.apiKey;
}
const child = spawn(this.executablePath, commandArgs, {