mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
## Why Reading `OPENAI_API_KEY` directly bypasses login credentials reloaded by `AuthManager`. ## What changed Use the API key from `AuthManager`'s cached authentication for Guardian decisions when the provider is `openai` and has no custom base URL. Keep `CODEX_GUARDIAN_DECISIONS_API_KEY` as the highest-priority override. ## Testing Add a regression test covering a reloaded API-key login, override precedence, and rejection of the login-key fallback for a custom base URL. Assertions avoid printing credentials on failure. GitOrigin-RevId: 10b2e6c28d3268c3808c25b2be94d9b6c31f597a