fix(pydantic-ai): tool call mapping in OtelIngestionProcessor #9524
+31
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes issue #9287 where pydantic-ai tool calls were showing null input/output in the Langfuse UI.
Changes Made
tool_arguments
andtool_response
in theextractInputAndOutput()
methodtool_arguments
→ observationinput
tool_response
→ observationoutput
otelMapping.servertest.ts
to verify the new mapping functionalityTechnical Details
The fix adds pydantic-ai field mapping after the generic input/output mapping but before GCP Vertex Agent mapping, maintaining the proper priority chain:
Test Coverage
tool_arguments
toinput
correctlytool_response
tooutput
correctlyRelated Issue
Closes #9287
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com
Important
Fixes pydantic-ai tool call mapping in
OtelIngestionProcessor
to correctly maptool_arguments
andtool_response
to input and output.OtelIngestionProcessor
by adding support fortool_arguments
andtool_response
inextractInputAndOutput()
.tool_arguments
toinput
andtool_response
tooutput
.otelMapping.servertest.ts
to verify mapping oftool_arguments
andtool_response
.This description was created by
for c07adac. You can customize this summary. It will automatically update as commits are pushed.