You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pydantic-ai: read RequestUsage.output_reasoning_tokens for reasoning metrics #1005
Sub-issue of #1001 (follow-ups from the 2026-10-26 dependency update, #998).
We get reasoning tokens by checking provider-specific keys in usage.details (integrations/pydantic_ai/tracing.py:1424-1440). That still works because pydantic-ai keeps filling those keys.
The new field is provider-agnostic. Reading it first, with the keys as fallback, guards against the keys going away or providers we don't map. Covered by existing cassettes.
Activity
AbhiPrasad commentedon Oct 26, 2026
released with https://github.com/braintrustdata/braintrust-sdk-python/releases/tag/py-sdk-v0.48.1
fix(pydantic-ai): prefer normalized reasoning token usage (braintrust…