fix(client): merge HTTP headers case-insensitively - #3486
marcuswood-oai merged 2 commits into
Conversation
|
Thanks for catching this and putting together the fix! We’ve merged main into your branch, narrowed the patch to HTTP header merging, and tightened the tests. Everything we checked is passing—happy to get this in! |
Castiron custom code✅ No new custom-code files detected. 47 mixed files remain; 0 existing customizations changed. Compared 47 existing customizations unchanged
7 more in the full report. A changed generated baseline means this report cannot reliably identify which handwritten lines changed. Inspect the custom-code diffDownload the exact patch produced by this run (requires repository access): gh run download 35894002224 --repo openai/openai-python \
--name castiron-custom-code-35894002224-1 --dir /tmp/castiron-custom-code-35894002224-1
git apply --stat /tmp/castiron-custom-code-35894002224-1/custom-code.patch
cat /tmp/castiron-custom-code-35894002224-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin ead1fa2473257ba5d7be08484aca4349649e6245 9c23e2dda7b4d6f61f3123ad89e01ad0e80e6fa9
python3 scripts/castiron/custom_code_report.py report \
--base ead1fa2473257ba5d7be08484aca4349649e6245 \
--head 9c23e2dda7b4d6f61f3123ad89e01ad0e80e6fa9 --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-9c23e2dda7b4
cat /tmp/castiron-custom-code-9c23e2dda7b4/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
Automated Release PR --- ## [3.19.1](openai/openai-python@v3.19.0...v3.19.1) (2026-09-23) ### Bug Fixes * **chat:** preserve single-pass tool iterables ([openai#3770](openai#3770)) ([33ffa1f](openai@33ffa1f)) * **client:** merge HTTP headers case-insensitively ([openai#3486](openai#3486)) ([5e39766](openai@5e39766)) ### Chores * **api:** clarify Chat Completions seed limits ([openai#3945](openai#3945)) ([be9d666](openai@be9d666)) ### Documentation * clarify collaborator-only pull request policy ([openai#3948](openai#3948)) ([ead1fa2](openai@ead1fa2)) --- 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>
HTTP header names are case-insensitive, but differently cased overrides currently leave duplicate values, and
Omit()can fail to remove an earlier value. Merge HTTP headers case-insensitively so later values replace earlier ones and explicit removal respects casing.The change is limited to HTTP header merging, with one parametrized regression test covering default overrides, per-request overrides, and removal for sync and async clients.
Validation: 807 tests passed across client, authentication, Azure, Bedrock, redirect, and HTTPX compatibility coverage; focused Pydantic v1 checks, Ruff, Pyright, mypy, and the custom-code budget passed.