{"record":{"id":"8d60a28e6e6c1442","repo":"BerriAI/litellm","slug":"original-response-received-raw-response-text","errorCode":null,"errorMessage":"Original Response received: {raw_response.text}","messagePattern":"Original Response received: (.+?)","errorType":"exception","errorClass":"HuggingFaceError","httpStatus":null,"severity":"error","filePath":"litellm/llms/huggingface/embedding/transformation.py","lineNumber":505,"sourceCode":"                model=model,\n                data=request_data,\n                api_key=api_key,\n            )\n        else:\n            ## LOGGING\n            logging_obj.post_call(\n                input=request_data,\n                api_key=api_key,\n                original_response=raw_response.text,\n                additional_args={\"complete_input_dict\": request_data},\n            )\n            ## RESPONSE OBJECT\n            try:\n                completion_response = raw_response.json()\n                if isinstance(completion_response, dict):\n                    completion_response = [completion_response]\n            except Exception:\n                raise HuggingFaceError(\n                    message=f\"Original Response received: {raw_response.text}\",\n                    status_code=raw_response.status_code,\n                )\n\n        if isinstance(completion_response, dict) and \"error\" in completion_response:\n            raise HuggingFaceError(\n                message=completion_response[\"error\"],\n                status_code=raw_response.status_code,\n            )\n        return self.convert_to_model_response_object(\n            completion_response=completion_response,\n            model_response=model_response,\n            task=task if task is not None and task in hf_task_list else None,\n            optional_params=optional_params,\n            encoding=encoding,\n            messages=messages,\n            model=model,\n        )","sourceCodeStart":487,"sourceCodeEnd":523,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/huggingface/embedding/transformation.py#L487-L523","documentation":"Error \"Original Response received: {raw_response.text}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/huggingface/embedding/transformation.py:505 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The HuggingFace endpoint returned a non-JSON body; check the raw response in the error, the endpoint URL, and whether the model is still loading."],"exampleFix":null,"handlingStrategy":null,"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-23T08:17:48.524Z"}