Skip to content

chore(api): clarify image transparency and audio delta docs - #2439

Merged
apcha-oai merged 1 commit into
mainfrom
castiron/promotions/pr-70
Aug 21, 2026
Merged

apcha-oai merged 1 commit into
mainfrom
castiron/promotions/pr-70

Conversation

@apcha-oai

Copy link
Copy Markdown
Contributor

Summary

Clarify image-background documentation and Realtime translation audio-delta sizing. This update changes comments and the transformed API reference only; public TypeScript interfaces and runtime behavior are unchanged.

Changes

  • Document transparent backgrounds as preview support for gpt-image-2 and gpt-image-2-2026-04-21, with png or webp required for transparent output.
  • Clarify that Realtime translation audio deltas contain variable-length PCM16 chunks that clients should decode and queue in full.
  • Preserve the existing image-background values and nullability; null was already accepted by the image edit/generate interfaces.

Castiron-Internal-PR: openai/openai-node-internal#70
Castiron-Source-SHA: eb589fd77a6cbf4c4d727008507559511ac59eb5
Castiron-Public-Base-SHA: 4317319
@github-actions

github-actions Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

32 mixed files remain; 0 existing customizations changed; 3 generated baselines changed.

Compared 43173195e09b → 0deb713cb04c. Generated baselines verified.

File Result Current custom patch
src/resources/beta/responses/responses.ts Generated baseline changed +12 / −0
src/resources/images.ts Generated baseline changed +7 / −1
src/resources/responses/responses.ts Generated baseline changed +139 / −41
29 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/assistants.ts
  • src/resources/beta/beta.ts
  • src/resources/beta/index.ts
  • src/resources/beta/responses/internal-base.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/responses/internal-base.ts
  • src/resources/skills/skills.ts
  • src/resources/skills/versions/versions.ts
  • src/resources/vector-stores/file-batches.ts
  • src/resources/vector-stores/files.ts
  • src/resources/webhooks/index.ts
  • src/resources/webhooks/webhooks.ts
  • tests/lib/data-residency.test.ts

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

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

git fetch --no-tags origin 43173195e09bc916d58b4caffc6bf2e73002109f 0deb713cb04c8d4ab079d6c532153212fd4e1856
python3 scripts/castiron/custom_code_report.py report \
  --base 43173195e09bc916d58b4caffc6bf2e73002109f \
  --head 0deb713cb04c8d4ab079d6c532153212fd4e1856 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-0deb713cb04c
cat /tmp/castiron-custom-code-0deb713cb04c/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

@apcha-oai
apcha-oai marked this pull request as ready for review August 20, 2026 23:37
@apcha-oai
apcha-oai requested a review from a team as a code owner August 20, 2026 23:37
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 20, 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-08-20T23:38:56.848412Z 0deb713 Draft marked ready
🔒 Security Review ✅ Completed 2026-08-20T23:38:47.513281Z 0deb713 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 Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 237/237 SDK tests passed in 10.186s for Node SDK PR #2439.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 147ms
tests/chat-completions-create.test.ts ✅ Passed 231ms
tests/chat-completions-stream.test.ts ✅ Passed 145ms
tests/files-content-binary.test.ts ✅ Passed 152ms
tests/files-create-multipart.test.ts ✅ Passed 146ms
tests/files-list-pagination.test.ts ✅ Passed 147ms
tests/initialize-config.test.ts ✅ Passed 199ms
tests/instance-isolation.test.ts ✅ Passed 97ms
tests/models-list.test.ts ✅ Passed 136ms
tests/responses-background-lifecycle.test.ts ✅ Passed 230ms
tests/responses-body-method-errors.test.ts ✅ Passed 351ms
tests/responses-cancel-timeout.test.ts ✅ Passed 219ms
tests/responses-cancel.test.ts ✅ Passed 251ms
tests/responses-compact-retries.test.ts ✅ Passed 241ms
tests/responses-compact.test.ts ✅ Passed 274ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 126ms
tests/responses-create-advanced.test.ts ✅ Passed 188ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.212s
tests/responses-create-errors.test.ts ✅ Passed 181ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 138ms
tests/responses-create-retries.test.ts ✅ Passed 250ms
tests/responses-create-stream-failures.test.ts ✅ Passed 179ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 2.154s
tests/responses-create-stream-wire.test.ts ✅ Passed 2.385s
tests/responses-create-stream.test.ts ✅ Passed 70ms
tests/responses-create-terminal-states.test.ts ✅ Passed 213ms
tests/responses-create-timeout.test.ts ✅ Passed 209ms
tests/responses-create.test.ts ✅ Passed 150ms
tests/responses-delete.test.ts ✅ Passed 143ms
tests/responses-input-items-errors.test.ts ✅ Passed 172ms
tests/responses-input-items-list.test.ts ✅ Passed 167ms
tests/responses-input-items-options.test.ts ✅ Passed 123ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 244ms
tests/responses-input-tokens-count.test.ts ✅ Passed 315ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.098s
tests/responses-not-found-errors.test.ts ✅ Passed 225ms
tests/responses-parse.test.ts ✅ Passed 158ms
tests/responses-retrieve-retries.test.ts ✅ Passed 234ms
tests/responses-retrieve.test.ts ✅ Passed 233ms
tests/responses-stored-method-errors.test.ts ✅ Passed 602ms
tests/retry-behavior.test.ts ✅ Passed 3.051s
tests/sdk-error-shape.test.ts ✅ Passed 274ms

View OkTest run #32429417237

SDK merge (9cdd7ebd53ba) · head (0deb713cb04c) · base (43173195e09b) · OkTest (2b1bdfd25e98)

@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: 0deb713cb0

ℹ️ 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/resources/images.ts
Comment on lines +728 to +730
* Allows to set transparency for the background of the generated image(s). Must be
* one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
* the model will automatically determine the best background for the image.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore the GPT-only restriction for background

When callers use images.generate with dall-e-2 or dall-e-3—both still accepted by ImageGenerateParamsBase.model—this wording now suggests that opaque and auto are valid because it limits only transparent backgrounds to GPT Image models. Runtime behavior is unchanged, and the removed documentation correctly stated that the entire background parameter is GPT-only, so retain that restriction alongside the new GPT Image 2 preview guidance to prevent unsupported DALL-E requests.

AGENTS.md reference: AGENTS.md:L72-L74

Useful? React with 👍 / 👎.

@apcha-oai
apcha-oai enabled auto-merge August 20, 2026 23:43

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

The updated description removes the existing parameter-level restriction that background is supported only for GPT Image models. It now limits only transparent backgrounds, incorrectly implying dall-e-2 / dall-e-3 accept background: "opaque" or "auto". Restore the explicit GPT-Image-only restriction in the canonical OpenAPI description while retaining the new transparency preview and PNG/WebP guidance, then regenerate. The existing review thread already covers this; no duplicate inline comment.

@apcha-oai
apcha-oai disabled auto-merge August 20, 2026 23:47
@apcha-oai

Copy link
Copy Markdown
Contributor Author

overriding as docstring only change; api ref authoritative here

@apcha-oai
apcha-oai merged commit f14e885 into main Aug 21, 2026
50 checks passed
@apcha-oai
apcha-oai deleted the castiron/promotions/pr-70 branch August 21, 2026 13:30
@openai-sdks openai-sdks Bot mentioned this pull request Aug 21, 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