python Pydantic AI Releases · · 2.1.0

pydantic-ai v2.1.0: Anthropic web tools, serialization, and bug fixes

sdkaiengineerpython-agentic
feature patch

Pydantic-ai has released version 2.1.0, introducing new features like Anthropic web tools for server-tool replay and improved instrumentation message serialization. Several bug fixes are also included, addressing issues with tool errors, streaming behavior, and Bedrock token counting. This release impacts developers integrating AI models with Pydantic, particularly those using Anthropic or Bedrock.

  • Add Anthropic _20260209 web tools with server-tool replay by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/4844
  • Add TypeAdapter for EvaluatorContext by @hon-gyu in https://github.com/pydantic/pydantic-ai/pull/3373
  • Convert ExceptionGroup-wrapped tool errors to ModelRetry in MCPToolset by @dmontagu in https://github.com/pydantic/pydantic-ai/pull/6004
  • prevent cancel() from flipping complete state on finished stream by @Oxygen56 in https://github.com/pydantic/pydantic-ai/pull/5795
  • fix(temporal): add return type annotation to PydanticAIPlugin.__init__ by @syf2211 in https://github.com/pydantic/pydantic-ai/pull/6065
Features (3)
  • feat Add Anthropic _20260209 web tools with server-tool replay by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/4844
  • Serialize instrumentation message attributes with to_json instead of json.dumps by @Kludex in https://github.com/pydantic/pydantic-ai/pull/6045

  • Add TypeAdapter for EvaluatorContext by @hon-gyu in https://github.com/pydantic/pydantic-ai/pull/3373
Fixes (4)
  • Convert ExceptionGroup-wrapped tool errors to ModelRetry in MCPToolset by @dmontagu in https://github.com/pydantic/pydantic-ai/pull/6004
  • fix prevent cancel() from flipping complete state on finished stream by @Oxygen56 in https://github.com/pydantic/pydantic-ai/pull/5795
  • fix(temporal): add return type annotation to PydanticAIPlugin.__init__ by @syf2211 in https://github.com/pydantic/pydantic-ai/pull/6065
  • fix(anthropic): support Bedrock token counting by @dyscott in https://github.com/pydantic/pydantic-ai/pull/5480
Read the original announcement →

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

Related releases