Skip to content

Conversation

@dmontagu
Copy link
Contributor

@dmontagu dmontagu commented Jul 22, 2025

Closes #1567 (comment)

I believe the issue has to do with how to_json works on dataclasses vs BaseModel subclasses. In particular, the model_serializer is being ignored for dataclasses but not for BaseModel subclasses.

Either way, making it use an adapter got the behavior back to expected, and I added a test recording the actual logfire-received attributes so we will detect if changes to this happen in the future.

@github-actions
Copy link

github-actions bot commented Jul 22, 2025

Docs Preview

commit: e82ef1c
Preview URL: https://8fe68cb8-pydantic-ai-previews.pydantic.workers.dev

@dmontagu dmontagu mentioned this pull request Jul 22, 2025
2 tasks
@dmontagu dmontagu merged commit 8112002 into main Jul 22, 2025
32 of 34 checks passed
@dmontagu dmontagu deleted the dmontagu/fix-pydantic-evals-panel branch July 22, 2025 18:22
KRRT7 pushed a commit to aseembits93/pydantic-ai that referenced this pull request Jul 24, 2025
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.

Failed to render details panel

3 participants