{"record":{"id":"08bf962893885a69","repo":"BerriAI/litellm","slug":"unable-to-get-json-response-e-original-respon-08bf96","errorCode":null,"errorMessage":"Unable to get json response - {e}, Original Response: {raw_response.text}","messagePattern":"Unable to get json response - (.+?), Original Response: (.+?)","errorType":"http","errorClass":"FireworksAIException","httpStatus":null,"severity":"error","filePath":"litellm/llms/fireworks_ai/chat/transformation.py","lineNumber":708,"sourceCode":"        litellm_params: dict,\n        encoding: Any,\n        api_key: str | None = None,\n        json_mode: bool | None = None,\n    ) -> ModelResponse:\n        ## LOGGING\n        logging_obj.post_call(\n            input=messages,\n            api_key=api_key,\n            original_response=raw_response.text,\n            additional_args={\"complete_input_dict\": request_data},\n        )\n\n        ## RESPONSE OBJECT\n        try:\n            completion_response: Final = raw_response.json()\n        except Exception as e:\n            response_headers: Final = getattr(raw_response, \"headers\", None)\n            raise FireworksAIException(\n                message=f\"Unable to get json response - {e}, Original Response: {raw_response.text}\",\n                status_code=raw_response.status_code,\n                headers=response_headers,\n            )\n\n        raw_response_headers: Final = dict(raw_response.headers)\n\n        additional_headers: Final = get_response_headers(raw_response_headers)\n\n        response: Final = ModelResponse(**completion_response)\n\n        if response.model is not None:\n            response.model = \"fireworks_ai/\" + response.model\n\n        ## FIREWORKS AI sends tool calls in the content field instead of tool_calls\n        for choice in response.choices:\n            cast(Choices, choice).message = self._handle_message_content_with_tool_calls(\n                message=cast(Choices, choice).message,","sourceCodeStart":690,"sourceCodeEnd":726,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/fireworks_ai/chat/transformation.py#L690-L726","documentation":"Error \"Unable to get json response - {e}, Original Response: {raw_response.text}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/fireworks_ai/chat/transformation.py:708 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The Fireworks AI response was not valid JSON; check the API status and model id."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}