{"record":{"id":"12edb6481bf37fc4","repo":"BerriAI/litellm","slug":"unable-to-pick-client-for-private-endpoint","errorCode":null,"errorMessage":"Unable to pick client for private endpoint","messagePattern":"Unable to pick client for private endpoint","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/vertex_ai/vertex_ai_non_gemini.py","lineNumber":357,"sourceCode":"            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:\n                response = TextStreamer(completion_response)\n                return response","sourceCodeStart":339,"sourceCodeEnd":375,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/vertex_ai/vertex_ai_non_gemini.py#L339-L375","documentation":"Generic sentinel in the private-endpoint branch: no client-selection condition matched (neither the sync gapic client nor another configured path could be chosen), so LiteLLM cannot build a prediction client for the request.","triggerScenarios":"Thrown at litellm/llms/vertex_ai/vertex_ai_non_gemini.py:357 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the private endpoint configuration (endpoint_id, project, location) so a prediction client can be constructed.","Confirm google-cloud-aiplatform is installed and credentials are valid for the endpoint's project."],"exampleFix":null,"handlingStrategy":"fallback","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"}