github pydantic/pydantic-ai v0.2.0
v0.2.0 (2025-05-12)

latest releases: v1.70.0, v1.69.0, v1.68.0...
10 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.