Repository navigation
fix: preserve beta Realtime byte reads on websockets 13 - #4102
Conversation
Castiron custom codeEvaluated main: Trusted main policy: ✅ No new custom-code files detected. 41 mixed files remain; 0 existing customizations changed. Compared 41 existing customizations unchanged
1 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 39081737141 --repo openai/openai-python \
--name castiron-custom-code-39081737141-1 --dir /tmp/castiron-custom-code-39081737141-1
git apply --stat /tmp/castiron-custom-code-39081737141-1/custom-code.patch
cat /tmp/castiron-custom-code-39081737141-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin ab914006a2f520c5d63a69a60b40725ca5c72459 f6ca372f5d5153448f5f641d1fc7d73794a09b27
python3 scripts/castiron/custom_code_report.py report \
--base ab914006a2f520c5d63a69a60b40725ca5c72459 \
--head f6ca372f5d5153448f5f641d1fc7d73794a09b27 --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-f6ca372f5d51
cat /tmp/castiron-custom-code-f6ca372f5d51/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
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. |
jbeckwith-oai
left a comment
There was a problem hiding this comment.
The legacy beta recv_bytes wrapper correctly uses the existing websockets 13 compatibility helper, preserving text and binary results. Reviewed wire tests for redirects, credential refresh/override, and cleanup. No findings. Hosted checks passed, with conditional jobs skipped. Static source review only; no candidate code or tests executed.
Automated Release PR --- ## [3.35.1](openai/openai-python@v3.35.0...v3.35.1) (2026-10-18) ### Bug Fixes * preserve beta Realtime byte reads on websockets 13 ([openai#4102](openai#4102)) ([5766349](openai@5766349)) --- 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>
Why
Synchronous beta Realtime calls
recv(decode=False), but the supported websockets 13.x sync API has nodecodeargument. Receiving a message therefore raises TypeError.High-level description
Use the existing SDK byte-receive helper, as the other synchronous APIs already do. Extend the real-socket text/binary regression to beta Realtime, including the legacy dependency signature. Add wire-level tests across all eight connection entrypoints for sync/async redirects, fresh credentials, explicit header precedence, events, and cleanup. Preserve current redirect and connection behavior.
Validation
All 191 tests in the two focused modules pass with both websockets 13.1 and 15.0.1. The unpatched published SDK 3.35.0 reproduces the beta receive failure on 13.1 (two failing wire cases); with 15.0.1 it passes all 64 new wire cases and 263 existing functional cases. Ruff checks pass. All servers are local and credentials synthetic; no hosted tests.
Release note
Fix synchronous beta Realtime message reception when using websockets 13.x. Public signatures and returned bytes remain unchanged.
A locally built wheel containing this fix also passes all 64 new connection cases with websockets 13.1 when installed outside the source tree. Focused Pyright checks pass.
Current CI checks