python Pydantic AI Releases · · 2.32.0

Pydantic-AI v2.32.0 Introduces AI Model Suggestions, xAI Support, and Tooling Enhancements

sdkaigaengineerpython-agentic
feature patch

Pydantic-AI v2.32.0 is now available, bringing new features including suggestions for known AI model names for invalid identifiers, support for xAI attachment search lifecycle, and surfacing OpenRouter web-search sources. The release also adds instrumentation version 6 for emitting tool results and addresses several bug fixes related to synchronous hooks, run context cancellation, and tool call handling. This update primarily benefits developers building AI applications with Pydantic-AI, enhancing debugging, integration with external AI services, and overall stability.

  • Suggest known model names for invalid identifiers by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7325
  • Support xAI attachment search lifecycle by @colesmcintosh in https://github.com/pydantic/pydantic-ai/pull/7156
  • Surface OpenRouter web-search sources in provider_details["annotations"] by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7458
  • Add instrumentation version 6, emitting tool results under role: 'tool' by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7582
  • Only list available tools in the unknown-tool retry message by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/7572
Features (4)
  • Suggest known model names for invalid identifiers by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7325
  • Support xAI attachment search lifecycle by @colesmcintosh in https://github.com/pydantic/pydantic-ai/pull/7156
  • Surface OpenRouter web-search sources in provider_details["annotations"] by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7458
  • Add instrumentation version 6, emitting tool results under role: 'tool' by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7582
Fixes (6)
  • Run sync hooks in a thread pool and enforce timeout= for blocking sync tools and hooks by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/7557

  • Record RunContext.cancel() from setup-phase for_run hooks instead of raising UserError by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/7567

  • Treat a response containing only empty text parts as having no text output by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/7568

  • Only list available tools in the unknown-tool retry message by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/7572
  • Sort tool results ahead of tool availability announcements so Bedrock accepts turns revealing multiple tools by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/7571

  • Drop native tool calls the replayed payload has no result block for by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7504
Read the original announcement →

https://github.com/pydantic/pydantic-ai/releases/tag/v2.32.0

Related releases