Skip to content

fix(pydantic_ai): report structured token usage instead of stringifying to evaluation_context (#28) - #32

Open
mhaye9545 wants to merge 1 commit into
evaluation-context-protocol:mainfrom
mhaye9545:fix/issue-28-pydantic-ai-usage
Open

mhaye9545 wants to merge 1 commit into
evaluation-context-protocol:mainfrom
mhaye9545:fix/issue-28-pydantic-ai-usage

Conversation

@mhaye9545

Copy link
Copy Markdown

Closes #28.

Summary

  • Extracts structured \input_tokens, \output_tokens, and \ otal_tokens\ from PydanticAI's
    esult.usage()\ and passes them to \Result(..., usage=...)\ instead of stringifying them into \evaluation_context.
  • Regenerated the \pydantic_ai_calculator.json\ conformance fixture via \scripts/seed_adapter_fixtures.py.
  • Added unit tests in \ est_adapters.py\ to verify structured usage extraction and clean evaluation context.

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.

PydanticAI adapter stringifies token usage instead of using the usage field

1 participant