BerriAI/litellm · error · ValueError

RunwayML TTS was cancelled

Error message

RunwayML TTS was cancelled

What it means

Terminal-state mapping in the RunwayML TTS status normalization: the task status is CANCELLED, meaning synthesis was aborted and will not produce audio; raised distinctly from failure codes.

Source

Thrown at litellm/llms/runwayml/text_to_speech/transformation.py:271

        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()

        verbose_logger.debug("RunwayML TTS task status: %s", status)

        if status == "SUCCEEDED":
            return "succeeded"
        elif status == "FAILED":
            failure_reason: Final = response_data.get("failure", "Unknown error")
            failure_code: Final = response_data.get("failureCode", "unknown")
            raise ValueError(f"RunwayML TTS failed: {failure_reason} (code: {failure_code})")
        elif status == "CANCELLED":
            raise ValueError("RunwayML TTS was cancelled")
        elif status in ["PENDING", "RUNNING", "THROTTLED"]:
            return "running"
        else:
            raise ValueError(f"Unknown RunwayML task status: {status}")

    def _poll_task_sync(
        self,
        task_id: str,
        api_base: str,
        headers: dict[str, str],
        timeout_secs: float = 600,
    ) -> httpx.Response:
        """
        Poll RunwayML task until completion (sync).

        RunwayML POST returns immediately with a task that has status PENDING/RUNNING.
        We need to poll GET /v1/tasks/{task_id} until status is SUCCEEDED or FAILED.

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Resubmit the TTS request.
  2. Check your RunwayML account for cancellations or quota issues.

Example fix

# retry the speech generation request.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Triggered when a RunwayML TTS task is cancelled.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/266322f69ee47c6f. Report an issue: GitHub.