v2.3.0
pydantic/pydantic-aiv2.3.0Jul 2, 2026by dsfaccini
AI Summary
Adds native Z.AI (Zhipu AI) provider with thinking support and fixes various bugs regarding Bedrock tool results, HuggingFace file content, and AGUI/Vercel AI message round-trips.
Key Highlights
- Add native Z.AI (Zhipu AI) provider with thinking support
- Fix Bedrock tool results to keep non-empty for empty lists
- Fix HuggingFace to not silently drop file content in tool returns
- Fix AGUI/Vercel AI message round-trips by preserving tool_kind and vendor_metadata
New Features
- Native Z.AI (Zhipu AI) provider with thinking support
- Durable-exec MCP get_tools caching replay-deterministic
Full Release Notes
<!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### 🚀 Features * Add native Z.AI (Zhipu AI) provider with thinking support by @eliasaronson in https://github.com/pydantic/pydantic-ai/pull/4273 ### 🐛 Bug Fixes * fix(test): set `provider_name` on `TestModel` non-streaming responses by @syf2211 in https://github.com/pydantic/pydantic-ai/pull/6066 * Keep Bedrock tool results non-empty for empty lists by @Whning0513 in https://github.com/pydantic/pydantic-ai/pull/6155 * fix(huggingface): don't silently drop file content in tool returns by @HaozheZhang6 in https://github.com/pydantic/pydantic-ai/pull/5881 * fix: skip OpenAI thinking-only chat history messages by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6182 * Don't send `defer_loading` without `tool_search` on models without native tool search by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6144 * Route remaining instrumentation serialization through `safe_to_json` by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6073 * fix: reconstruct multimodal `ToolReturnPart.content` via a `ToolReturnContent` discriminator by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6191 * Fix `AGUIAdapter.dump_messages` reordering `ToolReturnPart` after `UserPromptPart` by @amarjaleelbanbhan in https://github.com/pydantic/pydantic-ai/pull/5969 * fix: track `new_messages()` boundary by position so a rebuilt resumed request isn't leaked by @klplentific in https://github.com/pydantic/pydantic-ai/pull/6034 * Preserve `tool_kind` in Vercel AI and AG-UI message round-trips by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/5873 * Make durable-exec MCP `get_tools` caching replay-deterministic by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5883 * Preserve `FilePart.content.vendor_metadata` in AG-UI and Vercel AI adapter round-trips by @Navaneethp007 in https://github.com/pydantic/pydantic-ai/pull/6095 * Resolve dynamic toolset `get_instructions` in an activity under Temporal by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5925 ## New Contributors * @Whning0513 made their first contribution in https://github.com/pydantic/pydantic-ai/pull/6155 * @eliasaronson made their first contribution in https://github.com/pydantic/pydantic-ai/pull/4273 * @amarjaleelbanbhan made their first contribution in https://github.com/pydantic/pydantic-ai/pull/5969 * @klplentific made their first contribution in https://github.com/pydantic/pydantic-ai/pull/6034 * @Navaneethp007 made their first contribution in https://github.com/pydantic/pydantic-ai/pull/6095 **Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v2.2.0...v2.3.0