python Pydantic AI Releases · · 2.31.0

Pydantic-AI v2.31.0 Enhances UIEventStream and Addresses Bug Fixes

sdkaigaengineerpython-agentic
feature patch

Pydantic-AI v2.31.0 introduces new flexibility for `UIEventStream` by allowing it to be built without an initial `run_input`, alongside dedicated `thread_id`/`run_id` for `AGUIEventStream`. This update also addresses bugs, including correctly attributing `FallbackModel` spans to the failing model for improved debugging. Additionally, it fixes an issue with passing `openai` through Temporal workflow sandboxes, enhancing integration reliability. These changes primarily affect developers working with UI event streams, AI model fallback logic, or Temporal workflows.

  • Pass openai through Temporal workflow sandboxes by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/7464
Features (1)
  • Allow a UIEventStream to be built without a run_input, and give AGUIEventStream its own thread_id/run_id by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7292

Fixes (2)
  • Attribute failed FallbackModel spans to the failing model, not the fallback: wrapper by @strawgate in https://github.com/pydantic/pydantic-ai/pull/7018

  • Pass openai through Temporal workflow sandboxes by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/7464
Read the original announcement →

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

Related releases