fix(vertex): drop Final image_tokens redeclaration flagged by basedpyright

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
kerry 2026-09-15 01:10:27 +00:00
parent ac8e1a355c
commit 6cbed7b4c0

View file

@ -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,
),
)