{"record":{"id":"22846410dd2b788c","repo":"BerriAI/litellm","slug":"no-response-received-original-response-respons","errorCode":null,"errorMessage":"No response received. Original response - {response}","messagePattern":"No response received\\. Original response - (.+?)","errorType":"exception","errorClass":"PalmError","httpStatus":400,"severity":"error","filePath":"litellm/llms/deprecated_providers/palm.py","lineNumber":172,"sourceCode":"    ## RESPONSE OBJECT\n    completion_response = response\n    try:\n        choices_list: Final = []\n        for idx, item in enumerate(completion_response.candidates):\n            if len(item[\"output\"]) > 0:\n                message_obj = Message(content=item[\"output\"])\n            else:\n                message_obj = Message(content=None)\n            choice_obj = Choices(index=idx + 1, message=message_obj)\n            choices_list.append(choice_obj)\n        model_response.choices = choices_list\n    except Exception:\n        raise PalmError(message=traceback.format_exc(), status_code=response.status_code)\n\n    try:\n        completion_response = model_response[\"choices\"][0][\"message\"].get(\"content\")\n    except Exception:\n        raise PalmError(\n            status_code=400,\n            message=f\"No response received. Original response - {response}\",\n        )\n\n    ## CALCULATING USAGE - baseten charges on time, not tokens - have some mapping of cost here.\n    prompt_tokens: Final = len(encoding.encode(prompt))\n    completion_tokens: Final = len(encoding.encode(model_response[\"choices\"][0][\"message\"].get(\"content\", \"\")))\n\n    model_response.created = int(time.time())\n    model_response.model = \"palm/\" + model\n    usage: Final = Usage(\n        prompt_tokens=prompt_tokens,\n        completion_tokens=completion_tokens,\n        total_tokens=prompt_tokens + completion_tokens,\n    )\n    setattr(model_response, \"usage\", usage)\n    return model_response\n","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/deprecated_providers/palm.py#L154-L190","documentation":"Error \"No response received. Original response - {response}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/deprecated_providers/palm.py:172 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The PaLM API returned no response; check the request and API status."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}