From 6cbed7b4c0ae643a429b0ebc7cb85a99e52b5b9e Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 15 Sep 2026 01:10:27 +0000 Subject: [PATCH] fix(vertex): drop Final image_tokens redeclaration flagged by basedpyright Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../gemini_embeddings/batch_embed_content_transformation.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.py b/litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.py index b61fb47cf5c..b618f6e5165 100644 --- a/litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.py +++ b/litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.py @@ -371,13 +371,12 @@ def _usage_from_embed_content_response( details: Final[Sequence[PromptTokensDetails]] = usage_metadata.get("promptTokensDetails") or () if not details: - image_tokens: Final = prompt_tokens if _count_input_images(input, resolved_files) else 0 return Usage( prompt_tokens=prompt_tokens, total_tokens=total_tokens, prompt_tokens_details=PromptTokensDetailsWrapper( text_tokens=0, - image_tokens=image_tokens, + image_tokens=prompt_tokens if _count_input_images(input, resolved_files) else 0, ), )