v1.48.0

pydantic/pydantic-aiv1.48.0Jan 27, 2026by DouweM

AI Summary

This release introduces `allowed_domains` support for WebSearchTool, adds a `continuous_usage_stats` model setting for OpenAI, and applies model settings to Mistral streaming JSON mode. It also includes bug fixes for GPT-5.1+ sampling parameters and OpenAI-compatible embeddings APIs.

Key Highlights

  • Add `allowed_domains` support for `WebSearchTool` with OpenAI
  • Add `continuous_usage_stats` model setting for OpenAI
  • Apply `model_settings` to Mistral streaming JSON mode
  • Fix sampling params for GPT-5.1+ when reasoning is off
  • Support OpenAI-compatible embeddings APIs that omit usage

New Features

  • `allowed_domains` support for `WebSearchTool`
  • `continuous_usage_stats` model setting for OpenAI
  • Apply `model_settings` to Mistral streaming JSON mode

Full Release Notes

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

## What's Changed
### 🚀 Features
* Add `allowed_domains` support for `WebSearchTool` with OpenAI by @eduardojdiniz in https://github.com/pydantic/pydantic-ai/pull/4037
* Add `continuous_usage_stats` model setting for OpenAI by @kousun12 in https://github.com/pydantic/pydantic-ai/pull/4056
* Apply `model_settings` to Mistral streaming JSON mode by @Goldokpa in https://github.com/pydantic/pydantic-ai/pull/4079
### 🐛 Bug Fixes
* Allow sampling params for GPT-5.1+ when reasoning is off by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/4015
* Support "OpenAI-compatible" embeddings APIs that omit usage by @wassafshahzad in https://github.com/pydantic/pydantic-ai/pull/4089

## New Contributors
* @Goldokpa made their first contribution in https://github.com/pydantic/pydantic-ai/pull/4079
* @rgbkrk made their first contribution in https://github.com/pydantic/pydantic-ai/pull/4094
* @DougTrajano made their first contribution in https://github.com/pydantic/pydantic-ai/pull/4081
* @wassafshahzad made their first contribution in https://github.com/pydantic/pydantic-ai/pull/4089
* @kousun12 made their first contribution in https://github.com/pydantic/pydantic-ai/pull/4056
* @eduardojdiniz made their first contribution in https://github.com/pydantic/pydantic-ai/pull/4037

**Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v1.47.0...v1.48.0