{"record":{"id":"95532ce9c03b74a1","repo":"BerriAI/litellm","slug":"failed-to-parse-minimax-response-e","errorCode":null,"errorMessage":"Failed to parse MiniMax response: {e}","messagePattern":"Failed to parse MiniMax response: (.+?)","errorType":"exception","errorClass":"MinimaxException","httpStatus":500,"severity":"error","filePath":"litellm/llms/minimax/text_to_speech/transformation.py","lineNumber":379,"sourceCode":"            # We need to create a response that contains the decoded audio bytes\n            # Remove gzip encoding headers to avoid decompression issues\n            clean_headers: Final = dict(raw_response.headers)\n            clean_headers.pop(\"content-encoding\", None)\n            clean_headers.pop(\"transfer-encoding\", None)\n            clean_headers[\"content-length\"] = str(len(audio_bytes))\n\n            # Create a new response object with the binary content\n            binary_response: Final = httpx.Response(\n                status_code=200,\n                headers=clean_headers,\n                content=audio_bytes,\n                request=raw_response.request,\n            )\n\n            return HttpxBinaryResponseContent(binary_response)\n\n        except json.JSONDecodeError as e:\n            raise MinimaxException(\n                status_code=500,\n                message=f\"Failed to parse MiniMax response: {e}\",\n                headers=dict(raw_response.headers),\n            )\n        except Exception as e:\n            if isinstance(e, MinimaxException):\n                raise\n            raise MinimaxException(\n                status_code=500,\n                message=f\"Error processing MiniMax response: {e}\",\n                headers=dict(raw_response.headers),\n            )\n\n    def get_complete_url(\n        self,\n        model: str,\n        api_base: str | None,\n        litellm_params: dict,","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/minimax/text_to_speech/transformation.py#L361-L397","documentation":"Error \"Failed to parse MiniMax response: {e}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/minimax/text_to_speech/transformation.py:379 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Log the raw MiniMax response body; handle non-JSON responses and check the wrapped parse error {e}."],"exampleFix":null,"handlingStrategy":null,"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-23T08:17:48.524Z"}