pydantic-ai v2.54.0: Draft-7 JSON Schema, CLI Improvements, Bug Fixes
pydantic-ai v2.54.0 brings improved JSON schema handling (including draft-7 list-form `items`), CLI enhancements, better error reporting, and bug fixes. Explicit configuration is now required for agent folders. Developers using JSON schema validation or advanced model features should review compatibility and update usage for seamless integration.
What changed?
pydantic-ai v2.54.0 introduces several significant updates: - Enhanced JSON Schema support: The `JsonSchemaTransformer` and `TestModel` now handle draft-7 list-form `items`, accept boolean subschemas, and cap `prefixItems` at `maxItems`. This change improves compatibility with a broader range of JSON schemas. - CLI and session management improvements: The `clai2` CLI supports more robust file diff theming, session updates, model management, and a double-Esc rewind feature. - Model and tooling updates: OpenAI LiveModel sessions can now recover after connection drops by replaying history. Web search tools received backend delegation enhancements and preference options for native/local web search. - Agent configuration update: The default loading of the `agents` folder is removed. Users must now explicitly specify `agent_folders='agents'` if desired. - Numerous bug fixes: These address diverse issues in model session management, error propagation, and shell behavior.
Why does it matter to an everyday developer?
These updates strengthen out-of-the-box support for standards-compliant schemas, reduce manual workarounds, and prevent subtle validation bugs when integrating with evolving tooling or APIs. Developers using pydantic-ai for agent-based workflows, model validation, or automation can expect more predictable behavior and increased flexibility, especially in multi-agent configurations or when extending with custom JSON Schema sources. The explicit requirement for agent folders means you must update deployment scripts or configurations to avoid disruptions.
