v2.25.0

pydantic/pydantic-aiv2.25.0Aug 6, 2026by dsfaccini

AI Summary

Enhances xAI integration, fixes provider-specific settings for Azure and OpenAI models, and corrects thinking levels for specific GPT models.

Key Highlights

  • Forwarded xAI `FileSearchTool` collections search options
  • Fixed `max_tokens` for Azure/Mistral models
  • Fixed `thinking="minimal"` for GPT-5.6 models

New Features

  • Support xAI attachment search lifecycle

Full Release Notes

<!-- Release notes generated using configuration in .github/release.yml at main -->

## What's Changed
### 🚀 Features
* Forward xAI `FileSearchTool` collections search options by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/7154
### 🐛 Bug Fixes
* fix(azure): send `max_tokens` for Mistral models, not `max_completion_tokens` by @feiiiiii5 in https://github.com/pydantic/pydantic-ai/pull/6929
* Omit server attributes for a malformed `base_url` port and forward `base_url` through `WrapperModel` by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7136
* Fix `thinking="minimal"` for GPT-5.6 models by @daikeren in https://github.com/pydantic/pydantic-ai/pull/7082
* Degrade malformed tool-call args in `ToolCallPart.args_as_json_str()` by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7092

## New Contributors
* @feiiiiii5 made their first contribution in https://github.com/pydantic/pydantic-ai/pull/6929
* @daikeren made their first contribution in https://github.com/pydantic/pydantic-ai/pull/7082

**Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v2.24.0...v2.25.0