SIGN IN SIGN UP

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

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

Co-authored-by: apcha-oai <228803254+apcha-oai@users.noreply.github.com>
A
Alex Chang committed
138e3d14c4bff1322e5c96de711e272bebb77cc2
Parent: 7f203fd
Committed by GitHub <noreply@github.com> on 9/30/2026, 3:36:16 PM