v2.57.0

pydantic/pydantic-aiv2.57.0Oct 16, 2026by dsfaccini

Upgrading?

AI Summary

This release introduces support for Meta Muse models via the Responses API and enhances real-time streaming capabilities for GPT-Live and Gemini Live. It also improves MCP (Model Context Protocol) integration and introduces a new `ApprovalReviewer` for safer tool execution.

Key Highlights

  • Added `MetaProvider` for Meta Muse models using the Responses API.
  • Enhanced real-time history tracking and usage metrics for GPT-Live and Gemini Live sessions.
  • Introduced `ApprovalReviewer` in Harness to approve low-risk tool calls before human review.
  • Improved MCP Apps integration by forwarding tool results to AG-UI and Vercel AI frontends.
  • Fixed token-based compaction retaining too little history and various session management bugs.

New Features

  • Added `MetaProvider` for Meta Muse models.
  • Added `ApprovalReviewer` to Harness for low-risk tool call approval.
  • Added `dataset_name` to `EvaluationReport`.
  • Forwarded MCP Apps tool results to AG-UI and Vercel AI frontends.
  • Added `MCPToolset.call_tool_for_app` to relay MCP Apps tool calls.
  • Implemented price requests at the reported service tier.

Full Release Notes

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

## What's Changed
### ⚠️ Compatibility Notes
* Attach namespaced `origin` and `tool_call_id` metadata to `BackgroundTools` completions by @michaeldunn9 in https://github.com/pydantic/pydantic-ai/pull/10196
* Take GPT-Live realtime history, usage, and reply waits from the session core by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10083
* Honour `disable-model-invocation` and `user-invocable` in `Skills`, and skip stray skill library paths by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10378
* Take Gemini Live realtime history, usage, and reply waits from the session core by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10082
### 🚀 Features
* Add `MetaProvider` for Meta Muse models, with `meta:` using the Responses API by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10156
* Add Harness `ApprovalReviewer` to let a model approve low-risk tool calls before a person sees them by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10143
* Price requests at their reported service tier by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/10244
* Add `dataset_name` to `EvaluationReport` by @jirikuncar in https://github.com/pydantic/pydantic-ai/pull/10307
* Forward MCP Apps tool results to AG-UI and Vercel AI frontends and add `MCPToolset.read_resource_contents` by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/10179
* Relay MCP Apps tool calls with `MCPToolset.call_tool_for_app` by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/10190
### 🐛 Bug Fixes
* Fix token-based compaction retaining too little recent history by @AndrewTilson in https://github.com/pydantic/pydantic-ai/pull/9784
* Record and stream one part per realtime output item when its transcript arrives late by [@pydanty](https://github.com/apps/pydanty) in https://github.com/pydantic/pydantic-ai/pull/10097
* Reference multimodal URL choices in the `ToolReturnContent` discriminator mapping by @Kludex in https://github.com/pydantic/pydantic-ai/pull/10239
* Stop `OpenAIResponsesModel` sending unavailable `tool_choice` names in `allowed_tools` by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10232
* Send Gemini tool-call thought signatures (`extra_content`) back from `OpenAIChatModel` by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10235
* Give a tool's `prepare` its own retry count under `.prefixed()`, `.renamed()` and `PrefixTools` by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10219
* Support Gemini agentic media processing in `GoogleModel` by @miguel-flowstate in https://github.com/pydantic/pydantic-ai/pull/8028
* Stop granting native `tool_search` to `gpt-5.4-nano` by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10272
* Omit unset optional fields from Vercel AI `UIMessage` JSON so the AI SDK accepts it by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/10175
* Keep `Planning` tool loops in the prompt cache, and attach a leading `CachePoint` to the previous user message on `OpenRouterModel` by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/10257
* Release concurrency slots after streamed request cleanup by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10225
* Backfill an empty thinking field on current-turn tool calls in `OpenAIChatModel`'s default `'auto'` mode by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10251
* Keep `available_tool_names` and `active_capability_ids` on run context copies inside Temporal activities and Render child tasks by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10280
* Reconnect an xAI realtime session past `max_duration` when a `reconnect` policy is set by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10056
* Await `ProcessEventStream` cleanup after early exit and cancellation by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/10341
* Count the request of a GPT-Live backend response that ends while the session closes by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10084
* Warn when `FallbackModel` response handlers are skipped on a streamed request by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10066
* Close the HTTP client of a model a run builds from a model name, and reuse one per name inside `async with agent:` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10067
* Make waits between continuation polls durable `DBOS.sleep` steps under `DBOSDurability` and `DBOSAgent` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10383
* Charge the partial response of an interrupted stream in `SpendLimits` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10069
* Stop `WarnNearLimits` from deleting user prompts that quote its `[WarnNearLimits]` marker by @DouweM in https://github.com/pydantic/pydantic-ai/pull/10391

## New Contributors
* @AndrewTilson made their first contribution in https://github.com/pydantic/pydantic-ai/pull/9784
* @miguel-flowstate made their first contribution in https://github.com/pydantic/pydantic-ai/pull/8028
* @jirikuncar made their first contribution in https://github.com/pydantic/pydantic-ai/pull/10307
* @michaeldunn9 made their first contribution in https://github.com/pydantic/pydantic-ai/pull/10196

**Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v2.56.0...v2.57.0

Related Repositories