Repository navigation
chore(api): clarify project API key update requirements - #4125
jbeckwith-oai wants to merge 1 commit into
Conversation
Castiron-Internal-PR: openai/openai-python-internal#272 Castiron-Source-SHA: 89c1b91db57c88f47d988a6955298e021bbb25f2 Castiron-Public-Base-SHA: 0e5794d
Castiron custom codeEvaluated main: Trusted main policy: ✅ No new custom-code files detected. 39 mixed files remain; 0 existing customizations changed; 7 generated baselines 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 39377013723 --repo openai/openai-python \
--name castiron-custom-code-39377013723-1 --dir /tmp/castiron-custom-code-39377013723-1
git apply --stat /tmp/castiron-custom-code-39377013723-1/custom-code.patch
cat /tmp/castiron-custom-code-39377013723-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 0e5794dc48b8f8d51f6047f8a0b1814eb1e65850 cdae93b974ab2963e8b353c840f2c6f91558c3b7
python3 scripts/castiron/custom_code_report.py report \
--base 0e5794dc48b8f8d51f6047f8a0b1814eb1e65850 \
--head cdae93b974ab2963e8b353c840f2c6f91558c3b7 --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-cdae93b974ab
cat /tmp/castiron-custom-code-cdae93b974ab/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
dpiet-oai
left a comment
There was a problem hiding this comment.
- [P2] Preserve the default WebSocket receive-size limit — src/openai/resources/responses/responses.py:4468–4471 (and the equivalent changes in the other WebSocket managers). Setting
max_size=Nonewhen the caller omits it disables the transport's existing receive-size limit; this is a runtime change, not merely an annotation refresh. A malformed or unexpectedly large server message can now be buffered without a size bound instead of closing the connection when the limit is exceeded, including when it arrives across many fragments. Disabling compression does not bound that allocation, and callers explicitly selectingcompression="deflate"now also lose the previously inherited limit on decompressed messages. Preserve the transport default whenmax_sizeis omitted and retain explicitmax_size=Noneas the caller's opt-in for unlimited messages, rather than silently removing the guard across all synchronous and asynchronous WebSocket APIs.
markstuart-oai
left a comment
There was a problem hiding this comment.
Reviewed cdae93b. No additional blocking findings.
The schema constraint, valid update-test bodies, shared reporting changes, and synchronous option types look sound. Entry cleanup closes the opened socket and preserves the original failure. Caller-supplied receive-size and compression options still take precedence without mutating the input mapping.
Omitting max_size now permits unlimited messages, and omitted compression is disabled in that case. This is a real behavior change, not just an annotation update. I considered the existing receive-limit review and the large-payload guidance; proportional buffering alone does not establish another blocking defect. The existing review and draft status remain unresolved by this approval.
Nonblocking: update the compression option documentation, which still says permessage-deflate is enabled by default. A focused test for omitted and explicit options would also make this changed contract clearer.
All current hosted checks are successful or skipped. I reviewed source and hosted CI without running the candidate locally.
Project API-key updates require scopes, an expiration, or both. Record this existing rule with required-only
anyOf, and supply a valid scopes body in the generated synchronous and asynchronous update tests.Regeneration also refreshes shared CI reporting and adds explicit type annotations to WebSocket connection options and reporter tests. Existing request types are preserved. The generated WebSocket code also changes the default receive-size limit when callers omit
max_size; that behavior is under review and this draft is not ready to merge.Validation: internal current-head CI is green; public CI passed; generated ownership verification and the trusted public-main custom-code budget check pass (7,351 / 10,000 lines). Two independent review rounds are clean.