v1.96.1

pydantic/pydantic-aiv1.96.1May 15, 2026by DouweM

AI Summary

Fixes OpenAI image generation and system prompt handling, and deprecates Agent constructor parameters for V2.

Key Highlights

  • Fix OpenAI to omit input_fidelity when None
  • Fix OpenAI to respect openai_system_prompt_role
  • Deprecate Agent constructor parameters for V2

New Features

  • OpenAI input_fidelity fix
  • OpenAI system prompt fix

Full Release Notes

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

## What's Changed
### 🆕 V2 Preparation (coming in June)
* Deprecate `Agent` constructor `prepare_tools=`, `prepare_output_tools=`, `event_stream_handler=` in favor of `PrepareTools`, `PrepareOutputTools`, `ProcessEventStream` capabilities by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5335
### 🐛 Bug Fixes
* openai: omit `input_fidelity` when `None` in image generation tool by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/5415
* openai: respect `openai_system_prompt_role` in `OpenAIResponsesModel` by @navalprakhar in https://github.com/pydantic/pydantic-ai/pull/5430

## New Contributors
* @pydanty[bot] made their first contribution in https://github.com/pydantic/pydantic-ai/pull/5415

**Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v1.96.0...v1.96.1