BerriAI/litellm · error · ValueError
RunwayML image generation was cancelled
Error message
RunwayML image generation was cancelled
What it means
Terminal-state mapping in RunwayML status normalization: the task's status is CANCELLED (user- or system-initiated), so no output will ever be produced and the error distinguishes cancellation from failure.
Source
Thrown at litellm/llms/runwayml/image_generation/transformation.py:182
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 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 image generation failed: {failure_reason} (code: {failure_code})")
elif status == "CANCELLED":
raise ValueError("RunwayML image generation 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
- The task was cancelled, possibly by account limits or another request; resubmit the generation.
- Check your RunwayML account for cancellations or quota issues.
Example fix
# retry the image generation request.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Triggered when a RunwayML image generation task is cancelled.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/e14a1cf0e265b731.
Report an issue: GitHub.