Tools
pydantic-ai 2.40.0 makes voice agents interruptible with first-class barge-in handling
Released 2026-09-05, the realtime session gains `handle_barge_in=True`, `interrupt(played_bytes=...)` and `played_audio_bytes` (#7870), plus `RealtimeSession.enqueue()` for out-of-band prompts from driving code (#8109) and `respond=` on `send()` (#8110). It also adds `@agent.on_event` for registering listeners on an Agent (#8101) and `pydantic_ai.prices.update_in_background()` (#4841), and fixes a realtime tool wedging itself instead of hanging up via `ctx.realtime_session.close()` (#8105). The prior day's 2.39.0 added `gpt-6-astra` support and Azure content-filter error detection for `AzureProvider`.
Source
↳ Follow the thread