Skip to content

Commit 7bfb947

Browse files
authored
Add breaking change notification for ModelResponse.usage (#1692)
1 parent 63af922 commit 7bfb947

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ See [#1248](https://github.com/pydantic/pydantic-ai/pull/1248) — the attribute
1818

1919
See [#1484](https://github.com/pydantic/pydantic-ai/pull/1484)`format_as_xml` was moved and made available to import from the package root, e.g. `from pydantic_ai import format_as_xml`.
2020

21+
### v0.2.0 (2025-05-12)
22+
23+
See [#1647](https://github.com/pydantic/pydantic-ai/pull/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:
24+
25+
* Adds `usage` to `ModelResponse` (field has a default factory of `Usage()` so it'll work to load data that doesn't have usage)
26+
* changes the return type of `Model.request` to just `ModelResponse` instead of `tuple[ModelResponse, Usage]`
27+
2128
---
2229

2330
## Full Changelog

0 commit comments

Comments
 (0)