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 conversation= input on agent spans #923
pydantic-ai 2.55.0 added a conversation= keyword (a Conversation object) to all agent run entry points (pydantic/pydantic-ai#8337), as an alternative to message_history=.
_AGENT_INPUT_ALLOWLIST in py/src/braintrust/integrations/pydantic_ai/tracing.py doesn't include conversation. Users who pass conversation= get agent spans that are missing the prior history.
Proposed change
Capture conversation in the agent span input, ideally by extracting its messages and conversation id instead of serializing the raw object.
Add a cassette-backed test in test_pydantic_ai_integration.py, gated to versions >= 2.55.0.
Optional: 2.55.0 also added ModelResponse.failed_attempts (FallbackModel). Consider adding it to _RESPONSE_FIELDS.
Found while reviewing the dependency bumps in #911 (pydantic-ai 2.54.0 → 2.55.0).
Activity
AbhiPrasad commentedon Oct 14, 2026
released with https://github.com/braintrustdata/braintrust-sdk-python/releases/tag/py-sdk-v0.46.0
fix(pydantic-ai): capture conversation input on agent spans (braintru…