This release adds 2 notable features for engineering teams evaluating rollout.
Published 23d
AI Agents & Assistants
β No known CVEs patched
✓ No known CVEs patched in this version
Topics
agent-framework
genai
llm
pydantic
python
Summary
AI summaryUpdates π Bug Fixes, π Features, and dbos across a mixed release.
Full changelog
What's Changed
π Features
- Add
sanitize_messagesfor inbound message-history hardening by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6169 - Round-trip multimodal tool returns through the AG-UI and Vercel AI adapters (history and streaming) by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5255
π Bug Fixes
- Document why
_clean_message_historymerges consecutiveModelRequests regardless ofconversation_id/metadataby @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6221 - Align LLMJudge
_build_promptsection order with its few-shot examples by @immuhammadfurqan in https://github.com/pydantic/pydantic-ai/pull/6111 - Reject duplicate deferred tool call IDs by @hramezani in https://github.com/pydantic/pydantic-ai/pull/6241
- Fix MoonshotAI Kimi
thinkingsupport and add models toKnownModelNamesby @SuperMarioYL in https://github.com/pydantic/pydantic-ai/pull/6208 - fix(dbos,prefect): preserve runtime
toolsetsin durable runs by @Trollgeir in https://github.com/pydantic/pydantic-ai/pull/6076 - Exclude first-class token counts from
gen_ai.usage.details.*OTel attributes to fix double-counting by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6244 - fix(dbos,prefect): preserve runtime event stream handlers by @Trollgeir in https://github.com/pydantic/pydantic-ai/pull/6093
- Reject non-object agent spec inputs by @Ghraven in https://github.com/pydantic/pydantic-ai/pull/5820
- Run the sync streaming wrappers on an
anyioportal thread; fix asyncstream_textearly-break teardown by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6199 - fix(bedrock): only synthesize a leading user message for models that require it by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6255
- fix(bedrock): correct
bedrock_supported_media_kinds_in_tool_returnsfor Meta, Mistral, and Qwen by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6254
π¦ Dependencies
- Avoid Python 3.14
numpysource builds in examples by @hramezani in https://github.com/pydantic/pydantic-ai/pull/6246
New Contributors
- @pragnyanramtha made their first contribution in https://github.com/pydantic/pydantic-ai/pull/5490
- @Sehlani042 made their first contribution in https://github.com/pydantic/pydantic-ai/pull/6200
- @ChunkyTortoise made their first contribution in https://github.com/pydantic/pydantic-ai/pull/5739
Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.4.0...v2.5.0
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
Related context
Related tools
Earlier breaking changes
- v1.95.0 rename βbuilt-in toolsβ to βnative toolsβ, deprecate old fields, register via capabilities=[NativeTool(...)]
Beta — feedback welcome: [email protected]