BerriAI/litellm · error · ValueError
RunwayML TTS response missing audio URL in output
Error message
RunwayML TTS response missing audio URL in output
What it means
Contract guard after RunwayML TTS polling completes: the finished task's 'output' field is empty or not a non-empty list, so there is no audio URL to download; raised instead of returning an empty audio result.
Source
Thrown at litellm/llms/runwayml/text_to_speech/transformation.py:493
}
# Poll until task completes
polled_response: Final = self._poll_task_sync(
task_id=task_id,
api_base=self.DEFAULT_BASE_URL,
headers=poll_headers,
timeout_secs=RUNWAYML_POLLING_TIMEOUT,
)
# Get the completed task data
task_data: Final = polled_response.json()
verbose_logger.debug("RunwayML TTS polling complete, downloading audio")
# Get audio URL from output
output: Final = task_data.get("output", [])
if not output or not isinstance(output, list) or len(output) == 0:
raise ValueError("RunwayML TTS response missing audio URL in output")
audio_url: Final = output[0]
if not isinstance(audio_url, str):
raise ValueError(f"RunwayML TTS audio URL is not a string: {audio_url}")
# Download the audio file
from litellm.llms.custom_httpx.http_handler import _get_httpx_client
client: Final = _get_httpx_client()
audio_response: Final = client.get(url=audio_url)
audio_response.raise_for_status()
verbose_logger.debug("RunwayML TTS audio downloaded successfully")
# Return the audio data wrapped in HttpxBinaryResponseContent
return HttpxBinaryResponseContent(audio_response)
async def async_transform_text_to_speech_response(View on GitHub (pinned to 77b7c6c40c)
Solutions
- The completed task output had no audio URL; inspect the task output payload.
- Report to litellm issue tracker if the RunwayML output schema changed.
Example fix
# fetch the task directly from RunwayML and check its output field.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Triggered when the RunwayML TTS task output does not contain an audio URL.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/461e7fb4331b3d9b.
Report an issue: GitHub.