{"record":{"id":"e280b5d2b797b5a7","repo":"BerriAI/litellm","slug":"invalid-response-format-received-response-does-no","errorCode":null,"errorMessage":"Invalid response format. Received response does not match the expected format. Got: {raw_response_json}","messagePattern":"Invalid response format\\. Received response does not match the expected format\\. Got: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/openai/transcriptions/whisper_transformation.py","lineNumber":138,"sourceCode":"            headers=headers,\n        )\n\n    def transform_audio_transcription_response(\n        self,\n        raw_response: Response,\n    ) -> TranscriptionResponse:\n        try:\n            raw_response_json: Final = raw_response.json()\n        except json.JSONDecodeError:\n            content_type: Final = raw_response.headers.get(\"content-type\", \"\").lower()\n            if \"application/json\" in content_type:\n                raise\n            return TranscriptionResponse(text=raw_response.text)\n\n        if any(key in raw_response_json for key in TranscriptionResponse.model_fields):\n            return TranscriptionResponse(**raw_response_json)\n        else:\n            raise ValueError(\n                \"Invalid response format. Received response does not match the expected format. Got: \",\n                raw_response_json,\n            )\n","sourceCodeStart":120,"sourceCodeEnd":142,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/openai/transcriptions/whisper_transformation.py#L120-L142","documentation":"ValueError from the Whisper transcription response transformer: the body parsed as JSON but contains none of the fields expected of a TranscriptionResponse (e.g. 'text'), so it cannot be mapped. Typically a provider returned an unexpected JSON schema (error object or vendor-specific shape) for a transcription request.","triggerScenarios":"Thrown at litellm/llms/openai/transcriptions/whisper_transformation.py:138 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the received response shown in the message; ensure you are calling a transcription endpoint with a Whisper-compatible model and valid audio file."],"exampleFix":null,"handlingStrategy":"validation","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"}