{"record":{"id":"0771395f3f86b3ad","repo":"BerriAI/litellm","slug":"unable-to-generate-response","errorCode":null,"errorMessage":"Unable to generate response","messagePattern":"Unable to generate response","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/vertex_ai/vertex_ai_non_gemini.py","lineNumber":671,"sourceCode":"\n    elif mode == \"private\":\n        if instances is None:\n            raise ValueError(\"Instances are required for private endpoint\")\n        stream = optional_params.pop(\"stream\", None)\n        _ = instances[0].pop(\"stream\", None)\n        request_str += f\"llm_model.predict_async(instances={instances})\\n\"\n        response_obj = await llm_model.predict_async(\n            instances=instances,\n        )\n        response = response_obj.predictions\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:\n            response = TextStreamer(completion_response)\n\n    if response is None:\n        raise ValueError(\"Unable to generate response\")\n\n    logging_obj.post_call(input=prompt, api_key=None, original_response=response)\n\n    streamwrapper: Final = CustomStreamWrapper(\n        completion_stream=response,\n        model=model,\n        custom_llm_provider=\"vertex_ai\",\n        logging_obj=logging_obj,\n    )\n\n    return streamwrapper\n","sourceCodeStart":653,"sourceCodeEnd":683,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/vertex_ai/vertex_ai_non_gemini.py#L653-L683","documentation":"Catch-all ValueError in the async non-Gemini completion flow: the awaited prediction did not yield a usable completion response. It wraps failures from predict_async / response parsing when no more specific error applies.","triggerScenarios":"Thrown at litellm/llms/vertex_ai/vertex_ai_non_gemini.py:671 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check upstream logs / verbose output (litellm.set_verbose=True) for the underlying cause of the failed generation.","Verify the endpoint, credentials, and request payload; retry the request."],"exampleFix":null,"handlingStrategy":"try-catch","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"}