v1.77.0
pydantic/pydantic-aiv1.77.0Apr 3, 2026by DouweM
AI Summary
The release focuses on expanding tool capabilities with a local `WebFetch` implementation and adding `ThreadExecutor` support, alongside improvements in instruction caching and streaming SDK error handling.
Key Highlights
- Added local `WebFetch` tool with fallback logic for providers lacking builtin support.
- Added `defer_loading` to tools to enable lazy initialization.
- Added `ThreadExecutor` capability and `Agent.using_thread_executor()` method.
- Implemented smart instruction caching for Anthropic/Bedrock models.
- Wrapped streaming SDK errors in `ModelHTTPError`/`ModelAPIError`.
New Features
- Local WebFetch tool
- `defer_loading` for tools
- `ThreadExecutor` capability
- Smart instruction caching
Full Release Notes
<!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### 🚀 Features * feat: add local `WebFetch` tool and have `WebFetch` capability use it when provider lacks builtin support by @DEENUU1 in https://github.com/pydantic/pydantic-ai/pull/4906 * Add `defer_loading` to tools and toolsets to enable tool search by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/4090 * Add `ThreadExecutor` capability and `Agent.using_thread_executor()` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/4942 * feat: smart instruction caching — automatically insert Anthropic/Bedrock cache boundary at static/dynamic split by @Alex-Resch in https://github.com/pydantic/pydantic-ai/pull/4865 * Support `server_message_id` in `VercelAIEventStream` by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/4579 ### 🐛 Bug Fixes * fix: run output validators for image outputs by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/4938 * Wrap streaming SDK errors in `ModelHTTPError`/`ModelAPIError` by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/4889 ## New Contributors * @Alex-Resch made their first contribution in https://github.com/pydantic/pydantic-ai/pull/4865 **Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v1.76.0...v1.77.0