Skip to content

feat(api): add response error diagnostics and model notices - #4086

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

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

Conversation

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Summary

Expose optional response error diagnostics and add model shutdown notices.

Changes

  • Expose the original error type and associated request parameter on response errors.
  • Add shutdown notices for seven model identifiers while preserving the identifiers.

Castiron-Internal-PR: openai/openai-python-internal#261
Castiron-Source-SHA: 27fa0894b83242b082ad4fc0487e5e8cc151f190
Castiron-Public-Base-SHA: 70d4738
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

Evaluated main: 70d473892f7c427a02a3b566add9c86072842e25.

✅ No new custom-code files detected.

40 mixed files remain; 0 existing customizations changed.

Compared 70d473892f7c → 8e3cd4a1a048. 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 38688175961 --repo openai/openai-python \
  --name castiron-custom-code-38688175961-1 --dir /tmp/castiron-custom-code-38688175961-1
git apply --stat /tmp/castiron-custom-code-38688175961-1/custom-code.patch
cat /tmp/castiron-custom-code-38688175961-1/custom-code.patch

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

git fetch --no-tags origin 70d473892f7c427a02a3b566add9c86072842e25 8e3cd4a1a0483e22b3cfa00f469e48769ea4a57c
python3 scripts/castiron/custom_code_report.py report \
  --base 70d473892f7c427a02a3b566add9c86072842e25 \
  --head 8e3cd4a1a0483e22b3cfa00f469e48769ea4a57c --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-8e3cd4a1a048
cat /tmp/castiron-custom-code-8e3cd4a1a048/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 marked this pull request as ready for review October 15, 2026 05:41
@jbeckwith-oai
jbeckwith-oai requested a review from a team as a code owner October 15, 2026 05:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 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-10-15T05:43:46.101540Z 8e3cd4a Draft marked ready
🔒 Security Review ✅ Completed 2026-10-15T05:44:17.547668Z 8e3cd4a 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 15, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 6.955s for Python SDK PR #4086.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 168ms
tests/chat-completions-create.test.ts ✅ Passed 151ms
tests/chat-completions-stream.test.ts ✅ Passed 117ms
tests/files-content-binary.test.ts ✅ Passed 166ms
tests/files-create-multipart.test.ts ✅ Passed 130ms
tests/files-list-pagination.test.ts ✅ Passed 95ms
tests/initialize-config.test.ts ✅ Passed 142ms
tests/instance-isolation.test.ts ✅ Passed 123ms
tests/models-list.test.ts ✅ Passed 125ms
tests/responses-background-lifecycle.test.ts ✅ Passed 142ms
tests/responses-body-method-errors.test.ts ✅ Passed 189ms
tests/responses-cancel-timeout.test.ts ✅ Passed 177ms
tests/responses-cancel.test.ts ✅ Passed 143ms
tests/responses-compact-retries.test.ts ✅ Passed 182ms
tests/responses-compact.test.ts ✅ Passed 156ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 157ms
tests/responses-create-advanced.test.ts ✅ Passed 128ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.208s
tests/responses-create-errors.test.ts ✅ Passed 131ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 158ms
tests/responses-create-retries.test.ts ✅ Passed 173ms
tests/responses-create-stream-failures.test.ts ✅ Passed 140ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 198ms
tests/responses-create-stream-wire.test.ts ✅ Passed 1.506s
tests/responses-create-stream.test.ts ✅ Passed 167ms
tests/responses-create-terminal-states.test.ts ✅ Passed 188ms
tests/responses-create-timeout.test.ts ✅ Passed 176ms
tests/responses-create.test.ts ✅ Passed 398ms
tests/responses-delete.test.ts ✅ Passed 144ms
tests/responses-input-items-errors.test.ts ✅ Passed 327ms
tests/responses-input-items-list.test.ts ✅ Passed 194ms
tests/responses-input-items-options.test.ts ✅ Passed 233ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 256ms
tests/responses-input-tokens-count.test.ts ✅ Passed 149ms
tests/responses-malformed-inputs.test.ts ✅ Passed 763ms
tests/responses-not-found-errors.test.ts ✅ Passed 214ms
tests/responses-parse.test.ts ✅ Passed 179ms
tests/responses-retrieve-retries.test.ts ✅ Passed 155ms
tests/responses-retrieve.test.ts ✅ Passed 134ms
tests/responses-stored-method-errors.test.ts ✅ Passed 360ms
tests/retry-behavior.test.ts ✅ Passed 3.028s
tests/sdk-error-shape.test.ts ✅ Passed 176ms

View OkTest run #38688146241

SDK merge (239b0a8280a1) · head (8e3cd4a1a048) · base (70d473892f7c) · 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.

Automated source review of 8e3cd4a1a0483e22b3cfa00f469e48769ea4a57c: no blocking findings.

The stable Responses, beta Responses, and video error models expose optional, nullable type and param fields while preserving code and message. The model notices keep the existing identifiers available. The new transport test covers all three APIs with populated, null, and omitted diagnostics in both sync and async clients. The change needs no new runtime helper or parsing path.

Verified hosted checks on this head passed: lint, build, Python 3.10 and 3.14 tests, HTTPX2 tests, and Castiron baseline and budget checks. I reviewed the source and tests without running local project workloads.

@jbeckwith-oai
jbeckwith-oai added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit e71d781 Oct 15, 2026
33 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the castiron/promotions/pr-261 branch October 15, 2026 06:07
@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.

2 participants