Skip to content

fix(api): declare Realtime response error messages - #4083

Merged
jbeckwith-oai merged 1 commit into
mainfrom
castiron/promotions/pr-219
Oct 15, 2026
Merged

jbeckwith-oai merged 1 commit into
mainfrom
castiron/promotions/pr-219

Conversation

@yoni-oai

@yoni-oai yoni-oai commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds an optional message field to Realtime response status errors.

Changes

  • Expose the human-readable error message on Realtime response status details.
  • Default omitted error messages to None.

Fixes #2502.

Castiron-Internal-PR: openai/openai-python-internal#219
Castiron-Source-SHA: d22cefa058252d4c50c0930f7630031476e0f769
Castiron-Public-Base-SHA: 21ce0c2
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

Evaluated main: 21ce0c2eae47b389f25d79095d2ac5aec7812806.

✅ No new custom-code files detected.

40 mixed files remain; 0 existing customizations changed.

Compared 21ce0c2eae47 → 11cd7003fdaf. Generated baselines verified.

40 existing customizations unchanged
  • api.md
  • scripts/castiron/custom_code_budget.py
  • scripts/castiron/test_custom_code_github.py
  • scripts/castiron/test_custom_code_publication.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/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/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/live/forks.py
  • src/openai/resources/live/live.py
  • src/openai/resources/live/sideband.py
  • src/openai/resources/realtime/api.md
  • 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/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 38655762185 --repo openai/openai-python \
  --name castiron-custom-code-38655762185-1 --dir /tmp/castiron-custom-code-38655762185-1
git apply --stat /tmp/castiron-custom-code-38655762185-1/custom-code.patch
cat /tmp/castiron-custom-code-38655762185-1/custom-code.patch

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

git fetch --no-tags origin 21ce0c2eae47b389f25d79095d2ac5aec7812806 11cd7003fdaf74248e09d8abb832c24d206a69cc
python3 scripts/castiron/custom_code_report.py report \
  --base 21ce0c2eae47b389f25d79095d2ac5aec7812806 \
  --head 11cd7003fdaf74248e09d8abb832c24d206a69cc --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-11cd7003fdaf
cat /tmp/castiron-custom-code-11cd7003fdaf/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

@yoni-oai
yoni-oai marked this pull request as ready for review October 14, 2026 23:39
@yoni-oai
yoni-oai requested a review from a team as a code owner October 14, 2026 23:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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-14T23:40:47.124498Z 11cd700 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-14T23:42:05.828263Z 11cd700 Draft marked ready
ℹ️ 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 Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 6.808s for Python SDK PR #4083.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 161ms
tests/chat-completions-create.test.ts ✅ Passed 154ms
tests/chat-completions-stream.test.ts ✅ Passed 114ms
tests/files-content-binary.test.ts ✅ Passed 152ms
tests/files-create-multipart.test.ts ✅ Passed 145ms
tests/files-list-pagination.test.ts ✅ Passed 91ms
tests/initialize-config.test.ts ✅ Passed 149ms
tests/instance-isolation.test.ts ✅ Passed 127ms
tests/models-list.test.ts ✅ Passed 206ms
tests/responses-background-lifecycle.test.ts ✅ Passed 121ms
tests/responses-body-method-errors.test.ts ✅ Passed 218ms
tests/responses-cancel-timeout.test.ts ✅ Passed 181ms
tests/responses-cancel.test.ts ✅ Passed 120ms
tests/responses-compact-retries.test.ts ✅ Passed 257ms
tests/responses-compact.test.ts ✅ Passed 176ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 131ms
tests/responses-create-advanced.test.ts ✅ Passed 124ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.172s
tests/responses-create-errors.test.ts ✅ Passed 148ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 158ms
tests/responses-create-retries.test.ts ✅ Passed 418ms
tests/responses-create-stream-failures.test.ts ✅ Passed 88ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 174ms
tests/responses-create-stream-wire.test.ts ✅ Passed 1.429s
tests/responses-create-stream.test.ts ✅ Passed 91ms
tests/responses-create-terminal-states.test.ts ✅ Passed 211ms
tests/responses-create-timeout.test.ts ✅ Passed 180ms
tests/responses-create.test.ts ✅ Passed 179ms
tests/responses-delete.test.ts ✅ Passed 151ms
tests/responses-input-items-errors.test.ts ✅ Passed 327ms
tests/responses-input-items-list.test.ts ✅ Passed 202ms
tests/responses-input-items-options.test.ts ✅ Passed 166ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 215ms
tests/responses-input-tokens-count.test.ts ✅ Passed 132ms
tests/responses-malformed-inputs.test.ts ✅ Passed 772ms
tests/responses-not-found-errors.test.ts ✅ Passed 170ms
tests/responses-parse.test.ts ✅ Passed 159ms
tests/responses-retrieve-retries.test.ts ✅ Passed 132ms
tests/responses-retrieve.test.ts ✅ Passed 143ms
tests/responses-stored-method-errors.test.ts ✅ Passed 355ms
tests/retry-behavior.test.ts ✅ Passed 2.984s
tests/sdk-error-shape.test.ts ✅ Passed 215ms

View OkTest run #38655402582

SDK merge (cef909776fdb) · head (11cd7003fdaf) · base (21ce0c2eae47) · OkTest (63b471b22245)

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

Both stable and beta response models expose the optional message field through their public response types. Existing errors without a message remain valid, and the change does not add a separate parsing or transport path. No blocking findings.

Validation: immutable source review and current-head hosted CI; all reported native checks passed or were skipped. I did not run local tests.

@jbeckwith-oai
jbeckwith-oai added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit 95dbee9 Oct 15, 2026
35 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the castiron/promotions/pr-219 branch October 15, 2026 00:39
@openai-sdks openai-sdks Bot mentioned this pull request Oct 15, 2026
gh-actions-shared Bot pushed a commit to xf-qubit/openai-python that referenced this pull request Oct 16, 2026
Automated Release PR
---


##
[3.32.0](openai/openai-python@v3.31.0...v3.32.0)
(2026-10-16)


### Features

* **api:** add cache settings and key options [2/2]
([openai#4087](openai#4087))
([325da45](openai@325da45))
* **api:** add prompt-based voice creation
([openai#4091](openai#4091))
([2e39db7](openai@2e39db7))
* **api:** add regional processing residency options
([openai#4081](openai#4081))
([21ce0c2](openai@21ce0c2))
* **api:** add response error diagnostics and model notices
([openai#4086](openai#4086))
([e71d781](openai@e71d781))
* **api:** support audio fixture playback in Live sessions
([openai#4085](openai#4085))
([9998c1a](openai@9998c1a))
* **api:** support Decisions in Live sessions
([openai#4088](openai#4088))
([230a923](openai@230a923))


### Bug Fixes

* **api:** declare Realtime response error messages
([openai#4083](openai#4083))
([95dbee9](openai@95dbee9))


### Chores

* **api:** clarify Decisions request and response fields
([openai#4079](openai#4079))
([d42accb](openai@d42accb))


### Refactors

* share WebSocket connection handling
([openai#4084](openai#4084))
([70d4738](openai@70d4738))

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

Realtime API Pydantic Models incomplete for RealtimeResponseStatus type

3 participants