Skip to content

feat(api): Add session traces and Realtime translations - #4001

Merged
apcha-oai merged 1 commit into
mainfrom
castiron/promotions/pr-185
Sep 30, 2026
Merged

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

Conversation

@apcha-oai

Copy link
Copy Markdown
Contributor

Summary

Add APIs for listing agent session traces and creating Realtime translation client secrets. Expand several public models with optional fields and values while correcting response defaults and field documentation.

Changes

  • Add synchronous and asynchronous client.beta.agents.sessions.traces.list methods with cursor pagination, ordering, raw-response, and streaming-response support, returning SessionTrace objects.
  • Add synchronous and asynchronous client.realtime.translations.client_secrets.create methods for configuring translation models, audio processing, source transcription, output language, and client-secret expiration.
  • Export public request and response types for Realtime translation sessions and client secrets.
  • Add optional container_size support for hosted agent environments with small, medium, and large tiers.
  • Add flex_unavailable as a supported agent session turn error code.
  • Add the optional client_event_id field to DTMF send events and clarify that successful keypresses are sent to the SIP trunk.
  • Default missing credential metadata to an empty dictionary when parsing credential responses.
  • Clarify that file citation index values identify insertion positions in output text.
  • Document support for computer-use approval-response events in managed agent sessions.

Castiron-Internal-PR: openai/openai-python-internal#185
Castiron-Source-SHA: 0fca3708aace7952c50d9b9cf5fea09b4894cb55
Castiron-Public-Base-SHA: 7f203fd
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

48 mixed files remain; 0 existing customizations changed; 5 generated baselines changed.

Compared 7f203fd5cfd9 → 41803ad6e2c4. Generated baselines verified.

File Result Current custom patch
api.md Generated baseline changed +119 / −0
src/openai/_client.py Generated baseline changed +759 / −60
src/openai/resources/beta/agents/sessions/sessions.py Generated baseline changed +54 / −1
src/openai/resources/realtime/api.md Generated baseline changed +0 / −20
src/openai/resources/realtime/realtime.py Generated baseline changed +142 / −60
43 existing customizations unchanged
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py
  • src/openai/init.py
  • src/openai/resources/audio/transcriptions.py
  • src/openai/resources/audio/translations.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/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
  • 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

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

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

git fetch --no-tags origin 7f203fd5cfd96354524cd07498497b2e27184f95 41803ad6e2c4e973c152401f729c67b6e259edbd
python3 scripts/castiron/custom_code_report.py report \
  --base 7f203fd5cfd96354524cd07498497b2e27184f95 \
  --head 41803ad6e2c4e973c152401f729c67b6e259edbd --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-41803ad6e2c4
cat /tmp/castiron-custom-code-41803ad6e2c4/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 September 30, 2026 15:11
@apcha-oai
apcha-oai requested a review from a team as a code owner September 30, 2026 15:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 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-30T15:14:08.925726Z 41803ad Draft marked ready
🔒 Security Review ✅ Completed 2026-09-30T15:13:54.961128Z 41803ad 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 30, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 10.73s for Python SDK PR #4001.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 174ms
tests/chat-completions-create.test.ts ✅ Passed 309ms
tests/chat-completions-stream.test.ts ✅ Passed 253ms
tests/files-content-binary.test.ts ✅ Passed 149ms
tests/files-create-multipart.test.ts ✅ Passed 195ms
tests/files-list-pagination.test.ts ✅ Passed 120ms
tests/initialize-config.test.ts ✅ Passed 164ms
tests/instance-isolation.test.ts ✅ Passed 142ms
tests/models-list.test.ts ✅ Passed 199ms
tests/responses-background-lifecycle.test.ts ✅ Passed 208ms
tests/responses-body-method-errors.test.ts ✅ Passed 351ms
tests/responses-cancel-timeout.test.ts ✅ Passed 270ms
tests/responses-cancel.test.ts ✅ Passed 204ms
tests/responses-compact-retries.test.ts ✅ Passed 340ms
tests/responses-compact.test.ts ✅ Passed 276ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 298ms
tests/responses-create-advanced.test.ts ✅ Passed 214ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.183s
tests/responses-create-errors.test.ts ✅ Passed 180ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 196ms
tests/responses-create-retries.test.ts ✅ Passed 187ms
tests/responses-create-stream-failures.test.ts ✅ Passed 749ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 210ms
tests/responses-create-stream-wire.test.ts ✅ Passed 3.092s
tests/responses-create-stream.test.ts ✅ Passed 125ms
tests/responses-create-terminal-states.test.ts ✅ Passed 313ms
tests/responses-create-timeout.test.ts ✅ Passed 204ms
tests/responses-create.test.ts ✅ Passed 550ms
tests/responses-delete.test.ts ✅ Passed 147ms
tests/responses-input-items-errors.test.ts ✅ Passed 536ms
tests/responses-input-items-list.test.ts ✅ Passed 319ms
tests/responses-input-items-options.test.ts ✅ Passed 309ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 223ms
tests/responses-input-tokens-count.test.ts ✅ Passed 179ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.121s
tests/responses-not-found-errors.test.ts ✅ Passed 289ms
tests/responses-parse.test.ts ✅ Passed 191ms
tests/responses-retrieve-retries.test.ts ✅ Passed 211ms
tests/responses-retrieve.test.ts ✅ Passed 151ms
tests/responses-stored-method-errors.test.ts ✅ Passed 644ms
tests/retry-behavior.test.ts ✅ Passed 3.047s
tests/sdk-error-shape.test.ts ✅ Passed 315ms

View OkTest run #36734818295

SDK merge (526e8065a617) · head (41803ad6e2c4) · base (7f203fd5cfd9) · OkTest (8728ddef7fc7)

@apcha-oai
apcha-oai enabled auto-merge September 30, 2026 15:28

@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 the trace list path, typed cursor model and both sync/async pagination entrypoints, including the raw and streaming wrappers. I also checked the translation-secret request/response shape and its integration with the existing realtime and Azure paths, plus the additive environment, credential and event-schema changes. No blocking correctness or structural issues found.

Validation: source review and hosted CI only; no local test run. On the reviewed head, build, lint, Python 3.10/3.14 and HTTPX2 tests passed.

@apcha-oai
apcha-oai added this pull request to the merge queue Sep 30, 2026
Merged via the queue into main with commit 138e3d1 Sep 30, 2026
28 checks passed
@apcha-oai
apcha-oai deleted the castiron/promotions/pr-185 branch September 30, 2026 15:41
@openai-sdks openai-sdks Bot mentioned this pull request Sep 30, 2026
gh-actions-shared Bot pushed a commit to xf-qubit/openai-python that referenced this pull request Oct 1, 2026
Automated Release PR
---


##
[3.23.0](openai/openai-python@v3.22.1...v3.23.0)
(2026-10-01)


### Features

* **agents:** [1/n] return typed answers from session streams
([openai#4007](openai#4007))
([10f8816](openai@10f8816))
* **agents:** stage files and download turn artifacts
([openai#4009](openai#4009))
([4fc2438](openai@4fc2438))
* **api:** Add session traces and Realtime translations
([openai#4001](openai#4001))
([138e3d1](openai@138e3d1))
* **beta:** expose typed application actions as agent tools
([openai#4006](openai#4006))
([f219c55](openai@f219c55))
* collect final output from beta Agents streams
([157ac4c](openai@157ac4c))


### Bug Fixes

* **api:** allow original image detail in Chat Completions
([openai#4005](openai#4005))
([8a136c2](openai@8a136c2))
* **api:** correct the eval run cancellation endpoint
([openai#4003](openai#4003))
([28c5c9a](openai@28c5c9a))
* **api:** retain WebSocket endpoint paths and query parameters
([openai#3999](openai#3999))
([7f203fd](openai@7f203fd))
* keep Castiron budget results valid when main advances
([openai#4012](openai#4012))
([73f189b](openai@73f189b))
* **responses:** avoid replaying uncertain typed sends on reconnect
([openai#4011](openai#4011))
([1dbbf61](openai@1dbbf61))
* **responses:** respect send queue limits during reconnect
([openai#4000](openai#4000))
([50f95ac](openai@50f95ac))
* use monotonic clock for file processing timeout
([openai#3748](openai#3748))
([58aca1d](openai@58aca1d))


### Chores

* **api:** retain WebRTC Live session transport types
([openai#4002](openai#4002))
([5c9ace9](openai@5c9ace9))
* **deps-dev:** bump pyright from 1.1.413 to 1.1.414
([openai#3902](openai#3902))
([a91d779](openai@a91d779))
* **deps:** bump astral-sh/setup-uv from 10.0.1 to 10.1.0
([openai#3976](openai#3976))
([f15f43c](openai@f15f43c))
* **deps:** bump CodeQL actions to 4.38.1
([openai#3974](openai#3974))
([fb70d66](openai@fb70d66))

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

2 participants