v2.46.0
pydantic/pydantic-aiv2.46.0Sep 19, 2026by DouweM
Upgrading?
AI Summary
This release enhances TypeSafeModel with automatic argument filling and union type handling, introduces new methods for realtime sessions like wait_for_playback, and adds configuration options for model profiles and durability. It also includes bug fixes for Bedrock support, tool dispatch, and terminal UI.
Key Highlights
- Enhanced TypeSafeModel to automatically fill tool arguments and select the correct union output type.
- Improved Realtime Session handling with wait_for_playback() and better transcript attachment.
- Added supports_text_output and typesafe_boolean_threshold to ModelProfile for better model configuration.
- New event_stream_topic in TemporalDurability for streaming agent events via Workflow Streams.
- New Choices helper and UseEnumMemberDocstrings to better describe options at runtime.
New Features
- TypeSafeModel fills tool arguments when Jev can express them.
- RealtimeSession.wait_for_playback() added to finish replies before closing.
- supports_text_output added to ModelProfile for LLMJudge and GEval.
- typesafe_boolean_threshold added to define yes/no thresholds.
- TypeSafeModel fills union of output types by choosing the type first.
- event_stream_topic added to TemporalDurability for Workflow Streams.
- Enum options described by member docstrings via UseEnumMemberDocstrings.
- Choices helper added for described runtime options.
Full Release Notes
<!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### 🚀 Features * Let `TypeSafeModel` fill a tool's arguments when Jev can express them by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8501 * Add `RealtimeSession.wait_for_playback()` and let the docs examples finish the reply before closing by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8141 * Add `supports_text_output` to `ModelProfile`, and run `LLMJudge` and `GEval` on a model without it by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8480 * Add `typesafe_boolean_threshold` for what a yes/no has to be before it is `True` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8505 * Let `TypeSafeModel` fill a union of output types by choosing the type first by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8481 * Add `event_stream_topic` to `TemporalDurability` to stream agent events via Workflow Streams by @brianstrauch in https://github.com/pydantic/pydantic-ai/pull/6639 * Describe an `Enum`'s options by its member docstrings when it mixes in `UseEnumMemberDocstrings` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8479 * Add a `Choices` helper for a set of described options built at run time by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8530 ### 🐛 Bug Fixes * Refuse more options than Jev can pick from in `TypeSafeModel` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8484 * Record a failed `ToolReturnPart` when a realtime tool raises, and keep a tool call and its speech in one `ModelResponse` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8135 * Dispatch tool calls with the live `ToolDefinition` in `CombinedToolset` and `FunctionToolset` by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8082 * Allow adaptive thinking with tool output and forced tool choice on Bedrock by [@pydanty](https://github.com/apps/pydanty) in https://github.com/pydantic/pydantic-ai/pull/7967 * Fix gateway IDs being misclassified as OpenAI o-series models by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8512 * Keep late realtime input transcripts attached to the user turn they belong to by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8139 * Lay the first-run banner out for the terminal's actual width by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8517 * Raise `ModelRetry` when `web_fetch_tool` gets a URL `httpx2` rejects as invalid by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8521 * Price realtime responses so `usage.cost` and `UsageLimits.cost_limit` work in a session by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8136 * Re-arm coverage for code already seen when the dataclass walk resumes it by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8438 ## New Contributors * @brianstrauch made their first contribution in https://github.com/pydantic/pydantic-ai/pull/6639 **Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v2.45.0...v2.46.0
Related Repositories
public-apis/public-apis★ 491,302
A collective list of free APIs
NousResearch/hermes-agent★ 256,157
The agent that grows with you
yt-dlp/yt-dlp★ 200,348
A feature-rich command-line audio/video downloader
microsoft/markitdown★ 191,610
Python tool for converting files and office documents to Markdown.
Significant-Gravitas/AutoGPT★ 187,706
AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.