From 34293483059d74af7138b62aa55865454237c165 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 21 Sep 2026 19:21:53 +0000 Subject: [PATCH] fix(types): avoid mutable image serializer annotations Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/types/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/types/utils.py b/litellm/types/utils.py index 8d327b337a7..c661aa0839a 100644 --- a/litellm/types/utils.py +++ b/litellm/types/utils.py @@ -2552,7 +2552,7 @@ class ImageResponse(OpenAIImageResponse, BaseLiteLLMOpenAIResponseObject): model_config = ConfigDict(extra="allow", protected_namespaces=()) @field_serializer("data") - def _serialize_image_data(self, data: list[OpenAIImage] | None) -> list[dict[str, object]] | None: + def _serialize_image_data(self, data: Sequence[OpenAIImage] | None) -> Sequence[Mapping[str, object]] | None: return None if data is None else [image.model_dump() for image in data] def __init__(