pypi pydantic-ai 2.30.0
v2.30.0 (2026-08-13)

6 hours ago

What's Changed

🛡️ Security

  • GHSA-q2xc-rrxj-58x9: the local dev web chat UI (Agent.to_web(), clai web) didn't validate the Host header, so DNS rebinding from a website you visit could reach it and run the served agent with your local process's tools and credentials. Fixed in pydantic-ai/pydantic-ai-slim 2.30.0 by validating Host against localhost/loopback/LAN addresses by default; deployments reached under a real hostname must opt in with the new allowed_hosts setting.

🚀 Features

  • Use openrouter:web_search for web search by @dsfaccini in #7378
  • Add gemini-3.7-flash model by @dsfaccini in #7445
  • Expose gRPC metadata on XaiProvider by @pydanty[bot] in #7423
  • Add allowed_hosts to Agent.to_web() and clai web by @DouweM in #7437

🐛 Bug Fixes

  • Resolve deferred openai resource imports and genai-prices data loading at Model construction time by @adtyavrdhn in #7408
  • Fall back to ASCII in EvaluationReport.print() on non-UTF-8 consoles by @dsfaccini in #7290
  • Lowercase model name before profile lookup in SambaNova, Heroku, and Fireworks providers by @pydanty[bot] in #6818
  • Update LatestCerebrasModelNames to current model catalog by @pydanty[bot] in #6838
  • Require a deferred tool to be revealed, and its capability loaded, before it can be called by @DouweM in #7271
  • Anchor the tool-callability evidence window to the response's serving provider by @DouweM in #7442

Full Changelog: v2.29.0...v2.30.0

Don't miss a new pydantic-ai release

NewReleases is sending notifications on new releases.