{"record":{"id":"d99198389bc062fa","repo":"BerriAI/litellm","slug":"input-on-v1-embeddings-batch-requests-must-not","errorCode":null,"errorMessage":"`input` on /v1/embeddings batch requests must not be empty","messagePattern":"`input` on /v1/embeddings batch requests must not be empty","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/vertex_ai/files/transformation.py","lineNumber":486,"sourceCode":"    is an array fans out into one row per element and is reassembled on the way back.\n    The docs put the per-row config in an `embed_content_config` sibling of `request`,\n    but the API rejects that key outright and fails the whole batch job, so the config\n    fields go inside the `EmbedContentRequest` itself.\n\n    API Ref: https://cloud.google.com/vertex-ai/generative-ai/docs/embeddings/batch-prediction-genai-embeddings\n    \"\"\"\n    openai_request_body = openai_entry.get(\"body\")\n    if not isinstance(openai_request_body, dict):\n        raise TypeError(\n            \"`body` on /v1/embeddings batch requests must be a JSON object, but was missing or not an object\"\n        )\n    embedding_input = openai_request_body.get(\"input\")\n    if embedding_input is None:\n        raise ValueError(\"`input` is required on /v1/embeddings batch requests, but was not provided\")\n\n    elements = _openai_embedding_input_elements(embedding_input)\n    if not elements:\n        raise ValueError(\"`input` on /v1/embeddings batch requests must not be empty\")\n\n    embed_content_requests = tuple(\n        transform_openai_input_gemini_embed_content(\n            input=element,\n            model=openai_request_body.get(\"model\", \"\"),\n            optional_params=openai_request_body,\n        )\n        for element in elements\n    )\n    custom_id = openai_entry.get(\"custom_id\")\n    return tuple(\n        _vertex_embeddings_row(\n            key=None\n            if custom_id is None\n            else _vertex_batch_embeddings_key(\n                custom_id=str(custom_id),\n                index=index,\n                total=len(embed_content_requests),","sourceCodeStart":468,"sourceCodeEnd":504,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/vertex_ai/files/transformation.py#L468-L504","documentation":"Validation while transforming an /v1/embeddings batch entry: 'input' is present but empty (empty string or empty list), so the batch row would embed nothing and is rejected before upload to GCS.","triggerScenarios":"Triggered when a /v1/embeddings batch request provides an empty 'input'.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-empty 'input' in the batch request body."],"exampleFix":"# ensure input is a non-empty string or list.","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}