{"record":{"id":"694c45b06c6943e9","repo":"BerriAI/litellm","slug":"runwayml-tts-audio-url-is-not-a-string-audio-url","errorCode":null,"errorMessage":"RunwayML TTS audio URL is not a string: {audio_url}","messagePattern":"RunwayML TTS audio URL is not a string: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/runwayml/text_to_speech/transformation.py","lineNumber":497,"sourceCode":"            task_id=task_id,\n            api_base=self.DEFAULT_BASE_URL,\n            headers=poll_headers,\n            timeout_secs=RUNWAYML_POLLING_TIMEOUT,\n        )\n\n        # Get the completed task data\n        task_data: Final = polled_response.json()\n\n        verbose_logger.debug(\"RunwayML TTS polling complete, downloading audio\")\n\n        # Get audio URL from output\n        output: Final = task_data.get(\"output\", [])\n        if not output or not isinstance(output, list) or len(output) == 0:\n            raise ValueError(\"RunwayML TTS response missing audio URL in output\")\n\n        audio_url: Final = output[0]\n        if not isinstance(audio_url, str):\n            raise ValueError(f\"RunwayML TTS audio URL is not a string: {audio_url}\")\n\n        # Download the audio file\n        from litellm.llms.custom_httpx.http_handler import _get_httpx_client\n\n        client: Final = _get_httpx_client()\n        audio_response: Final = client.get(url=audio_url)\n        audio_response.raise_for_status()\n\n        verbose_logger.debug(\"RunwayML TTS audio downloaded successfully\")\n\n        # Return the audio data wrapped in HttpxBinaryResponseContent\n        return HttpxBinaryResponseContent(audio_response)\n\n    async def async_transform_text_to_speech_response(\n        self,\n        model: str,\n        raw_response: httpx.Response,\n        logging_obj: \"LiteLLMLoggingObj\",","sourceCodeStart":479,"sourceCodeEnd":515,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/runwayml/text_to_speech/transformation.py#L479-L515","documentation":"Type guard after RunwayML TTS polling: output contained an audio URL candidate, but it is not a string (e.g. a dict/object URL), so it cannot be used for the download request; the offending value is echoed.","triggerScenarios":"Triggered when the RunwayML TTS audio URL in the output is not a string.","commonSituations":"See trigger scenarios.","solutions":["The audio URL field had an unexpected type; check the task output schema.","Report the schema mismatch to the litellm issue tracker."],"exampleFix":"# inspect the audio_url value printed in the error.","handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}