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
Merge pull request #24337 from Chesars/fix/gemini-multimodal-batch-embeddings-24209
Cesar Garciaa6462143be7b
diff --cc litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.pyindex 08831a8215f,ca1c5d1f58f..49135fc66f5--- a/litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.py+++ b/litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.py@@@ -152,14 -192,15 +192,17 @@@ def transform_openai_input_gemini_contegemini_params = optional_params.copy()if "dimensions" in gemini_params:gemini_params["outputDimensionality"] = gemini_params.pop("dimensions")+ if "task_type" in gemini_params:+ gemini_params["taskType"] = gemini_params.pop("task_type")+ input_list = [input] if isinstance(input, str) else inputrequests: List[EmbedContentRequest] = []- if isinstance(input, str):++ for element in input_list:+ part = _build_part_for_input(element, resolved_files=resolved_files)request = EmbedContentRequest(model=gemini_model_name,- content=ContentType(parts=[PartType(text=input)]),+ content=ContentType(parts=[part]),**gemini_params,)requests.append(request)