BerriAI/litellm · error · OVHCloudException
raw_response.text
Error message
raw_response.text
What it means
LiteLLM's OVHCloud embedding handler calls raw_response.json(); on failure it raises OVHCloudException with the raw response body as the message plus the real status code and headers. The body text typically explains the underlying problem.
Source
Thrown at litellm/llms/ovhcloud/embedding/transformation.py:100
headers: dict,
) -> dict:
return {"input": input, "model": model, **optional_params}
def transform_embedding_response(
self,
model: str,
raw_response: httpx.Response,
model_response: EmbeddingResponse,
logging_obj: LiteLLMLoggingObj,
api_key: str | None,
request_data: dict,
optional_params: dict,
litellm_params: dict,
) -> EmbeddingResponse:
try:
raw_response_json: Final = raw_response.json()
except Exception:
raise OVHCloudException(
message=raw_response.text,
status_code=raw_response.status_code,
headers=raw_response.headers,
)
model_response.model = raw_response_json.get("model")
model_response.data = raw_response_json.get("data")
model_response.object = raw_response_json.get("object")
usage: Final = Usage(
prompt_tokens=raw_response_json.get("usage", {}).get("prompt_tokens", 0),
total_tokens=raw_response_json.get("usage", {}).get("total_tokens", 0),
)
model_response.usage = usage
return model_response
def get_error_class(self, error_message: str, status_code: int, headers: dict | httpx.Headers) -> BaseLLMException:View on GitHub (pinned to 77b7c6c40c)
Solutions
- Read the exception message - it is the raw body and states the cause
- Verify the OVH token is valid for AI Endpoints
- Confirm the embedding model is actually deployed on your OVH project and spelled exactly as documented
- Retry after OVH incidents if the body indicates a transient gateway error
Defensive patterns
Strategy: try-catch
Try / catch
Catch OVHCloudException around litellm.embedding(); log the message (raw body) and branch: auth/model errors need configuration fixes, gateway errors justify one retry with backoff.
Prevention
- Confirm embedding model availability on the OVH project before routing traffic
- Log raw-body messages verbatim for provider triage
- Use a second embedding provider as a fallback for production paths
When it happens
Trigger: Calling litellm.embedding() with an ovhcloud/* model when the endpoint returns non-JSON: invalid token error page, model not deployed on the OVH project, or an HTML gateway error.
Common situations: Wrong OVH token; embedding model name not matching what is deployed on the project; OVH incidents returning HTML maintenance pages.
Related errors
- raw_response.text
- raw_response.text
- Error parsing OpenRouter response: {e}
- Error parsing OpenRouter response: {e}
- judge response is not a JSON object
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/18f18fad96766cda.
Report an issue: GitHub.