v1.107.0

dforwardfeed/memo_generatorv1.107.0Jun 10, 2026by dsfaccini

AI Summary

This release addresses a security vulnerability regarding `UploadedFile` handling in UI adapters and introduces new features for OpenRouter prompt caching and support for new Claude models.

Key Highlights

  • Security fix for confused-deputy file read vulnerability
  • New `known_model_names()` method
  • OpenRouter prompt caching support via `CachePoint`
  • Support for Claude Fable 5 and Mythos 5
  • Bug fixes for Anthropic Bedrock streaming and token counting

New Features

  • New `known_model_names()` method
  • OpenRouter prompt caching support
  • Support for Claude Fable 5
  • Support for Claude Mythos 5

Full Release Notes

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

## What's Changed
### 🛡️ Security
* Handle `UploadedFile` consistently with `FileUrl` in UI adapters by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5772
	* Security advisory: `VercelAIAdapter` trusts client-controlled provider metadata to construct `UploadedFile` references (confused-deputy file read) https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-h7p7-w5gc-xj3w
	* This fix went out in [v1.106.0](https://github.com/pydantic/pydantic-ai/releases/tag/v1.106.0) and [v2.0.0b6](https://github.com/pydantic/pydantic-ai/releases/tag/v2.0.0b6).
	* You are affected **only** if your application passes untrusted client-submitted message history to an agent through a UI adapter (e.g. `VercelAIAdapter`), **AND** your model-provider or cloud-storage account holds files referenceable by an attacker-guessable `UploadedFile` id or storage URI (e.g. `s3://…`, `gs://…`).
	* You are **not** affected if you do not pass untrusted client-submitted message history to the agent, or you strip `UploadedFile` parts before running it.
	* You are **not** affected via `AGUIAdapter` / `Agent.to_ag_ui` on defaults — the `preserve_file_data` flag that re-enables this path is off by default.
### 🚀 Features
* Add `known_model_names()` to enumerate `KnownModelName` members by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5803
* feat(openrouter): add `CachePoint` and prompt caching support by @Adversarian in https://github.com/pydantic/pydantic-ai/pull/4604
* Add Claude Fable 5 (`claude-fable-5`) and Claude Mythos 5 (`claude-mythos-5`) support by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5849
### 🐛 Bug Fixes
* fix(anthropic): guard `message=None` Bedrock start events in stream path by @Bartok9 in https://github.com/pydantic/pydantic-ai/pull/5818
* Fix `AnthropicModel.count_tokens` with native tools by @kazmer97 in https://github.com/pydantic/pydantic-ai/pull/5704
### 📦 Dependencies
* chore(deps): bump the python-packages group across 1 directory with 18 updates by @dependabot[bot] in https://github.com/pydantic/pydantic-ai/pull/5768

## New Contributors
* @Bartok9 made their first contribution in https://github.com/pydantic/pydantic-ai/pull/5818
* @kazmer97 made their first contribution in https://github.com/pydantic/pydantic-ai/pull/5704

**Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v1.106.0...v1.107.0