Skip to content

chore(api): clarify documented API error responses - #2810

Open
markstuart-oai wants to merge 1 commit into
mainfrom
castiron/promotions/pr-190
Open

markstuart-oai wants to merge 1 commit into
mainfrom
castiron/promotions/pr-190

Conversation

@markstuart-oai

Copy link
Copy Markdown
Contributor

Summary

Clarifies documented error responses for TypeScript users without changing existing client behavior.

Changes

  • Document applicable errors across organization, inference, media and resource APIs.
  • Preserve existing public types, methods and runtime error behavior.

Castiron-Internal-PR: openai/openai-node-internal#190
Castiron-Source-SHA: 87a4238deea0b0715b27a878d6f7bd35062d4adb
Castiron-Public-Base-SHA: 8e8f581
@markstuart-oai
markstuart-oai marked this pull request as ready for review September 25, 2026 20:56
@markstuart-oai
markstuart-oai requested a review from a team as a code owner September 25, 2026 20:56
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

45 mixed files remain; 0 existing customizations changed.

Compared 8e8f5815a39f → b5af27d2f403. Generated baselines verified.

45 existing customizations unchanged
  • api.md
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py
  • src/client.ts
  • src/resources/audio/transcriptions.ts
  • src/resources/audio/translations.ts
  • src/resources/beta/agents/environments/files.ts
  • src/resources/beta/agents/sessions/sessions.ts
  • src/resources/beta/assistants.ts
  • src/resources/beta/beta.ts
  • src/resources/beta/index.ts
  • src/resources/beta/responses/internal-base.ts
  • src/resources/beta/responses/responses.ts
  • src/resources/beta/responses/ws-base.ts
  • src/resources/beta/responses/ws.ts
  • src/resources/beta/threads/index.ts
  • src/resources/beta/threads/runs/index.ts
  • src/resources/beta/threads/runs/runs.ts
  • src/resources/beta/threads/threads.ts
  • src/resources/chat/completions/completions.ts
  • src/resources/chat/completions/index.ts
  • src/resources/conversations/index.ts
  • src/resources/embeddings.ts
  • src/resources/files.ts
  • src/resources/fine-tuning/checkpoints/permissions.ts
  • src/resources/images.ts
  • src/resources/live/forks/ws-base.ts
  • src/resources/live/forks/ws.ts
  • src/resources/live/sideband/ws-base.ts
  • src/resources/live/sideband/ws.ts
  • src/resources/live/ws-base.ts
  • src/resources/live/ws.ts
  • src/resources/responses/internal-base.ts
  • src/resources/responses/responses.ts
  • src/resources/responses/ws-base.ts
  • src/resources/responses/ws.ts
  • src/resources/skills/skills.ts
  • src/resources/skills/versions/versions.ts
  • src/resources/vector-stores/file-batches.ts

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

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

git fetch --no-tags origin 8e8f5815a39f38033851ac1e17cc1622405aa0f3 b5af27d2f403c02abb62717890134c3c63db93f4
python3 scripts/castiron/custom_code_report.py report \
  --base 8e8f5815a39f38033851ac1e17cc1622405aa0f3 \
  --head b5af27d2f403c02abb62717890134c3c63db93f4 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-b5af27d2f403
cat /tmp/castiron-custom-code-b5af27d2f403/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

@openai-sdks

openai-sdks Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 9.528s for Node SDK PR #2810.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 115ms
tests/chat-completions-create.test.ts ✅ Passed 154ms
tests/chat-completions-stream.test.ts ✅ Passed 107ms
tests/files-content-binary.test.ts ✅ Passed 171ms
tests/files-create-multipart.test.ts ✅ Passed 175ms
tests/files-list-pagination.test.ts ✅ Passed 133ms
tests/initialize-config.test.ts ✅ Passed 121ms
tests/instance-isolation.test.ts ✅ Passed 139ms
tests/models-list.test.ts ✅ Passed 110ms
tests/responses-background-lifecycle.test.ts ✅ Passed 182ms
tests/responses-body-method-errors.test.ts ✅ Passed 258ms
tests/responses-cancel-timeout.test.ts ✅ Passed 200ms
tests/responses-cancel.test.ts ✅ Passed 178ms
tests/responses-compact-retries.test.ts ✅ Passed 164ms
tests/responses-compact.test.ts ✅ Passed 188ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 126ms
tests/responses-create-advanced.test.ts ✅ Passed 152ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.163s
tests/responses-create-errors.test.ts ✅ Passed 173ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 95ms
tests/responses-create-retries.test.ts ✅ Passed 157ms
tests/responses-create-stream-failures.test.ts ✅ Passed 115ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 2.15s
tests/responses-create-stream-wire.test.ts ✅ Passed 2.398s
tests/responses-create-stream.test.ts ✅ Passed 111ms
tests/responses-create-terminal-states.test.ts ✅ Passed 184ms
tests/responses-create-timeout.test.ts ✅ Passed 187ms
tests/responses-create.test.ts ✅ Passed 183ms
tests/responses-delete.test.ts ✅ Passed 166ms
tests/responses-input-items-errors.test.ts ✅ Passed 141ms
tests/responses-input-items-list.test.ts ✅ Passed 145ms
tests/responses-input-items-options.test.ts ✅ Passed 132ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 228ms
tests/responses-input-tokens-count.test.ts ✅ Passed 157ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.048s
tests/responses-not-found-errors.test.ts ✅ Passed 194ms
tests/responses-parse.test.ts ✅ Passed 234ms
tests/responses-retrieve-retries.test.ts ✅ Passed 176ms
tests/responses-retrieve.test.ts ✅ Passed 137ms
tests/responses-stored-method-errors.test.ts ✅ Passed 521ms
tests/retry-behavior.test.ts ✅ Passed 3.022s
tests/sdk-error-shape.test.ts ✅ Passed 271ms

View OkTest run #36188734856

SDK merge (941e45f752bf) · head (b5af27d2f403) · base (8e8f5815a39f) · OkTest (f9111d4e2fcd)

This branch has not been deployed

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

1 participant