BerriAI/litellm · error · OVHCloudException
raw_response.text
Error message
raw_response.text
What it means
LiteLLM's OVHCloud audio-transcription handler calls raw_response.json(); if the OVHCloud AI Endpoints body is not JSON, it raises OVHCloudException whose message is the raw response body text, carrying the real HTTP status code and headers. The raw text usually states the actual problem (auth, model access, gateway error).
Source
Thrown at litellm/llms/ovhcloud/audio_transcription/transformation.py:142
processed_audio.filename,
processed_audio.file_content,
processed_audio.content_type,
)
}
return AudioTranscriptionRequestData(data=form_fields, files=files)
def transform_audio_transcription_response(
self,
raw_response: httpx.Response,
) -> TranscriptionResponse:
"""
Transform OVHCloud audio transcription response to OpenAI-compatible TranscriptionResponse.
"""
try:
response_json: Final = raw_response.json()
except Exception:
raise OVHCloudException(
message=raw_response.text,
status_code=raw_response.status_code,
headers=raw_response.headers,
)
text: Final = response_json.get("text") or response_json.get("transcript") or ""
response: Final = TranscriptionResponse(text=text)
# OVHCloud field migration (deadline: 2026-05-11):
# `duration` is replaced by `seconds` in STT responses.
# Prefer `seconds`, fall back to `duration`, normalize to `duration`
# so downstream consumers see a consistent key.
duration: Final = (
response_json["seconds"]
if "seconds" in response_json and response_json["seconds"] is not None
else response_json.get("duration")
)
if duration is not None:View on GitHub (pinned to 77b7c6c40c)
Solutions
- Read the exception message - it contains the raw body, which names the real failure
- Verify the OVH token and that the model is deployed/enabled on your OVH AI Endpoints project
- Match the model string exactly to OVH's documentation
- Retry later if the body shows a transient gateway error
Defensive patterns
Strategy: try-catch
Try / catch
Catch OVHCloudException around litellm.transcription(); the message IS the raw body, so log it verbatim - it names the actual OVH problem (token, model access, gateway). Retry only when the body indicates a transient error.
Prevention
- Validate the OVH token and deployed model list at integration time
- Log exception bodies verbatim - they are the provider's own error text
- Wrap transcription flows with a fallback provider for resilience
When it happens
Trigger: Calling litellm.transcription() with an ovhcloud/* model when the endpoint replies with HTML or plain text: invalid/expired token producing an error page, model not deployed on the OVH project, or gateway maintenance pages.
Common situations: OVH AI Endpoints token missing or wrong; requesting a whisper/stt model that is not enabled for the project; OVH gateway incidents returning HTML.
Related errors
- raw_response.text
- Error parsing OpenRouter response: {e}
- Error parsing OpenRouter response: {e}
- raw_response.text
- judge response is not a JSON object
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/fdaa2454d7e27719.
Report an issue: GitHub.