From 4004cbfd01be65b90ad5cb8d5d7c87049ffb1bd0 Mon Sep 17 00:00:00 2001 From: Jason Cameron Date: Wed, 15 Oct 2025 18:56:11 -0400 Subject: [PATCH] fix: Update response text extraction method in OpenAI integration --- sentry_sdk/integrations/openai.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentry_sdk/integrations/openai.py b/sentry_sdk/integrations/openai.py index 19d7717b3c..315d54f750 100644 --- a/sentry_sdk/integrations/openai.py +++ b/sentry_sdk/integrations/openai.py @@ -237,7 +237,7 @@ def _set_output_data(span, response, kwargs, integration, finish_span=True): if hasattr(response, "choices"): if should_send_default_pii() and integration.include_prompts: - response_text = [choice.message.dict() for choice in response.choices] + response_text = [choice.message.model_dump() for choice in response.choices] if len(response_text) > 0: set_data_normalized(span, SPANDATA.GEN_AI_RESPONSE_TEXT, response_text)