test: protect large HTTP payload compatibility - #3721
Conversation
Codex Review SummaryThis 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. |
Castiron custom code✅ No new custom-code files detected. 34 mixed files remain; 0 existing customizations changed. Compared 34 existing customizations unchanged
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 32603784169 --repo openai/openai-python \
--name castiron-custom-code-32603784169-1 --dir /tmp/castiron-custom-code-32603784169-1
git apply --stat /tmp/castiron-custom-code-32603784169-1/custom-code.patch
cat /tmp/castiron-custom-code-32603784169-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin e43b422412a9e96c9cc5192c61fffbe2d7e04836 618c5f022cdc4bdabebc82eb9df522c0d58689c6
python3 scripts/castiron/custom_code_report.py report \
--base e43b422412a9e96c9cc5192c61fffbe2d7e04836 \
--head 618c5f022cdc4bdabebc82eb9df522c0d58689c6 --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-618c5f022cdc
cat /tmp/castiron-custom-code-618c5f022cdc/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
Summary
Protect the current and recent releases’ support for large valid HTTP responses across Responses and Chat Completions. The payload guidance follows openai-node#2433: supported API output should not gain new arbitrary body, event, or line rejection limits as a side effect of security or performance fixes.
Add a deterministic public-entrypoint contract test with synthetic 32 MiB+1 text. It covers blocking Responses
output_text, structured JSON parsing in both APIs, streamed Responses deltas and final responses, and Chat Completions' partial-JSON accumulation and final parsed completion. The cases run sequentially in one test so pytest workers do not multiply their memory cost. The intentional payload size is a regression probe, not an API maximum; fixtures stay in memory and use no live API or real credentials.The existing HTTP paths accept these payloads, so this PR changes only agent guidance and a standalone repository-owned test. It makes no runtime, dependency, generation, or custom-code budget changes. WebSockets are outside this PR's scope.