fix: preserve large streaming helper results - #2449
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. 32 mixed files remain; 0 existing customizations changed. Compared 32 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 32603868879 --repo openai/openai-node \
--name castiron-custom-code-32603868879-1 --dir /tmp/castiron-custom-code-32603868879-1
git apply --stat /tmp/castiron-custom-code-32603868879-1/custom-code.patch
cat /tmp/castiron-custom-code-32603868879-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 7b7d6ca71130d37ec09792c50056b47861f2eccf cc13f6c7369ec81f707ec608ecee99387eb2e8de
python3 scripts/castiron/custom_code_report.py report \
--base 7b7d6ca71130d37ec09792c50056b47861f2eccf \
--head cc13f6c7369ec81f707ec608ecee99387eb2e8de --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-cc13f6c7369e
cat /tmp/castiron-custom-code-cc13f6c7369e/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc13f6c736
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
jbeckwith-oai
left a comment
There was a problem hiding this comment.
P1 — Preserve Chat Completions tool-call identity while removing payload caps. The current target base binds each streamed tool-call index to its original function identity, but this rollback removes that security invariant: ChatCompletionStream.ts:819 can replace an established function name while retaining arguments accumulated for another tool, and runTools() then dispatches the newly named callback with those mixed arguments. Historical released behavior does not eliminate this regression against current main. Preserve immutable per-index function type/name validation independently of size limits and add a public runTools regression. Existing discussion: #2449 (comment)
Summary
Extend #2433's large HTTP payload protection to the public Responses and Chat Completions helpers. #2415 introduced new, unreleased limits that reject valid Responses events buffered by an async iterator and Chat Completions structured output above 16 MiB.
Revert #2415's helper queue/structured-parsing limit machinery and its associated serializer observer, restoring the prior behavior without changing longstanding limits. Keep the earlier privacy, prototype-safety, FIFO, and cleanup fixes, and the independent Responses/Assistant identity validation.
Add three sequential, synthetic 32 MiB-plus HTTP contract tests covering blocking Responses JSON, Responses streaming accumulation/structured output/finalResponse()/async iteration, and Chat Completions streaming content/structured output/finalChatCompletion(). The memory use is intentional; no live API calls, large captures, or WebSocket changes.