From 17b4a9f3c70e77acad3c8026570a57d900ada8e8 Mon Sep 17 00:00:00 2001 From: PiedPiper911 <32931126+PiedPiper911@users.noreply.github.com> Date: Thu, 20 Aug 2026 13:59:03 +0800 Subject: [PATCH] fix: resolve PydanticUserError for ChatCompletionReasoningSummaryTextBlock forward reference The forward reference "ChatCompletionReasoningSummaryTextBlock" in ChatCompletionReasoningItem.summary was causing PydanticUserError when constructing ModelResponse(), because the quoted string could not be resolved in the namespace where Message model was built. Remove the quotes to make it a direct reference since ChatCompletionReasoningSummaryTextBlock is already defined earlier in the same file. Fixes #36384 --- litellm/types/llms/openai.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/types/llms/openai.py b/litellm/types/llms/openai.py index edfc50c99f6..19df12cdc82 100644 --- a/litellm/types/llms/openai.py +++ b/litellm/types/llms/openai.py @@ -534,7 +534,7 @@ class ChatCompletionReasoningItem(TypedDict, total=False): type: Required[Literal["reasoning"]] id: str encrypted_content: str | None - summary: list["ChatCompletionReasoningSummaryTextBlock"] + summary: list[ChatCompletionReasoningSummaryTextBlock] class WebSearchOptionsUserLocationApproximate(TypedDict, total=False):