From 4147349dcb94db77163be798bfccabf427365a99 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Tue, 15 Sep 2026 14:38:16 +0200 Subject: [PATCH] ref(pydantic-ai): Stop setting gen_ai.response.model on Invoke Agent spans --- .../integrations/pydantic_ai/spans/invoke_agent.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sentry_sdk/integrations/pydantic_ai/spans/invoke_agent.py b/sentry_sdk/integrations/pydantic_ai/spans/invoke_agent.py index ab95179d44..336e67ce26 100644 --- a/sentry_sdk/integrations/pydantic_ai/spans/invoke_agent.py +++ b/sentry_sdk/integrations/pydantic_ai/spans/invoke_agent.py @@ -152,13 +152,3 @@ def update_invoke_agent_span( set_data_normalized( span, SPANDATA.GEN_AI_RESPONSE_TEXT, str(output), unpack=False ) - - # Set model name from response if available - if hasattr(result, "response"): - try: - response = result.response - if hasattr(response, "model_name") and response.model_name: - span.set_attribute(SPANDATA.GEN_AI_RESPONSE_MODEL, response.model_name) - except Exception: - # If response access fails, continue without setting model name - pass