Skip to content

Fix pydantic-evals panel rendering with evaluators #2274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 22, 2025

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.

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
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
2 participants