v1.40.0

pydantic/pydantic-aiv1.40.0Jan 7, 2026by DouweM

AI Summary

Improves Temporal activity summaries with human-readable text and allows agents to call nonexistent tools up to the specified retries limit.

Key Highlights

  • Set human-readable Temporal activity summaries
  • Let agent call nonexistent tool up to retries limit
  • Ensure `stream_output()` calls validator with `partial_output=False` at end
  • Fix `PydanticAIPlugin` to preserve custom `payload_codec`

New Features

  • Human-readable Temporal activity summaries
  • Allow calling nonexistent tools up to retries limit

Full Release Notes

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

## What's Changed
### 🚀 Features
* Set human-readable Temporal activity summaries by @DouweM in https://github.com/pydantic/pydantic-ai/pull/3919
* Let agent call nonexistent tool as often as `Agent` `retries` limit specifies by @geodavic in https://github.com/pydantic/pydantic-ai/pull/3597
### 🐛 Bug Fixes
* Ensure `stream_output()` always calls output function/validator with `partial_output=False` at the end of streaming by @DouweM in https://github.com/pydantic/pydantic-ai/pull/3918
* Fix `PydanticAIPlugin` to preserve custom `payload_codec` and respect `PydanticPayloadConverter` subclasses by @DouweM in https://github.com/pydantic/pydantic-ai/pull/3920

## New Contributors
* @gkarthi-signoz made their first contribution in https://github.com/pydantic/pydantic-ai/pull/3928
* @geodavic made their first contribution in https://github.com/pydantic/pydantic-ai/pull/3597

**Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v1.39.1...v1.40.0