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: capture web-search and grounding counts from RequestUsage.details #866
pydantic-ai 2.52–2.54 started counting OpenAI native web searches (#8310) and Google grounding queries (#8891) in RequestUsage.details.
The usage extractor in py/src/braintrust/integrations/pydantic_ai/tracing.py (around lines 1388–1428) only reads reasoning and cached tokens from details.
Proposal
Record the new counts as metrics (or metadata if they aren't token counts), read defensively so older versions (0.1.9, 1.0.1, 1.10.0) are unaffected.
Optionally record the new workspace= run kwarg's kind in metadata (_AGENT_INPUT_ALLOWLIST already keeps the object itself out of spans).
Add cassette-backed coverage with a web-search tool run.
Parent: #858 (found while reviewing the 2026-10-05 weekly dependency update, #849).
Activity
AbhiPrasad commentedon Oct 14, 2026
released with https://github.com/braintrustdata/braintrust-sdk-python/releases/tag/py-sdk-v0.46.0
feat(pydantic-ai): capture web-search usage details (braintrustdata#892)