Skip to content

feat(api): add prompt-based voice creation - #4091

Merged
marcuswood-oai merged 1 commit into
mainfrom
castiron/promotions/pr-273
Oct 16, 2026
Merged

marcuswood-oai merged 1 commit into
mainfrom
castiron/promotions/pr-273

Conversation

@marcuswood-oai

Copy link
Copy Markdown
Contributor

Summary

Create custom voices from text descriptions and read their original prompts.

Changes

  • Add prompt-based voice creation with optional script hints and model selection.
  • Expose the original prompt on voice responses when available.

Castiron-Internal-PR: openai/openai-python-internal#273
Castiron-Source-SHA: 0452d8935919ab42b5837fe9c3e38dbf611a20e3
Castiron-Public-Base-SHA: 230a923
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

Evaluated main: 230a923faba5574ebdc5b45a505a26b6bad79f61.

Trusted main policy: 230a923faba5574ebdc5b45a505a26b6bad79f61.

✅ No new custom-code files detected.

36 mixed files remain; 0 existing customizations changed.

Compared 230a923faba5 → a1aed3b37a41. Generated baselines verified.

36 existing customizations unchanged
  • api.md
  • 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 38954431133 --repo openai/openai-python \
  --name castiron-custom-code-38954431133-1 --dir /tmp/castiron-custom-code-38954431133-1
git apply --stat /tmp/castiron-custom-code-38954431133-1/custom-code.patch
cat /tmp/castiron-custom-code-38954431133-1/custom-code.patch

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

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

timeout: Override the client-level default timeout for this request, in seconds
"""
...
timeout: Override the client-level default timeout for this request, in seconds
"""
...
timeout: Override the client-level default timeout for this request, in seconds
"""
...
timeout: Override the client-level default timeout for this request, in seconds
"""
...
@marcuswood-oai
marcuswood-oai marked this pull request as ready for review October 16, 2026 19:21
@marcuswood-oai
marcuswood-oai requested a review from a team as a code owner October 16, 2026 19:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-16T19:23:56.976879Z a1aed3b Draft marked ready
🔒 Security Review ✅ Completed 2026-10-16T19:25:50.304781Z a1aed3b 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 16, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 10.329s for Python SDK PR #4091.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 246ms
tests/chat-completions-create.test.ts ✅ Passed 273ms
tests/chat-completions-stream.test.ts ✅ Passed 322ms
tests/files-content-binary.test.ts ✅ Passed 211ms
tests/files-create-multipart.test.ts ✅ Passed 225ms
tests/files-list-pagination.test.ts ✅ Passed 290ms
tests/initialize-config.test.ts ✅ Passed 213ms
tests/instance-isolation.test.ts ✅ Passed 205ms
tests/models-list.test.ts ✅ Passed 255ms
tests/responses-background-lifecycle.test.ts ✅ Passed 250ms
tests/responses-body-method-errors.test.ts ✅ Passed 325ms
tests/responses-cancel-timeout.test.ts ✅ Passed 235ms
tests/responses-cancel.test.ts ✅ Passed 204ms
tests/responses-compact-retries.test.ts ✅ Passed 330ms
tests/responses-compact.test.ts ✅ Passed 210ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 188ms
tests/responses-create-advanced.test.ts ✅ Passed 220ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.336s
tests/responses-create-errors.test.ts ✅ Passed 198ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 244ms
tests/responses-create-retries.test.ts ✅ Passed 245ms
tests/responses-create-stream-failures.test.ts ✅ Passed 983ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 262ms
tests/responses-create-stream-wire.test.ts ✅ Passed 2.265s
tests/responses-create-stream.test.ts ✅ Passed 292ms
tests/responses-create-terminal-states.test.ts ✅ Passed 232ms
tests/responses-create-timeout.test.ts ✅ Passed 223ms
tests/responses-create.test.ts ✅ Passed 234ms
tests/responses-delete.test.ts ✅ Passed 221ms
tests/responses-input-items-errors.test.ts ✅ Passed 743ms
tests/responses-input-items-list.test.ts ✅ Passed 364ms
tests/responses-input-items-options.test.ts ✅ Passed 408ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 304ms
tests/responses-input-tokens-count.test.ts ✅ Passed 337ms
tests/responses-malformed-inputs.test.ts ✅ Passed 1.24s
tests/responses-not-found-errors.test.ts ✅ Passed 259ms
tests/responses-parse.test.ts ✅ Passed 362ms
tests/responses-retrieve-retries.test.ts ✅ Passed 503ms
tests/responses-retrieve.test.ts ✅ Passed 209ms
tests/responses-stored-method-errors.test.ts ✅ Passed 512ms
tests/retry-behavior.test.ts ✅ Passed 3.128s
tests/sdk-error-shape.test.ts ✅ Passed 308ms

View OkTest run #38954371890

SDK merge (d0629f168860) · head (a1aed3b37a41) · base (230a923faba5) · OkTest (a23aae9eb06f)

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

Reviewed a1aed3b37a41cae073ded4bfbb365938b744d928. No actionable findings.

The prompt overloads reuse the existing multipart path and preserve audio-sample calls. Optional response metadata stays compatible with older voices. Sync, async, raw-response and streaming-response tests cover the new overload. The checkpoint fallback remains limited to the audited legacy digest; manifest ownership and budget checks remain enforced.

Validation was source-only with hosted test, lint, build and baseline results. I did not execute candidate code locally.

@marcuswood-oai
marcuswood-oai added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit 2e39db7 Oct 16, 2026
33 checks passed
@marcuswood-oai
marcuswood-oai deleted the castiron/promotions/pr-273 branch October 16, 2026 19:39
@openai-sdks openai-sdks Bot mentioned this pull request Oct 16, 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.

3 participants