Repository navigation
chore(api): declare SSE response contracts for streaming endpoints - #2954
jbeckwith-oai wants to merge 1 commit into
Conversation
Castiron-Internal-PR: openai/openai-node-internal#315 Castiron-Source-SHA: 1758e79e0de8d635048a02e713744665cb6fd1f6 Castiron-Public-Base-SHA: 7665932
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 codeEvaluated main: Trusted main policy: ✅ 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 38925545560 --repo openai/openai-node \
--name castiron-custom-code-38925545560-1 --dir /tmp/castiron-custom-code-38925545560-1
git apply --stat /tmp/castiron-custom-code-38925545560-1/custom-code.patch
cat /tmp/castiron-custom-code-38925545560-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 7665932e2b7965a5e0a3123fe3de4dbdb4131933 f97846d36d17b6df2af0f9e8a6f4ba74875a1014
python3 scripts/castiron/custom_code_report.py report \
--base 7665932e2b7965a5e0a3123fe3de4dbdb4131933 \
--head f97846d36d17b6df2af0f9e8a6f4ba74875a1014 --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-f97846d36d17
cat /tmp/castiron-custom-code-f97846d36d17/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: f97846d36d
ℹ️ 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".
| text/event-stream: | ||
| schema: | ||
| $ref: '#/components/schemas/CreateCompletionResponse' |
There was a problem hiding this comment.
Model nullable usage in completion stream events
When stream: true is combined with stream_options.include_usage, the option's own contract says every non-final chunk includes usage: null, but CreateCompletionResponse.usage only permits a non-null CompletionUsage. Reusing that schema for text/event-stream therefore makes valid completion events fail schema validation and tells generated consumers that any present usage is an object; use a distinct stream-event schema that permits the incomplete wire shape.
AGENTS.md reference: AGENTS.md:L36-L39
Useful? React with 👍 / 👎.
|
Closing this scope expansion. The Java-only handwritten test extraction is already merged in openai/openai-java#1190. |
Summary
Declare
text/event-streamresponses for Completions, stable/beta Responses retrieval, and the three Assistants run operations in the API reference. Existing JSON responses, runtime behavior, public types, compact schemas, and WebSocket customizations remain unchanged.Validation
Pre-promotion CI passed. The historical generation checkpoint was also verified as both a current and previous baseline, and all 95 tooling regression tests passed. This public PR runs its own CI before merge.