v1.97.0

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

AI Summary

Introduces error evaluation, splits Google provider, adopts fastmcp-slim for MCP, and moves pydantic_graph.beta out of beta.

Key Highlights

  • Add OnlineEvaluator.run_on_errors for failed calls
  • Split GoogleProvider into GoogleProvider and GoogleCloudProvider
  • Add MCPToolset using fastmcp-slim[client]
  • Set ModelResponse.state to incomplete during streaming
  • Move pydantic_graph.beta API out of beta

New Features

  • OnlineEvaluator error evaluation
  • Google provider restructuring
  • MCPToolset adoption
  • Streaming state updates
  • pydantic_graph.beta stability

Full Release Notes

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

## What's Changed
### 🚀 Features
* feat(evals): add `OnlineEvaluator.run_on_errors` to opt into evaluating failed calls by @dmontagu in https://github.com/pydantic/pydantic-ai/pull/5456
* Split `GoogleProvider(vertexai=True|False)` into `GoogleProvider` + `GoogleCloudProvider`; rename provider ID `google-gla:` to `google:`, `google-vertex:` to `google-cloud:`; deprecate old names by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5336
* Add `MCPToolset` that uses `fastmcp-slim[client]`, deprecate `MCPServer*` and `FastMCPToolset` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/5325
* Set `ModelResponse.state` to `incomplete` while response is still streaming by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/5455
* Move `pydantic_graph.beta` API out of beta, deprecate old API by @dmontagu in https://github.com/pydantic/pydantic-ai/pull/5306

### 🆕 V2 Preparation
* Deprecate `stream_responses()` for `stream_response()`; new singular yields `ModelResponse` instead of `(ModelResponse, is_last)` tuple by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5296
* Deprecate `Agent.to_a2a()` and bundled `fasta2a` integration; `fasta2a` has been [adopted by DataLayer](https://pydantic.dev/articles/pydantic-donates-fasta2a-to-datalayer) and users can use `fasta2a.pydantic_ai` (requires `fasta2a` v0.6.1) instead by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5426

## New Contributors
* @Quratulain-bilal made their first contribution in https://github.com/pydantic/pydantic-ai/pull/5439

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