Skip to content

fix(api): preserve plaintext and rich audio response types - #731

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

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

Conversation

@markstuart-oai

@markstuart-oai markstuart-oai commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Preserves complete audio payloads and selects rich response models using the effective request format.

Changes

  • Selects verbose or diarized transcription models and verbose translation models after request-body overrides.
  • Preserves aggregate fallback for malformed rich responses, default/future formats, streaming and required fields.
  • Includes StringIO alongside JSON models for text, SRT and VTT responses and updates the audio example accordingly.
  • Describes plaintext/subtitle responses, six speech media types and audio error responses while preserving generic binary compatibility.

Related reports: transcription plaintext media, speech media types, and overlapping transcription response shapes.

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

Mixed files: 70 → 76

6 newly customized · 0 customizations removed · 0 existing customizations changed · 2 generated baselines changed

Compared 33435479c2d9 → 1e3d8d041cd4. Generated baselines verified.

File Result Current custom patch
lib/openai/resources/audio/transcriptions.rb Generated baseline changed +12 / −2
lib/openai/resources/audio/translations.rb Newly customized +10 / −2
rbi/openai/resources/audio/transcriptions.rbi Generated baseline changed +1 / −1
rbi/openai/resources/audio/translations.rbi Newly customized +1 / −1
sig/openai/resources/audio/transcriptions.rbs Newly customized +1 / −1
sig/openai/resources/audio/translations.rbs Newly customized +1 / −1
70 existing customizations unchanged
  • lib/openai.rb
  • lib/openai/client.rb
  • lib/openai/models/audio/transcription_create_response.rb
  • lib/openai/models/beta/agents/vault_status_filter.rb
  • lib/openai/models/chat/chat_completion_message.rb
  • lib/openai/models/chat/chat_completion_message_function_tool_call.rb
  • lib/openai/models/chat/completion_create_params.rb
  • lib/openai/models/image_edit_completed_event.rb
  • lib/openai/models/image_edit_partial_image_event.rb
  • lib/openai/models/image_gen_completed_event.rb
  • lib/openai/models/image_gen_partial_image_event.rb
  • lib/openai/models/images_response.rb
  • lib/openai/models/response_format_json_schema.rb
  • lib/openai/models/responses/function_tool.rb
  • lib/openai/models/responses/response.rb
  • lib/openai/models/responses/response_create_params.rb
  • lib/openai/models/responses/response_format_text_config.rb
  • lib/openai/models/responses/response_format_text_json_schema_config.rb
  • lib/openai/models/responses/response_function_tool_call.rb
  • lib/openai/models/responses/response_function_web_search.rb
  • lib/openai/models/responses/response_output_text.rb
  • lib/openai/models/responses/tool.rb
  • lib/openai/models/webhooks/webhook_endpoint_with_secret.rb
  • lib/openai/resources/beta/agents/sessions.rb
  • lib/openai/resources/beta/threads.rb
  • lib/openai/resources/chat/completions.rb
  • lib/openai/resources/containers/files.rb
  • lib/openai/resources/files.rb
  • lib/openai/resources/responses.rb
  • lib/openai/resources/vector_stores/file_batches.rb
  • lib/openai/resources/vector_stores/files.rb
  • lib/openai/resources/webhooks.rb
  • rbi/openai/client.rbi
  • rbi/openai/models/beta/agents/vault_status_filter.rbi
  • rbi/openai/models/chat/chat_completion_message.rbi
  • rbi/openai/models/chat/chat_completion_message_function_tool_call.rbi
  • rbi/openai/models/chat/completion_create_params.rbi
  • rbi/openai/models/image_edit_completed_event.rbi
  • rbi/openai/models/image_edit_partial_image_event.rbi
  • rbi/openai/models/image_gen_completed_event.rbi

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

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

git fetch --no-tags origin 33435479c2d98603b93c810183d314bc55cd1ee7 1e3d8d041cd4910b250b7e66b313718f38821bd5
python3 scripts/castiron/custom_code_report.py report \
  --base 33435479c2d98603b93c810183d314bc55cd1ee7 \
  --head 1e3d8d041cd4910b250b7e66b313718f38821bd5 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-1e3d8d041cd4
cat /tmp/castiron-custom-code-1e3d8d041cd4/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 21, 2026 02:05
@markstuart-oai
markstuart-oai requested a review from a team as a code owner September 21, 2026 02:05
@markstuart-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 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-21T06:13:27.075168Z 1e3d8d0 New commits
🔒 Security Review ✅ Completed 2026-09-21T06:15:06.010297Z 1e3d8d0 New commits
ℹ️ 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 21, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 9.57s for Ruby SDK PR #731.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 188ms
tests/chat-completions-create.test.ts ✅ Passed 297ms
tests/chat-completions-stream.test.ts ✅ Passed 162ms
tests/files-content-binary.test.ts ✅ Passed 161ms
tests/files-create-multipart.test.ts ✅ Passed 155ms
tests/files-list-pagination.test.ts ✅ Passed 178ms
tests/initialize-config.test.ts ✅ Passed 171ms
tests/instance-isolation.test.ts ✅ Passed 186ms
tests/models-list.test.ts ✅ Passed 173ms
tests/responses-background-lifecycle.test.ts ✅ Passed 212ms
tests/responses-body-method-errors.test.ts ✅ Passed 420ms
tests/responses-cancel-timeout.test.ts ✅ Passed 239ms
tests/responses-cancel.test.ts ✅ Passed 268ms
tests/responses-compact-retries.test.ts ✅ Passed 325ms
tests/responses-compact.test.ts ✅ Passed 250ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 143ms
tests/responses-create-advanced.test.ts ✅ Passed 227ms
tests/responses-create-disconnect.test.ts ✅ Passed 179ms
tests/responses-create-errors.test.ts ✅ Passed 360ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 144ms
tests/responses-create-retries.test.ts ✅ Passed 172ms
tests/responses-create-stream-failures.test.ts ✅ Passed 213ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 220ms
tests/responses-create-stream-wire.test.ts ✅ Passed 2.092s
tests/responses-create-stream.test.ts ✅ Passed 103ms
tests/responses-create-terminal-states.test.ts ✅ Passed 311ms
tests/responses-create-timeout.test.ts ✅ Passed 261ms
tests/responses-create.test.ts ✅ Passed 233ms
tests/responses-delete.test.ts ✅ Passed 163ms
tests/responses-input-items-errors.test.ts ✅ Passed 188ms
tests/responses-input-items-list.test.ts ✅ Passed 194ms
tests/responses-input-items-options.test.ts ✅ Passed 143ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 274ms
tests/responses-input-tokens-count.test.ts ✅ Passed 264ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.335s
tests/responses-not-found-errors.test.ts ✅ Passed 334ms
tests/responses-parse.test.ts ✅ Passed 208ms
tests/responses-retrieve-retries.test.ts ✅ Passed 265ms
tests/responses-retrieve.test.ts ✅ Passed 235ms
tests/responses-stored-method-errors.test.ts ✅ Passed 882ms
tests/retry-behavior.test.ts ✅ Passed 3.233s
tests/sdk-error-shape.test.ts ✅ Passed 443ms

View OkTest run #35567391401

SDK merge (9e5b375480cb) · head (1e3d8d041cd4) · base (33435479c2d9) · OkTest (a0be4375e02d)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: f12f0e1b34

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: f12f0e1b34

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Castiron-Internal-PR: openai/openai-ruby-internal#127
Castiron-Source-SHA: c1e514cd869d015b12d40a18d4d0e4524100f8a1
Castiron-Public-Base-SHA: 3343547
@markstuart-oai
markstuart-oai force-pushed the castiron/promotions/pr-127 branch from f12f0e1 to 1e3d8d0 Compare September 21, 2026 06:11
@markstuart-oai markstuart-oai changed the title fix(api): type plaintext audio responses fix(api): preserve plaintext and rich audio response types Sep 21, 2026
@markstuart-oai
markstuart-oai added this pull request to the merge queue Sep 21, 2026
Merged via the queue into main with commit e28d537 Sep 21, 2026
22 checks passed
@markstuart-oai
markstuart-oai deleted the castiron/promotions/pr-127 branch September 21, 2026 15:10
@openai-sdks openai-sdks Bot mentioned this pull request Sep 19, 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