Industry story
Pydantic AI v2.5.0 adds message-history hardening and multimodal tool returns
Pydantic AI v2.5.0 is a quiet but meaningful hardening release for anyone running agents in production. The sanitize_messages utility addresses a real attack surface — agents that accept external conversation context are sitting ducks without it — and the Bedrock provider fixes for Meta, Mistral, and Qwen models close gaps that were silently breaking tool calls in ways that are hard to debug. Multimodal tool returns through AG-UI and Vercel AI adapters matter too: passing images through streaming and history pipelines without losing them is the kind of plumbing that makes or breaks real deployments. If you're running Pydantic AI agents anywhere near external input or AWS Bedrock, this one is worth the upgrade.
Full analysis
Pydantic AI, a Python framework for building type-safe AI agents, released v2.5.0 on July 3 2026. Key new features include a sanitize_messages utility for hardening inbound message history (a security/reliability improvement for agents that receive external conversation context) and round-trip multimodal tool returns through the AG-UI and Vercel AI adapters, enabling agents to pass non-text tool results (e.g. images) through streaming and history pipelines.
The release also fixes several agent-relevant bugs: duplicate deferred tool call IDs are now rejected, AWS Bedrock provider handling is corrected for Meta/Mistral/Qwen models (fixing which models need a synthetic leading user message and which media types are supported in tool returns), and durable-run integrations with DBOS and Prefect now correctly preserve runtime toolsets and event-stream handlers across workflow checkpoints.
Comments