BerriAI/litellm · error · HuggingFaceError
Original Response received
Error message
Original Response received: {raw_response.text} What it means
Error "Original Response received: {raw_response.text}" thrown in BerriAI/litellm.
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.
When it happens
Trigger: Thrown at litellm/llms/huggingface/embedding/transformation.py:505 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/8d60a28e6e6c1442.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/llms/huggingface/embedding/transformation.py:505
model=model,
data=request_data,
api_key=api_key,
)
else:
## LOGGING
logging_obj.post_call(
input=request_data,
api_key=api_key,
original_response=raw_response.text,
additional_args={"complete_input_dict": request_data},
)
## RESPONSE OBJECT
try:
completion_response = raw_response.json()
if isinstance(completion_response, dict):
completion_response = [completion_response]
except Exception:
raise HuggingFaceError(
message=f"Original Response received: {raw_response.text}",
status_code=raw_response.status_code,
)
if isinstance(completion_response, dict) and "error" in completion_response:
raise HuggingFaceError(
message=completion_response["error"],
status_code=raw_response.status_code,
)
return self.convert_to_model_response_object(
completion_response=completion_response,
model_response=model_response,
task=task if task is not None and task in hf_task_list else None,
optional_params=optional_params,
encoding=encoding,
messages=messages,
model=model,
)View on GitHub (pinned to 77b7c6c40c)