v2.31.1

pydantic/pydantic-aiv2.31.1Aug 18, 2026by dsfaccini

AI Summary

Fixes compatibility issues with Bedrock and Gemini models to ensure structured output and thinking levels function correctly across different providers.

Key Highlights

  • Fixed native structured output for Claude Sonnet 5 and Fable 5 on Bedrock
  • Fell back to `thinking_level='LOW'` for Gemini models rejecting `MINIMAL`

Full Release Notes

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

## What's Changed
### 🐛 Bug Fixes
* Deny native structured output for Claude Sonnet 5 and Fable 5 on Bedrock by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/7374
* Fall back to `thinking_level='LOW'` for Gemini models that reject `MINIMAL` by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/7469


**Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v2.31.0...v2.31.1