BerriAI/litellm · error · TimeoutError
RunwayML TTS task polling timed out after {timeout_secs} sec
Error message
RunwayML TTS task polling timed out after {timeout_secs} seconds What it means
Poll-loop timeout in the RunwayML TTS handler: the audio-generation task did not reach a terminal state within timeout_secs of start_time, so a TimeoutError aborts the wait instead of polling indefinitely.
Source
Thrown at litellm/llms/runwayml/text_to_speech/transformation.py:242
complete_url = api_base or get_secret_str("RUNWAYML_API_BASE") or self.DEFAULT_BASE_URL
complete_url = complete_url.rstrip("/")
return f"{complete_url}/{self.TTS_ENDPOINT_PATH}"
@staticmethod
def _check_timeout(start_time: float, timeout_secs: float) -> None:
"""
Check if operation has timed out.
Args:
start_time: Start time of the operation
timeout_secs: Timeout duration in seconds
Raises:
TimeoutError: If operation has exceeded timeout
"""
if time.time() - start_time > timeout_secs:
raise TimeoutError(f"RunwayML TTS task polling timed out after {timeout_secs} seconds")
@staticmethod
def _check_task_status(response_data: dict[str, Any]) -> str:
"""
Check RunwayML task status from response.
RunwayML statuses: PENDING, RUNNING, SUCCEEDED, FAILED, CANCELLED, THROTTLED
Args:
response_data: JSON response from RunwayML task endpoint
Returns:
Normalized status string: "running", "succeeded", or raises on failure
Raises:
ValueError: If task failed or status is unknown
"""
status: Final = response_data.get("status", "").upper()View on GitHub (pinned to 77b7c6c40c)
Solutions
- Increase the polling timeout for TTS tasks.
- Check RunwayML service status.
Example fix
litellm.speech(..., timeout=300)
Defensive patterns
Strategy: retry
When it happens
Trigger: Triggered when polling a RunwayML TTS task exceeds the configured timeout.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/ae6f24b63ffdc4e0.
Report an issue: GitHub.