pypi pydantic-ai 2.41.0
v2.41.0 (2026-09-07)

4 hours ago

What's Changed

🚀 Features

  • Deprecate fallback_model in favor of fallback_subagent_model on ImageGeneration and XSearch by @dsfaccini in #8077
  • Add openai-codex provider for ChatGPT/Codex subscription authentication by @mpfaffenberger in #7769
  • Add a direct image generation API with ImageGenerator by @EgonFerri in #5357

🐛 Bug Fixes

  • Report Anthropic native web searches in RequestUsage.details and price them in cost by @adtyavrdhn in #8169
  • Wrap botocore transport errors in ModelAPIError in BedrockConverseModel by @kimnamu in #8131
  • Snap Gemini thinking levels to the nearest supported level by @dsfaccini in #8165

New Contributors

Full Changelog: v2.40.0...v2.41.0

Don't miss a new pydantic-ai release

NewReleases is sending notifications on new releases.