v2.12.0

pydantic/pydantic-aiv2.12.0Jul 17, 2026by dsfaccini

AI Summary

This release introduces support for the Moonshot AI `kimi-k3` model and enhances event handling with new events for tracking deferred tool calls and message enqueuing. It also resolves several bugs related to tool binding, serialization, and streaming outputs for providers like Mistral and Google.

Key Highlights

  • Add Moonshot AI `kimi-k3` model support
  • Emit `EnqueuedMessagesEvent` when messages are delivered
  • Add `DeferredToolCallEvent` and `DeferredToolResultEvent` to `AgentStreamEvent`
  • Fix tool binding for POSITIONAL_OR_KEYWORD params with `*args`
  • Fix `ToolReturnPart` serialization to use field aliases

New Features

  • New Moonshot AI `kimi-k3` model integration
  • New `EnqueuedMessagesEvent` emitted when messages are delivered
  • New `DeferredToolCallEvent` and `DeferredToolResultEvent` types

Full Release Notes

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

## What's Changed
### 🚀 Features
* Add Moonshot AI `kimi-k3` model by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6551
* Emit `EnqueuedMessagesEvent` when enqueued messages are delivered into the run by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6256
* feat: add `DeferredToolCallEvent` and `DeferredToolResultEvent` to `AgentStreamEvent` by @YHallouard in https://github.com/pydantic/pydantic-ai/pull/5588
### 🐛 Bug Fixes
* Fix `ToolReturnPart` serialization to use field aliases so wire output matches `return_schema` by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/6543
* Fix tool binding for POSITIONAL_OR_KEYWORD params with `*args` by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/6541
* fix(mistral): defer streamed output emission when text ends mid-integer-token by @Mukller in https://github.com/pydantic/pydantic-ai/pull/6519
* Derive capability-contributed toolset `id` from the capability for durable execution by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6408
* Fix `GoogleModel` per-Part `media_resolution` forwarding in `vendor_metadata` by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/6525

## New Contributors
* @Mukller made their first contribution in https://github.com/pydantic/pydantic-ai/pull/6519
* @YHallouard made their first contribution in https://github.com/pydantic/pydantic-ai/pull/5588

**Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v2.11.0...v2.12.0