Skip to content

chore(api): document Responses not-found errors - #3959

Merged
markstuart-oai merged 1 commit into
mainfrom
castiron/promotions/pr-154
Sep 25, 2026
Merged

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

Conversation

@markstuart-oai

Copy link
Copy Markdown
Contributor

Summary

Document the JSON error envelope returned when a requested response or input-item cursor cannot be found.

Changes

  • Describe wrapped 404 errors for response retrieval, deletion, cancellation, and input-item listing.

Castiron-Internal-PR: openai/openai-python-internal#154
Castiron-Source-SHA: f872a759fdea341b3aefdd8a36423d8aeee9239e
Castiron-Public-Base-SHA: 09c5b6f
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

47 mixed files remain; 0 existing customizations changed; 8 customizations removed; 8 generated baselines changed.

Compared 09c5b6f13f71 → da5ecb1b92f5. Generated baselines verified.

File Result Current custom patch
src/openai/types/beta/beta_web_search_preview_tool.py Generated baseline changed None
src/openai/types/beta/beta_web_search_preview_tool_param.py Generated baseline changed None
src/openai/types/beta/beta_web_search_tool.py Generated baseline changed None
src/openai/types/beta/beta_web_search_tool_param.py Generated baseline changed None
src/openai/types/responses/web_search_preview_tool.py Generated baseline changed None
src/openai/types/responses/web_search_preview_tool_param.py Generated baseline changed None
src/openai/types/responses/web_search_tool.py Generated baseline changed None
src/openai/types/responses/web_search_tool_param.py Generated baseline changed None
47 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/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/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

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

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

git fetch --no-tags origin 09c5b6f13f716ad4e417fd7ba9209a8a057e0383 da5ecb1b92f5e7b4d39e1c620b7414193155cdcd
python3 scripts/castiron/custom_code_report.py report \
  --base 09c5b6f13f716ad4e417fd7ba9209a8a057e0383 \
  --head da5ecb1b92f5e7b4d39e1c620b7414193155cdcd --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-da5ecb1b92f5
cat /tmp/castiron-custom-code-da5ecb1b92f5/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 marked this pull request as ready for review September 25, 2026 04:13
@markstuart-oai
markstuart-oai requested a review from a team as a code owner September 25, 2026 04:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 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-25T04:14:22.989248Z da5ecb1 Draft marked ready
🔒 Security Review ✅ Completed 2026-09-25T04:15:15.325096Z da5ecb1 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 Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 11.902s for Python SDK PR #3959.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 266ms
tests/chat-completions-create.test.ts ✅ Passed 322ms
tests/chat-completions-stream.test.ts ✅ Passed 297ms
tests/files-content-binary.test.ts ✅ Passed 222ms
tests/files-create-multipart.test.ts ✅ Passed 227ms
tests/files-list-pagination.test.ts ✅ Passed 176ms
tests/initialize-config.test.ts ✅ Passed 219ms
tests/instance-isolation.test.ts ✅ Passed 213ms
tests/models-list.test.ts ✅ Passed 303ms
tests/responses-background-lifecycle.test.ts ✅ Passed 166ms
tests/responses-body-method-errors.test.ts ✅ Passed 368ms
tests/responses-cancel-timeout.test.ts ✅ Passed 197ms
tests/responses-cancel.test.ts ✅ Passed 283ms
tests/responses-compact-retries.test.ts ✅ Passed 341ms
tests/responses-compact.test.ts ✅ Passed 386ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 126ms
tests/responses-create-advanced.test.ts ✅ Passed 306ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.252s
tests/responses-create-errors.test.ts ✅ Passed 243ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 277ms
tests/responses-create-retries.test.ts ✅ Passed 285ms
tests/responses-create-stream-failures.test.ts ✅ Passed 770ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 234ms
tests/responses-create-stream-wire.test.ts ✅ Passed 3.429s
tests/responses-create-stream.test.ts ✅ Passed 83ms
tests/responses-create-terminal-states.test.ts ✅ Passed 246ms
tests/responses-create-timeout.test.ts ✅ Passed 201ms
tests/responses-create.test.ts ✅ Passed 578ms
tests/responses-delete.test.ts ✅ Passed 230ms
tests/responses-input-items-errors.test.ts ✅ Passed 537ms
tests/responses-input-items-list.test.ts ✅ Passed 342ms
tests/responses-input-items-options.test.ts ✅ Passed 324ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 254ms
tests/responses-input-tokens-count.test.ts ✅ Passed 379ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.45s
tests/responses-not-found-errors.test.ts ✅ Passed 290ms
tests/responses-parse.test.ts ✅ Passed 292ms
tests/responses-retrieve-retries.test.ts ✅ Passed 237ms
tests/responses-retrieve.test.ts ✅ Passed 283ms
tests/responses-stored-method-errors.test.ts ✅ Passed 594ms
tests/retry-behavior.test.ts ✅ Passed 3.229s
tests/sdk-error-shape.test.ts ✅ Passed 320ms

View OkTest run #36093562125

SDK merge (867feece44b9) · head (da5ecb1b92f5) · base (09c5b6f13f71) · OkTest (bc2ef6ca05ab)

@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 da5ecb1. No blocking findings.

Verified the immutable base/head YAML with duplicate-key detection and semantic comparison: the only semantic changes are the eight stable/beta Responses 404 response definitions and the new required-error BetaErrorResponse wrapper. All new schema references resolve; the seed format relocation is semantically unchanged.

The full Git-tree comparison confirms that only the API-reference artifact and generation metadata changed, with no SDK runtime, public API, dependency, or workflow changes. The documented envelope agrees with the existing status-error handling.

Validation was artifact-focused; no live API calls or full SDK test suite were run locally.

Copy link
Copy Markdown
Contributor Author

@jbeckwith-oai Thank you for the exact-head review. It agrees with the full-tree and schema comparison at da5ecb1b92f5: only the reference and generation metadata change; there are no SDK API, runtime, or error-handling changes. The CI on this head is passing as well. No additional code change is needed for this review.

@markstuart-oai
markstuart-oai added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit 63099e7 Sep 25, 2026
28 checks passed
@markstuart-oai
markstuart-oai deleted the castiron/promotions/pr-154 branch September 25, 2026 04:33
@openai-sdks openai-sdks Bot mentioned this pull request Sep 25, 2026
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