Skip to content

Commit ad16009

Browse files
fix(anthropic): Do not set gen_ai.response.model to None (#6312)
1 parent b1e999d commit ad16009

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sentry_sdk/integrations/anthropic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,8 @@ def _set_output_data(
562562
) -> None:
563563
"""
564564
Set output data for the span based on the AI response."""
565-
span.set_data(SPANDATA.GEN_AI_RESPONSE_MODEL, model)
565+
if model is not None:
566+
span.set_data(SPANDATA.GEN_AI_RESPONSE_MODEL, model)
566567
if response_id is not None:
567568
span.set_data(SPANDATA.GEN_AI_RESPONSE_ID, response_id)
568569
if finish_reason is not None:

0 commit comments

Comments
 (0)