Skip to content

fix: log only metadata for Live WebSocket diagnostics - #3865

Merged
marcuswood-oai merged 1 commit into
mainfrom
fix/live-websocket-diagnostics
Sep 15, 2026
Merged

marcuswood-oai merged 1 commit into
mainfrom
fix/live-websocket-diagnostics

Conversation

@marcuswood-oai

Copy link
Copy Markdown
Contributor

Aligns Live, forks, and sideband WebSocket diagnostics with the existing SDK logging pattern: message sizes and generic connection and queue-warning messages. Extends sync and async logging coverage.

Validation: 460 related tests passed, plus 84 logging tests with Pydantic v1. Ruff, mypy, changed-file formatting, and wheel/sdist builds pass.

Use message sizes and generic connection and queue warnings across Live, forks, and sideband. Extend the existing sync and async logging tests.
@marcuswood-oai
marcuswood-oai requested a review from a team as a code owner September 15, 2026 19:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-15T20:01:29.469561Z a1b1b1b PR opened
🔒 Security Review ✅ Completed 2026-09-15T20:02:09.373279Z a1b1b1b PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openai-sdks

openai-sdks Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

❌ 234/236 SDK tests passed in 10.629s for Python SDK PR #3865.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 203ms
tests/chat-completions-create.test.ts ✅ Passed 210ms
tests/chat-completions-stream.test.ts ✅ Passed 184ms
tests/files-content-binary.test.ts ✅ Passed 229ms
tests/files-create-multipart.test.ts ✅ Passed 272ms
tests/files-list-pagination.test.ts ✅ Passed 168ms
tests/initialize-config.test.ts ✅ Passed 202ms
tests/instance-isolation.test.ts ✅ Passed 175ms
tests/models-list.test.ts ✅ Passed 179ms
tests/responses-background-lifecycle.test.ts ✅ Passed 152ms
tests/responses-body-method-errors.test.ts ✅ Passed 257ms
tests/responses-cancel-timeout.test.ts ✅ Passed 201ms
tests/responses-cancel.test.ts ✅ Passed 186ms
tests/responses-compact-retries.test.ts ✅ Passed 262ms
tests/responses-compact.test.ts ✅ Passed 198ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 128ms
tests/responses-create-advanced.test.ts ✅ Passed 205ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.184s
tests/responses-create-errors.test.ts ✅ Passed 350ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 189ms
tests/responses-create-retries.test.ts ✅ Passed 302ms
tests/responses-create-stream-failures.test.ts ❌ Failed 606ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 220ms
tests/responses-create-stream-wire.test.ts ❌ Failed 3.489s
tests/responses-create-stream.test.ts ✅ Passed 107ms
tests/responses-create-terminal-states.test.ts ✅ Passed 180ms
tests/responses-create-timeout.test.ts ✅ Passed 188ms
tests/responses-create.test.ts ✅ Passed 292ms
tests/responses-delete.test.ts ✅ Passed 151ms
tests/responses-input-items-errors.test.ts ✅ Passed 258ms
tests/responses-input-items-list.test.ts ✅ Passed 271ms
tests/responses-input-items-options.test.ts ✅ Passed 341ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 217ms
tests/responses-input-tokens-count.test.ts ✅ Passed 202ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.531s
tests/responses-not-found-errors.test.ts ✅ Passed 226ms
tests/responses-parse.test.ts ✅ Passed 363ms
tests/responses-retrieve-retries.test.ts ✅ Passed 320ms
tests/responses-retrieve.test.ts ✅ Passed 200ms
tests/responses-stored-method-errors.test.ts ✅ Passed 498ms
tests/retry-behavior.test.ts ✅ Passed 3.114s
tests/sdk-error-shape.test.ts ✅ Passed 313ms

View OkTest run #35016920002

SDK merge (904f6905ce4b) · head (a1b1b1b40b58) · base (9640f2903d65) · OkTest (08ec4299e769)

@github-actions

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

45 mixed files remain; 3 existing customizations changed.

Compared 9640f2903d65 → a1b1b1b40b58. Generated baselines verified.

File Result Current custom patch
src/openai/resources/live/forks.py Existing customization changed +9 / −9
src/openai/resources/live/live.py Existing customization changed +9 / −9
src/openai/resources/live/sideband.py Existing customization changed +9 / −9
42 existing customizations unchanged
  • api.md
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py
  • src/openai/init.py
  • src/openai/_client.py
  • src/openai/resources/audio/transcriptions.py
  • src/openai/resources/audio/translations.py
  • src/openai/resources/beta/agents/sessions/sessions.py
  • src/openai/resources/beta/beta.py
  • src/openai/resources/beta/responses/responses.py
  • src/openai/resources/beta/threads/runs/runs.py
  • src/openai/resources/beta/threads/threads.py
  • src/openai/resources/chat/completions/completions.py
  • src/openai/resources/embeddings.py
  • src/openai/resources/files.py
  • src/openai/resources/realtime/realtime.py
  • src/openai/resources/responses/responses.py
  • src/openai/resources/uploads/uploads.py
  • src/openai/resources/vector_stores/file_batches.py
  • src/openai/resources/vector_stores/files.py
  • src/openai/resources/videos.py
  • src/openai/resources/webhooks/init.py
  • src/openai/resources/webhooks/webhooks.py
  • src/openai/types/beta/agent_session_message.py
  • src/openai/types/chat/init.py
  • src/openai/types/chat/chat_completion_message_tool_call.py
  • src/openai/types/fine_tuning/fine_tuning_job_integration.py
  • src/openai/types/realtime/conversation_item_input_audio_transcription_delta_event.py
  • src/openai/types/realtime/realtime_error_event.py
  • src/openai/types/responses/init.py
  • src/openai/types/responses/response.py
  • src/openai/types/responses/response_function_web_search.py
  • src/openai/types/responses/response_function_web_search_param.py
  • src/openai/types/responses/responses_client_event.py
  • src/openai/types/responses/responses_client_event_param.py
  • src/openai/types/responses/tool.py
  • src/openai/types/responses/tool_param.py
  • src/openai/types/webhooks/init.py
  • src/openai/types/webhooks/live_call_incoming_webhook_event.py

2 more in the full report.

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download the exact patch produced by this run (requires repository access):

gh run download 35016963532 --repo openai/openai-python \
  --name castiron-custom-code-35016963532-1 --dir /tmp/castiron-custom-code-35016963532-1
git apply --stat /tmp/castiron-custom-code-35016963532-1/custom-code.patch
cat /tmp/castiron-custom-code-35016963532-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin 9640f2903d65c43f0e5aee58d60f46880ff0bd15 a1b1b1b40b5888c7e2a99301a96c4ef5daaf8357
python3 scripts/castiron/custom_code_report.py report \
  --base 9640f2903d65c43f0e5aee58d60f46880ff0bd15 \
  --head a1b1b1b40b5888c7e2a99301a96c4ef5daaf8357 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-a1b1b1b40b58
cat /tmp/castiron-custom-code-a1b1b1b40b58/custom-code.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all six sync/async paths across Live, forks, and sideband plus the expanded shared logging matrix. The change removes payload bytes, URL/query values, connection-option contents, and exception text from logs while retaining useful message-size and generic lifecycle/queue diagnostics. recv(decode=False) provides bytes for the length log, runtime connection/send behavior is untouched, and coverage exercises parsed/raw receives, connection metadata, and queue failures for every applicable surface. Automated code/security reviews and the completed static checks are clean; no blocking issues found.

@markstuart-oai markstuart-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the sync and async Live, Forks, and Sideband receive, connection, and queue-failure paths. The metadata-only messages match the existing SDK convention, and the shared tests retain checks that actual payloads and connection options still reach their consumers. No consequential findings. The production AST is unchanged after removing logging statements, and this stays within the existing implementation without adding an abstraction.

Validation: 121 focused logging, queue, reconnect, and connection-option tests passed locally. An independent 18-case probe, with 18 exact-base controls, checked raw log records, payload/credential delivery, and partial queue-failure ordering and retry behavior. Repository CI passed on Python 3.10/3.14 and HTTPX2 with both Pydantic versions; lint and package builds passed.

The separate OkTest report remains 234/236: two Responses stream tests reject the observed Connection error. text. Those are validation failures outside the changed Live paths, not findings against this patch. No live API/WebSocket validation was performed; the local environment used Pydantic 2.

@marcuswood-oai
marcuswood-oai added this pull request to the merge queue Sep 15, 2026
Merged via the queue into main with commit ccc10f5 Sep 15, 2026
26 checks passed
@marcuswood-oai
marcuswood-oai deleted the fix/live-websocket-diagnostics branch September 15, 2026 20:09
@openai-sdks openai-sdks Bot mentioned this pull request Sep 15, 2026
pull Bot pushed a commit to Pyrex77/openai-python that referenced this pull request Sep 15, 2026
Automated Release PR
---


##
[3.14.1](openai/openai-python@v3.14.0...v3.14.1)
(2026-09-15)


### Bug Fixes

* **client:** validate retry limits and preserve application errors
([openai#3867](openai#3867))
([f86c721](openai@f86c721))
* correct typo "th" to "the" in StreamAlreadyConsumed error message
([openai#3022](openai#3022))
([7186203](openai@7186203))
* **examples:** correct Azure endpoint hostname
([openai#3298](openai#3298))
([543516c](openai@543516c))
* **examples:** refresh chat streaming examples
([openai#2974](openai#2974))
([54f460e](openai@54f460e))
* **examples:** split push-to-talk shebang arguments
([openai#3210](openai#3210))
([d241ed6](openai@d241ed6))
* **examples:** use uv in remaining Python launchers
([openai#3821](openai#3821))
([8c76c4f](openai@8c76c4f))
* log only metadata for Live WebSocket diagnostics
([openai#3865](openai#3865))
([ccc10f5](openai@ccc10f5))
* **responses:** skip structured parsing for commentary
([openai#3861](openai#3861))
([6520df1](openai@6520df1))


### Chores

* **examples:** bump module_client.py to gpt-5.6
([openai#3211](openai#3211))
([1493321](openai@1493321))
* remove unused fine-tuning data validators
([openai#3863](openai#3863))
([9640f29](openai@9640f29))


### Documentation

* clarify async client cleanup
([openai#2388](openai#2388))
([a3d83b5](openai@a3d83b5))
* clarify filenames for in-memory file uploads
([openai#3729](openai#3729))
([cb27380](openai@cb27380))
* **client:** correct retry jitter comment
([openai#2252](openai#2252))
([bdbbc16](openai@bdbbc16))
* fix Realtime docstring wording
([openai#3535](openai#3535))
([8cb9ded](openai@8cb9ded))
* fix reusing wording in Azure client docstrings
([openai#3061](openai#3061))
([dc625f9](openai@dc625f9))
* fix streaming comment typo
([openai#3005](openai#3005))
([d421d7a](openai@d421d7a))
* fix vector store polling helper paths
([openai#3101](openai#3101))
([2ef2de6](openai@2ef2de6))
* **readme:** correct SSE terminology
([openai#2837](openai#2837))
([caaa9b4](openai@caaa9b4))
* update Responses API reference link
([openai#3279](openai#3279))
([557bd06](openai@557bd06))
* **utils:** correct query component RFC reference
([openai#3300](openai#3300))
([929a8a5](openai@929a8a5))

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants