v1.37.0
pydantic/pydantic-aiv1.37.0Dec 20, 2025by DouweM
AI Summary
This release enhances Temporal Agent capabilities by allowing model switching at runtime and supports new image generation options for Vertex AI. It also fixes a duplicate message issue in streaming output.
Key Highlights
- Allow `TemporalAgent` to switch model at `agent.run`-time
- Add `DynamicToolset` support in Temporal
- Support for `ImageGenerationTool` output compression and format
- Fix `StreamedRunResult.get_output()` creating duplicate messages
New Features
- Temporal model switching
- DynamicToolset support
- Image generation output options
- Streaming output duplication fix
Full Release Notes
## What's Changed * Allow `TemporalAgent` to switch model at `agent.run`-time by @mattbrandman in https://github.com/pydantic/pydantic-ai/pull/3537 * Add `DynamicToolset` support in Temporal by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/3682 * Add support for `ImageGenerationTool` `output_compression` and `output_format` for Vertex AI Gemini image models by @h0rv in https://github.com/pydantic/pydantic-ai/pull/3759 * Update known Groq model names (add production/preview, remove deprecated) by @hima12-awny in https://github.com/pydantic/pydantic-ai/pull/3774 * Add model profile flag for APIs that support native output but still require JSON schema in instructions by @xcpky in https://github.com/pydantic/pydantic-ai/pull/3744 * Set `ToolRetryError` message by @jamesaud in https://github.com/pydantic/pydantic-ai/pull/3718 * Fix `StreamedRunResult.get_output()` creating duplicate messages if `stream_output()` has already been called by @DouweM in https://github.com/pydantic/pydantic-ai/pull/3777 * Re-add `clai --help` output to clai README by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/3766 ## New Contributors * @hima12-awny made their first contribution in https://github.com/pydantic/pydantic-ai/pull/3774 * @jamesaud made their first contribution in https://github.com/pydantic/pydantic-ai/pull/3718 **Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v1.36.0...v1.37.0