Skip to content

fix(api): honor per-call WebSocket query settings - #4138

Merged
markstuart-oai merged 1 commit into
mainfrom
castiron/promotions/pr-303
Oct 21, 2026
Merged

markstuart-oai merged 1 commit into
mainfrom
castiron/promotions/pr-303

Conversation

@markstuart-oai

@markstuart-oai markstuart-oai commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

WebSocket connections now honor per-call query settings across Realtime, Translation, Live, and stable/Beta Responses, including omitted keys and nested values.

The fix preserves released behavior: explicit None stays blank, per-call lists and tuples use repeated keys, and untouched repeated URL values remain intact. Client defaults retain their existing HTTP query encoding. Azure Realtime keeps its required API version and deployment settings.

The Translation close-worker regression also waits for its local peer to start before testing startup failure.

Validation: 186 focused checks pass, along with type and lint checks. Current-head CI passes, including OkTest, and all review threads are resolved.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

Evaluated main: 26e5d926966fc5c7e688790b21d66dc08d35eceb.

Trusted main policy: 26e5d926966fc5c7e688790b21d66dc08d35eceb.

Mixed files: 42 → 46

4 newly customized · 0 customizations removed · 0 existing customizations changed · 14 generated baselines changed

Compared 26e5d926966f → 35a224c58d1e. Generated baselines verified.

File Result Current custom patch
scripts/castiron/custom_code_budget.py Generated baseline changed +37 / −16
scripts/castiron/fixtures/github_publisher.cjs Generated baseline changed +6 / −1
scripts/castiron/test_custom_code_budget.py Generated baseline changed +66 / −4
scripts/castiron/test_custom_code_github.py Generated baseline changed +31 / −0
scripts/castiron/test_custom_code_publication.py Generated baseline changed +26 / −1
scripts/castiron/test_custom_code_report.py Generated baseline changed +491 / −1
src/openai/resources/beta/responses/responses.py Generated baseline changed +55 / −55
src/openai/resources/live/forks.py Generated baseline changed +15 / −18
src/openai/resources/live/live.py Generated baseline changed +11 / −6
src/openai/resources/live/sideband.py Generated baseline changed +15 / −18
src/openai/resources/realtime/realtime.py Generated baseline changed +9 / −3
src/openai/resources/realtime/translations/translations.py Generated baseline changed +34 / −8
src/openai/resources/responses/responses.py Generated baseline changed +920 / −74
tests/api_resources/admin/organization/projects/test_api_keys.py Generated baseline changed +10 / −0
32 existing customizations unchanged
  • api.md
  • 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/environments/files.py
  • src/openai/resources/beta/agents/sessions/artifacts.py
  • src/openai/resources/beta/agents/sessions/sessions.py
  • src/openai/resources/beta/beta.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/api.md
  • 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/decision_input_image_param.py
  • src/openai/types/decision_input_text_param.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/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
  • src/openai/types/webhooks/unwrap_webhook_event.py
  • tests/api_resources/test_videos.py

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 39675509168 --repo openai/openai-python \
  --name castiron-custom-code-39675509168-1 --dir /tmp/castiron-custom-code-39675509168-1
git apply --stat /tmp/castiron-custom-code-39675509168-1/custom-code.patch
cat /tmp/castiron-custom-code-39675509168-1/custom-code.patch

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

git fetch --no-tags origin 26e5d926966fc5c7e688790b21d66dc08d35eceb 35a224c58d1ea2a9af31336061c846b9ead5c938
python3 scripts/castiron/custom_code_report.py report \
  --base 26e5d926966fc5c7e688790b21d66dc08d35eceb \
  --head 35a224c58d1ea2a9af31336061c846b9ead5c938 --target-branch main --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-35a224c58d1e
cat /tmp/castiron-custom-code-35a224c58d1e/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

@markstuart-oai
markstuart-oai force-pushed the castiron/promotions/pr-303 branch 2 times, most recently from b0306dc to ab1a857 Compare October 21, 2026 09:08
@markstuart-oai
markstuart-oai marked this pull request as ready for review October 21, 2026 09:14
@markstuart-oai
markstuart-oai requested a review from a team as a code owner October 21, 2026 09:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-10-21T20:58:42.375839Z 35a224c New commits
🔒 Security Review ✅ Completed 2026-10-21T20:58:18.964295Z 35a224c New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab1a857c61

ℹ️ 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".

Comment thread src/openai/_base_client.py Outdated
@markstuart-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: ab1a857c61

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: ab1a857c61

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@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.

Coordinator and independent static review found no actionable issues. Checked logical default removal before serialization, omit/None and structured values, preservation of untouched repeated URL values, Azure required settings, and managed Translation query propagation through connection/recovery paths. The existing raw-bracket-key finding is consistent with the documented author explanation and HTTP literal-key behavior; no additional change is required for it.

All substantive hosted checks passed, including OkTest. No candidate code or tests were run locally.

@markstuart-oai
markstuart-oai marked this pull request as draft October 21, 2026 09:39
@markstuart-oai
markstuart-oai force-pushed the castiron/promotions/pr-303 branch from ab1a857 to f842807 Compare October 21, 2026 09:55
@markstuart-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@markstuart-oai
markstuart-oai marked this pull request as ready for review October 21, 2026 10:02

@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.

Re-approved after coordinator and independent static re-review. Exact full-tree comparison against the previously approved ab1a857 confirms only two changed helper files. The multi_items filters preserve exact-key removal and untouched repeated query values while replacing repeated removal loops. No actionable issues found.

All substantive hosted checks passed. No candidate code or tests were run locally.

Castiron-Internal-PR: openai/openai-python-internal#303
Castiron-Source-SHA: df11e60f60ebe9acf1cab6c741b66322b11e53b0
Castiron-Public-Base-SHA: 26e5d92
@markstuart-oai
markstuart-oai force-pushed the castiron/promotions/pr-303 branch from f842807 to 35a224c Compare October 21, 2026 20:54

@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.

Re-reviewed 35a224c against previously approved f842807, including an independent static review. No blocking issues found. The new behavior preserves historical per-call blank values for None and repeated keys for lists/tuples, while defaults retain REST encoding. It copies the mapping and sequences before normalization. Existing omission, logical-default replacement, and exact raw-URL key behavior remain intact; WebSocket adapters and managed Translation code are byte-identical to the prior approved version. Regression cases cover blank values, list/tuple items, defaults, and managed Translation.

Hosted CI, including OkTest, is still running; no failures observed. No candidate code or tests were run locally.

@markstuart-oai
markstuart-oai added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit d40a5e1 Oct 21, 2026
34 checks passed
@markstuart-oai
markstuart-oai deleted the castiron/promotions/pr-303 branch October 21, 2026 23:38
@openai-sdks openai-sdks Bot mentioned this pull request Oct 21, 2026
gh-actions-shared Bot pushed a commit to xf-qubit/openai-python that referenced this pull request Oct 22, 2026
Automated Release PR
---


##
[3.36.1](openai/openai-python@v3.36.0...v3.36.1)
(2026-10-22)


### Bug Fixes

* **api:** honor per-call WebSocket query settings
([openai#4138](openai#4138))
([d40a5e1](openai@d40a5e1))
* **examples:** stop microphone capture between recordings
([openai#4143](openai#4143))
([26e5d92](openai@26e5d92))
* validate browser calls before reading driver state
([openai#4142](openai#4142))
([2bfe460](openai@2bfe460))


### Chores

* **api:** clarify service-account API key deletion
([openai#4151](openai#4151))
([6ed945e](openai@6ed945e))


### Refactors

* prepare handwritten chunked upload runtime
([openai#4146](openai#4146))
([2d58e82](openai@2d58e82))
* prepare handwritten vector-store polling runtime
([openai#4148](openai#4148))
([7cd7028](openai@7cd7028))

---
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