v2.27.0
pydantic/pydantic-aiv2.27.0Aug 8, 2026by dsfaccini
AI Summary
Adds new provider support and settings, along with fixes for compaction handling and payload size limits.
Key Highlights
- Add `xai_agent_count` to `XaiModelSettings`
- Add `SnowflakeModel` and `SnowflakeProvider` for Snowflake Cortex
- Round-trip `CompactionPart` through adapters
- Fix payload size limit errors by pointing at the cause
New Features
- Add `xai_agent_count` to `XaiModelSettings`
- Add `SnowflakeModel` and `SnowflakeProvider`
- Round-trip `CompactionPart` through the Vercel AI and AG-UI adapters
Full Release Notes
<!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### 🚀 Features * Add `xai_agent_count` to `XaiModelSettings` by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/7155 * Round-trip `CompactionPart` through the Vercel AI and AG-UI adapters by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7287 * Add `SnowflakeModel` and `SnowflakeProvider` for Snowflake Cortex by @ayirpown in https://github.com/pydantic/pydantic-ai/pull/6150 ### 🐛 Bug Fixes * Honor `include_binary_content=False` in every OTel serialization sink by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7131 * Keep `ToolReturn.tools` in the redacted OTel shape by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7273 * Fix `SpanQuery` `has_attributes` matching for JSON-serialized dict and list values by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/5905 * Skip re-sending the standing prompt where the OpenAI Responses compaction item retains it by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7264 * Round-trip Anthropic compaction `encrypted_content` verbatim by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7286 * Strip the compaction provenance stamp in `sanitize_messages` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7285 * Point at the cause when a tool return or model response exceeds Temporal's payload size limit by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7157 ## New Contributors * @ayirpown made their first contribution in https://github.com/pydantic/pydantic-ai/pull/6150 **Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v2.26.0...v2.27.0