{"record":{"id":"67c66069ae745da1","repo":"BerriAI/litellm","slug":"failed-to-parse-soniox-response-exc","errorCode":null,"errorMessage":"Failed to parse Soniox response: {exc}","messagePattern":"Failed to parse Soniox response: (.+?)","errorType":"exception","errorClass":"SonioxException","httpStatus":null,"severity":"error","filePath":"litellm/llms/soniox/audio_transcription/transformation.py","lineNumber":180,"sourceCode":"        return AudioTranscriptionRequestData(data=body, files=None, content_type=\"application/json\")\n\n    def transform_audio_transcription_response(\n        self,\n        raw_response: Response,\n        model_response: TranscriptionResponse | None = None,\n    ) -> TranscriptionResponse:\n        \"\"\"\n        Build a TranscriptionResponse from a Soniox transcript payload.\n\n        `raw_response.json()` may be either:\n          - a Soniox transcript object: `{\"id\": \"...\", \"text\": \"...\", \"tokens\": [...]}`\n          - or a merged envelope: `{\"transcription\": {...}, \"transcript\": {...}}`\n            produced by the handler so transcription metadata is also available.\n        \"\"\"\n        try:\n            payload: Final = raw_response.json()\n        except Exception as exc:\n            raise SonioxException(\n                message=f\"Failed to parse Soniox response: {exc}\",\n                status_code=getattr(raw_response, \"status_code\", 500),\n                headers=getattr(raw_response, \"headers\", None),\n            )\n\n        return self._build_response_from_payload(payload, model_response=model_response)\n\n    def _build_response_from_payload(\n        self,\n        payload: dict[str, Any],\n        model_response: TranscriptionResponse | None = None,\n        response_format: str | None = None,\n    ) -> TranscriptionResponse:\n        \"\"\"Shared response-building logic (also used by the handler).\"\"\"\n        transcription_meta: dict[str, Any] = {}\n        transcript: dict[str, Any]\n\n        if isinstance(payload, dict) and \"transcript\" in payload:","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/soniox/audio_transcription/transformation.py#L162-L198","documentation":"The Soniox transcription payload did not match either expected shape (transcript object or merged transcription/transcript envelope) and JSON parsing/shape detection raised; the error wraps the underlying exception for diagnosis.","triggerScenarios":"Triggered when parsing the Soniox transcription response raises an exception.","commonSituations":"See trigger scenarios.","solutions":["Inspect exc for the parse failure; the Soniox response shape may have changed.","Verify the model and request options against the Soniox API docs."],"exampleFix":"# log the raw Soniox response to inspect its structure.","handlingStrategy":"try-catch","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-14T00:17:10.932Z"}