Repository navigation
fix: redact credential headers on API error requests - #4316
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Reviewed f67b2d5. No actionable code findings after comprehensive static review with an independent reviewer.
Checked case-insensitive removal of the existing sensitive-header set, preservation of transport originals and upload streams, shared error/request identity, redirect history and pending redirects, and status/validation/connection error paths. The intentional change to requests recovered from errors is documented: callers must reapply authentication when resending. This is limited to the stated public request attributes and known headers.
Hosted CI currently reports 12 successful, 9 skipped, 4 running checks and one failure. OkTest failed during secret-broker setup before SDK tests ran; its report requests rerunning all jobs: https://github.com/openai/ok-test/actions/runs/45253107999/attempts/1 . This is not evidence of a candidate test failure. Retaining CI follow-up. No candidate code or local tests executed.
Hosted CI update (2026-11-23): all reported checks finished: 16 successful, 9 skipped, and the previously identified OkTest setup failure. The SDK test jobs passed; OkTest still needs a successful rerun. No local tests were run.
Hosted CI rerun update (2026-11-23): OkTest passed. All 26 reported checks are complete: 17 successful and 9 skipped. The earlier setup failure is resolved. No local tests were run.
Automated Release PR --- ## [3.59.0](openai/openai-python@v3.58.0...v3.59.0) (2026-11-24) ### Features * **api:** add healthcare model IDs for Responses ([openai#4327](openai#4327)) ([804a9af](openai@804a9af)) ### Bug Fixes * check the agent upload directory after path resolution ([openai#4323](openai#4323)) ([bc02da4](openai@bc02da4)) * redact credential headers on API error requests ([openai#4316](openai#4316)) ([9d7f58e](openai@9d7f58e)) * reject empty webhook signing keys ([openai#4321](openai#4321)) ([dd69803](openai@dd69803)) * reject non-finite numbers in agent tool arguments ([openai#4326](openai#4326)) ([abbd379](openai@abbd379)) * use bearer authentication for beta Realtime sessions ([openai#4317](openai#4317)) ([7596fb8](openai@7596fb8)) ### Documentation * explain how to skip duplicate webhook events ([openai#4325](openai#4325)) ([6805f05](openai@6805f05)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: openai-sdks[bot] <284451331+openai-sdks[bot]@users.noreply.github.com>
Use the existing sensitive-header list for request copies attached to API errors. Both
error.requestanderror.response.requestpoint to the same copy. Redirect history and pending redirects follow the same rule. The transport keeps its original request.Callers that resend a request from an error must reapply authentication. This change is limited to known request headers on these public attributes.
Verified with sync and async client, streaming, authentication, and redirect tests (654 passed, 36 skipped), Ruff, and ty.