🚀 Pydantic AI V2 Beta 7 is here!
For more information on Pydantic AI V2, see the release notes for v2.0.0b1 and the Upgrade Guide.
Beta 7 adds no new breaking or v2-specific changes, but pulls in these changes from v1.107.0:
What's Changed
🛡️ Security
- Handle
UploadedFileconsistently withFileUrlin UI adapters by @dsfaccini in #5772- Security advisory:
VercelAIAdaptertrusts client-controlled provider metadata to constructUploadedFilereferences (confused-deputy file read) GHSA-h7p7-w5gc-xj3w - This fix went out in v1.106.0 and 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-guessableUploadedFileid 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
UploadedFileparts before running it. - You are not affected via
AGUIAdapter/Agent.to_ag_uion defaults — thepreserve_file_dataflag that re-enables this path is off by default.
- Security advisory:
🚀 Features
- Add
known_model_names()to enumerateKnownModelNamemembers by @dsfaccini in #5803 - feat(openrouter): add
CachePointand prompt caching support by @Adversarian in #4604 - Add Claude Fable 5 (
claude-fable-5) and Claude Mythos 5 (claude-mythos-5) support by @dsfaccini in #5849
🐛 Bug Fixes
- fix(anthropic): guard
message=NoneBedrock start events in stream path by @Bartok9 in #5818 - Fix
AnthropicModel.count_tokenswith native tools by @kazmer97 in #5704
📦 Dependencies
- chore(deps): bump the python-packages group across 1 directory with 18 updates by @dependabot[bot] in #5768
New Contributors
Full Changelog: v2.0.0b6...v2.0.0b7