Skip to content

Conversation

@DouweM
Copy link
Collaborator

@DouweM DouweM commented Sep 3, 2025

Fixes #2789

Oversight from #2378, which went into v0.7.3 despite these being breaking changes.

@DouweM DouweM self-assigned this Sep 3, 2025
@github-actions
Copy link

github-actions bot commented Sep 3, 2025

Docs Preview

commit: 5f6999e
Preview URL: https://f454a693-pydantic-ai-previews.pydantic.workers.dev

@DouweM DouweM force-pushed the model-response-usage-deserialization branch from a9657fc to 5f6999e Compare September 3, 2025 22:53
@DouweM DouweM merged commit e090747 into main Sep 4, 2025
30 checks passed
@DouweM DouweM deleted the model-response-usage-deserialization branch September 4, 2025 13:25
@nathan-gage
Copy link
Contributor

Would you recommend migrating old 0.x ModelMessages we have in DB?

@DouweM
Copy link
Collaborator Author

DouweM commented Sep 5, 2025

@nathan-gage With this change, it shouldn't be necessary, and I intend to keep message deserialization backward compatible for as long as possible. But if it's easy enough for you to do a migration, it would make you slightly less likely to run into issues if we were to accidentally break deserialization of older messages at some point.

@nathan-gage
Copy link
Contributor

@DouweM Ok, sounds good. We should be able to just round trip the serialization, right?

@DouweM
Copy link
Collaborator Author

DouweM commented Sep 5, 2025

@nathan-gage Yep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backwards compatibility guarantees for storing and loading message history?

3 participants