python Pydantic AI Releases · · 2.32.1

Pydantic-AI v2.32.1 Patch Addresses Agent Execution and Anthropic Integration Bugs

sdkaiengineerpython-agentic
patch

Pydantic-AI has released version 2.32.1, a patch update focused on resolving several bugs to improve the stability and flexibility of AI agent development. This release prevents `Agent.run_sync()` calls from synchronous callbacks within agent runs, addressing potential concurrency issues. It also rectifies an issue where empty `thinking` blocks were sent during Anthropic interactions, streamlining communication with the Anthropic API. Additionally, `FunctionModel` now accepts any callable for its `function` or `stream_function` attributes, enhancing developer flexibility.

  • Reject Agent.run_sync() from synchronous callbacks inside agent runs by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7277
  • Don't send Anthropic thinking blocks with an empty signature by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/7601
  • Accept any callable as a FunctionModel function or stream_function by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7589
Fixes (3)
  • Reject Agent.run_sync() from synchronous callbacks inside agent runs by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7277
  • Don't send Anthropic thinking blocks with an empty signature by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/7601
  • Accept any callable as a FunctionModel function or stream_function by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7589
Read the original announcement →

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

Related releases