pypi pydantic-ai 0.2.0
v0.2.0 (2025-05-12)

latest releases: 2.0.0, 2.0.0b7, 1.107.0...
13 months ago

Breaking Changes

See #1647 — usage makes sense as part of ModelResponse, and could be really useful in "messages" (really a sequence of requests and response). In this PR:

  • Adds usage to ModelResponse (field has a default factory of Usage() so it'll work to load data that doesn't have usage)
  • changes the return type of Model.request to just ModelResponse instead of tuple[ModelResponse, Usage]

Other Changes

New Contributors

Full Changelog: v0.1.11...v0.2.0

Don't miss a new pydantic-ai release

NewReleases is sending notifications on new releases.