pypi pydantic-ai 2.0.0b4
v2.0.0b4 (2026-05-28)

3 hours ago

🚀 Pydantic AI V2 Beta 4 is here!

For more information on Pydantic AI V2, see the Upgrade Guide.

Beta 4 turns the V1 deprecation warning for prepare-callback None returns into a hard TypeError, and pulls in two V1 releases on top — v1.103.0 and v1.104.0:

What's Changed

🚀 Features

  • Add list_prompts and get_prompt functionality to McpServer by @bdore in #3889
  • Round-trip message timestamps through VercelAIAdapter's UIMessage.metadata by @Genmin in #5279
  • Support anthropic_eager_input_streaming in OpenRouterModel by @Alex-Resch in #5656
  • Drop None returns from tool prepare callbacks by @adtyavrdhn in #5668
  • Add Claude Opus 4.8 support by @dsfaccini in #5709

🐛 Bug Fixes

  • fix(bedrock): map malformed_model_output and malformed_tool_use to FinishReason.error by @kuishou68 in #5640
  • fix(bedrock): recognize type='adaptive' in _is_thinking_enabled by @sevakva in #5651
  • fix(ui): Strip force_download flag from client-submitted FileUrl parts in UIAdapter.sanitize_messages by @colesmcintosh in #5571
  • fix(toolsets): warn when prepare callbacks return None by @dfm88 in #5188
  • Forward thinking=False on hybrid OpenRouter/xAI/Bedrock routes, aligning silent-drop with direct routes by @sarth6 in #5433
  • Fix Bedrock single-tool tool_choice cache preservation by @dsfaccini in #5674

New Contributors

Full Changelog: v2.0.0b3...v2.0.0b4

Don't miss a new pydantic-ai release

NewReleases is sending notifications on new releases.