v1.81.0
pydantic/pydantic-aiv1.81.0Apr 14, 2026by DouweM
AI Summary
Focuses on fixing compaction usage tracking, cache key computation, and JSON schema handling. It ensures that caching keys are correct and that JSON schemas are parsed accurately.
Key Highlights
- Fix Anthropic compaction usage totals
- Exclude `run_id` from cache key computation in PrefectAgentInputs
- Fix boolean JSON Schema nodes in JsonSchemaTransformer
Full Release Notes
<!-- Release notes generated using configuration in .github/release.yml at main --> ## 🤖 [Pydantic AI Harness](https://github.com/pydantic/pydantic-ai-harness) is now live with [**Code Mode**](https://github.com/pydantic/pydantic-ai-harness/tree/main/pydantic_ai_harness/code_mode) powered by [Monty](https://github.com/pydantic/monty)! ## What's Changed ### 🐛 Bug Fixes * Fix Anthropic compaction usage totals by @pandego in https://github.com/pydantic/pydantic-ai/pull/5068 * Exclude `run_id` from cache key computation in `PrefectAgentInputs` by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/3890 * fix: handle boolean JSON Schema nodes in `JsonSchemaTransformer` by @Dharit13 in https://github.com/pydantic/pydantic-ai/pull/4989 * fix: close pending tool calls on stream error by @proever in https://github.com/pydantic/pydantic-ai/pull/4963 * fix: skip api-version query parameter for Azure AI Foundry serverless endpoints by @Ricardo-M-L in https://github.com/pydantic/pydantic-ai/pull/5071 ## New Contributors * @Dharit13 made their first contribution in https://github.com/pydantic/pydantic-ai/pull/4989 * @pandego made their first contribution in https://github.com/pydantic/pydantic-ai/pull/5068 **Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v1.80.0...v1.81.0