python Pydantic AI Releases · · 2.28.0

Pydantic-AI v2.28.0 Patches High-Severity Security Flaw, Adds Realtime Speech-to-Speech

sdkaigaengineerpython-agentic
feature patch

Pydantic-AI v2.28.0 addresses a high-severity vulnerability in the development web chat UI (`Agent.to_web()`), which previously allowed cross-origin requests to execute agent tools with local privileges. The update mandates `Content-Type: application/json` for requests, effectively mitigating this risk; patches are also available for v1.107.3. This release also introduces new features, including realtime speech-to-speech support for agents and a new Crusoe provider. Additionally, the update includes several bug fixes, enhancing stability and reliability for developers building AI agents.

  • Add realtime speech-to-speech support with Agent.realtime() by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6324
  • Add Crusoe provider by @acheamponge in https://github.com/pydantic/pydantic-ai/pull/6457
  • Add browser WebRTC + server sideband support for realtime speech-to-speech by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6676
  • Test cancellation of concurrent PeekableAsyncStream pulls by @mikemikimike in https://github.com/pydantic/pydantic-ai/pull/7023
  • Only accept JSON request bodies on the web UI chat endpoint by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7382
Features (3)
  • Add realtime speech-to-speech support with Agent.realtime() by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6324
  • Add Crusoe provider by @acheamponge in https://github.com/pydantic/pydantic-ai/pull/6457
  • Add browser WebRTC + server sideband support for realtime speech-to-speech by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6676
Fixes (7)
  • fix(bedrock): attach a leading CachePoint to the preceding user message instead of raising by @Diwak4r in https://github.com/pydantic/pydantic-ai/pull/7071

  • Test cancellation of concurrent PeekableAsyncStream pulls by @mikemikimike in https://github.com/pydantic/pydantic-ai/pull/7023
  • Settle in-flight state and report state_restored honestly on realtime reconnect by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7379

  • Only accept JSON request bodies on the web UI chat endpoint by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7382
  • Await callback results uniformly via a shared await_maybe helper by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7265
  • Fix safe_download Host header dropping non-default port by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/7348
  • Serialize AG-UI dict tool-call deltas with Pydantic Core by @bferanmi806-sketch in https://github.com/pydantic/pydantic-ai/pull/7221
Read the original announcement →

https://github.com/pydantic/pydantic-ai/releases/tag/v2.28.0

Related releases