The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
refactor(vertex): drop unused resolved_files from embed response parsing
kerry0c91d9157c43
diff --git a/litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_handler.py b/litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_handler.pyindex f81d4ca777e..e09622ba236 100644--- a/litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_handler.py+++ b/litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_handler.py@@ -268,7 +268,6 @@ class GoogleBatchEmbeddings(VertexLLM):model_response=model_response,model=model,response_json=_json_response,- resolved_files=resolved_files,)else:_predictions: Final = VertexAIBatchEmbeddingsResponseObject(**_json_response)@@ -372,7 +371,6 @@ class GoogleBatchEmbeddings(VertexLLM):model_response=model_response,model=model,response_json=_json_response,- resolved_files=resolved_files,)else:_predictions: Final = VertexAIBatchEmbeddingsResponseObject(**_json_response)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.pyindex 8e120ab9fe6..f2cce775f3f 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@@ -4,7 +4,7 @@ Transformation logic from OpenAI /v1/embeddings format to Google AI Studio /batcWhy separate file? Make it easy to see how transformation works"""-from collections.abc import Mapping, Sequence+from collections.abc import Sequencefrom typing import Finalfrom pydantic import TypeAdapter, ValidationError@@ -356,7 +356,6 @@ def process_embed_content_response(model_response: EmbeddingResponse,model: str,response_json: dict,- resolved_files: Mapping[str, Mapping[str, str]] | None = None,) -> EmbeddingResponse:"""Process Gemini embedContent response (single embedding for multimodal input).diff --git a/tests/test_litellm/llms/vertex_ai/gemini_embeddings/test_batch_embed_content_transformation.py b/tests/test_litellm/llms/vertex_ai/gemini_embeddings/test_batch_embed_content_transformation.pyindex fbf86105e71..0251a799b66 100644--- a/tests/test_litellm/llms/vertex_ai/gemini_embeddings/test_batch_embed_content_transformation.py+++ b/tests/test_litellm/llms/vertex_ai/gemini_embeddings/test_batch_embed_content_transformation.py@@ -411,12 +411,6 @@ class TestProcessEmbedContentResponseUsage:model_response=EmbeddingResponse(),model=self.MODEL,response_json=response_json,- resolved_files={- "files/img123": {- "mime_type": "image/png",- "uri": "https://example.com/img123",- }- },)assert result.usage.prompt_tokens_details.image_tokens == 258assert result.usage.prompt_tokens_details.text_tokens == 0@@ -443,12 +437,6 @@ class TestProcessEmbedContentResponseUsage:model_response=EmbeddingResponse(),model=self.MODEL,response_json=response_json,- resolved_files={- "files/clip1": {- "mime_type": "audio/mpeg",- "uri": "https://example.com/clip1",- }- },)assert result.usage.prompt_tokens_details.audio_tokens == 64assert result.usage.prompt_tokens_details.image_tokens == 0