Skip to content

Use cached login credentials for Guardian decisions - #53389

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/10b2e6c28d3268c3808c25b2be94d9b6c31f597a
Oct 12, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/10b2e6c28d3268c3808c25b2be94d9b6c31f597a

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Use cached login credentials for Guardian decisions

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.

## 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
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/10b2e6c28d3268c3808c25b2be94d9b6c31f597a branch from 7fe31af to 27e6192 Compare October 12, 2026 14:08
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot merged commit 27e6192 into main Oct 12, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/10b2e6c28d3268c3808c25b2be94d9b6c31f597a branch October 12, 2026 14:08
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-12T14:08:48.422958Z 7fe31af PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 12, 2026
@jlixfeld
jlixfeld deployed to issue-triage October 12, 2026 14:09 — with Image GitHub Actions Active
@jlixfeld
jlixfeld deployed to issue-triage October 12, 2026 14:09 — with Image GitHub Actions Active
@jlixfeld
jlixfeld deployed to issue-triage October 12, 2026 14:09 — with Image GitHub Actions Active
@roryg246
roryg246 deployed to issue-triage October 12, 2026 14:10 — with Image GitHub Actions Active
@roryg246
roryg246 deployed to issue-triage October 12, 2026 14:10 — with Image GitHub Actions Active
@roryg246
roryg246 deployed to issue-triage October 12, 2026 14:10 — with Image GitHub Actions Active
@Chat-Media
Chat-Media deployed to issue-triage October 12, 2026 14:15 — with Image GitHub Actions Active
@Chat-Media
Chat-Media deployed to issue-triage October 12, 2026 14:15 — with Image GitHub Actions Active

This branch had an error being deployed

1 failed deployment
issue-triage — 27e6192e Deployed Oct 12, 2026 by Chat-Media via Identify potential duplicates (all issues) #54752
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants