Pydantic-AI v2.17.0: Cache OTel serialization, support arbitrary fields
This release of Pydantic-AI introduces support for arbitrary fields in `RequestUsage` and `RunUsage` to accommodate upcoming genai-prices. It also caches OpenTelemetry serialization per message, significantly reducing instrumentation costs from quadratic to linear. These changes benefit developers working with generative AI models, offering enhanced flexibility and improved performance.
- →Cache per-message OTel serialization to avoid O(n²) instrumentation cost by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6635
Features (2) ›
Make RequestUsage and RunUsage support arbitrary fields for upcoming genai-prices by @alexmojaki in https://github.com/pydantic/pydantic-ai/pull/6683
- Cache per-message OTel serialization to avoid O(n²) instrumentation cost by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6635
Fixes (1) ›
Fix ContentFilterError for real Model Armor response blocks (finishReason: MODEL_ARMOR) and record moderation wire-truth cassettes by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6679
https://github.com/pydantic/pydantic-ai/releases/tag/v2.17.0
Related releases
- ADK-Python v2.9.0 enhances agent resilience, voice integration, and workflow management Google ADK (Python) Releases ·
- CrewAI 1.15.21 Release Introduces Telemetry and Resolves Multiple Bugs CrewAI Releases ·
- OpenAI Python Agents SDK v0.22.2 Released OpenAI Agents SDK (Python) Releases ·
- Pydantic-AI v2.42.0 Enhances GitHub Copilot Integration and Fixes Bugs Pydantic AI Releases ·
- OpenAI Agents Python SDK v0.22.1 enhances tools, guardrails, and voice features OpenAI Agents SDK (Python) Releases ·
- Pydantic-AI v2.41.0 Adds Image Generation API, Deprecates `fallback_model` Pydantic AI Releases ·