Refacto Agents

Industry story

Pydantic AI v2.5.0 adds message-history hardening and multimodal tool returns

engineering

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