{"record":{"id":"d2c9d0c3df945c89","repo":"BerriAI/litellm","slug":"instances-are-required-for-private-endpoint","errorCode":null,"errorMessage":"instances are required for private endpoint","messagePattern":"instances are required for private endpoint","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/vertex_ai/vertex_ai_non_gemini.py","lineNumber":355,"sourceCode":"                credentials=creds,\n            )\n            request_str += f\"llm_model = aiplatform.gapic.PredictionServiceClient(client_options={client_options}, credentials=...)\\n\"\n            endpoint_path = llm_model.endpoint_path(project=vertex_project, location=vertex_location, endpoint=model)\n            request_str += f\"llm_model.predict(endpoint={endpoint_path}, instances={instances})\\n\"\n            response = llm_model.predict(endpoint=endpoint_path, instances=instances).predictions\n\n            completion_response = response[0]\n            if isinstance(completion_response, str) and \"\\nOutput:\\n\" in completion_response:\n                completion_response = completion_response.split(\"\\nOutput:\\n\", 1)[1]\n            if stream is True:\n                response = TextStreamer(completion_response)\n                return response\n        elif mode == \"private\":\n            \"\"\"\n            Vertex AI Model Garden deployed on private endpoint\n            \"\"\"\n            if instances is None:\n                raise ValueError(\"instances are required for private endpoint\")\n            if llm_model is None:\n                raise ValueError(\"Unable to pick client for private endpoint\")\n            ## LOGGING\n            logging_obj.pre_call(\n                input=prompt,\n                api_key=None,\n                additional_args={\n                    \"complete_input_dict\": optional_params,\n                    \"request_str\": request_str,\n                },\n            )\n            request_str += f\"llm_model.predict(instances={instances})\\n\"\n            response = llm_model.predict(instances=instances).predictions\n\n            completion_response = response[0]\n            if isinstance(completion_response, str) and \"\\nOutput:\\n\" in completion_response:\n                completion_response = completion_response.split(\"\\nOutput:\\n\", 1)[1]\n            if stream is True:","sourceCodeStart":337,"sourceCodeEnd":373,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/vertex_ai/vertex_ai_non_gemini.py#L337-L373","documentation":"Sync private-endpoint guard: mode == 'private' but the caller passed instances=None. The PredictionServiceClient.predict call needs instance payloads, so the request is rejected before contacting the endpoint.","triggerScenarios":"Thrown at litellm/llms/vertex_ai/vertex_ai_non_gemini.py:355 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the 'instances' payload required by the private endpoint in the request body.","Check the endpoint's expected input schema and format instances accordingly."],"exampleFix":null,"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"}