Skip to content

Commit 4147349

Browse files
ref(pydantic-ai): Stop setting gen_ai.response.model on Invoke Agent spans
1 parent cf69604 commit 4147349

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

‎sentry_sdk/integrations/pydantic_ai/spans/invoke_agent.py‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,3 @@ def update_invoke_agent_span(
152152
set_data_normalized(
153153
span, SPANDATA.GEN_AI_RESPONSE_TEXT, str(output), unpack=False
154154
)
155-
156-
# Set model name from response if available
157-
if hasattr(result, "response"):
158-
try:
159-
response = result.response
160-
if hasattr(response, "model_name") and response.model_name:
161-
span.set_attribute(SPANDATA.GEN_AI_RESPONSE_MODEL, response.model_name)
162-
except Exception:
163-
# If response access fails, continue without setting model name
164-
pass

0 commit comments

Comments
 (0)