Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions sentry_sdk/integrations/pydantic_ai/spans/invoke_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from ..consts import SPAN_ORIGIN
from ..utils import (
_set_agent_data,
_set_available_tools,
_set_model_data,
_should_send_inputs,
_should_send_outputs,
Expand Down Expand Up @@ -59,7 +58,6 @@ def invoke_agent_span(

_set_agent_data(span, agent)
_set_model_data(span, agent, model, model_settings)
_set_available_tools(span, agent)

# Add user prompt and system prompts if available and prompts are enabled
if _should_send_inputs():
Expand Down
5 changes: 1 addition & 4 deletions tests/integrations/pydantic_ai/test_pydantic_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -2980,10 +2980,7 @@ def add_numbers(a: int, b: int) -> int:
assert SPANDATA.GEN_AI_REQUEST_MODEL in chat_span

# Both the chat and the invoke_agent spans list the agent's available tools
for op, span_data in spans:
if op not in ("gen_ai.chat", "gen_ai.invoke_agent"):
continue

for span_data in chat_spans:
if expect_available_tools:
assert "add_numbers" in span_data[SPANDATA.GEN_AI_REQUEST_AVAILABLE_TOOLS]
else:
Expand Down
Loading