{"record":{"id":"7512fc969c8089f5","repo":"BerriAI/litellm","slug":"raw-response-text-7512fc","errorCode":null,"errorMessage":"raw_response.text","messagePattern":"raw_response\\.text","errorType":"exception","errorClass":"CohereError","httpStatus":null,"severity":"error","filePath":"litellm/llms/cohere/rerank/transformation.py","lineNumber":147,"sourceCode":"        self,\n        model: str,\n        raw_response: httpx.Response,\n        model_response: RerankResponse,\n        logging_obj: LiteLLMLoggingObj,\n        api_key: str | None = None,\n        request_data: dict = {},\n        optional_params: dict = {},\n        litellm_params: dict = {},\n    ) -> RerankResponse:\n        \"\"\"\n        Transform Cohere rerank response\n\n        No transformation required, litellm follows cohere API response format\n        \"\"\"\n        try:\n            raw_response_json: Final = raw_response.json()\n        except Exception:\n            raise CohereError(message=raw_response.text, status_code=raw_response.status_code)\n\n        return RerankResponse(**raw_response_json)\n\n    def get_error_class(self, error_message: str, status_code: int, headers: dict | httpx.Headers) -> BaseLLMException:\n        return CohereError(message=error_message, status_code=status_code)\n","sourceCodeStart":129,"sourceCodeEnd":153,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/cohere/rerank/transformation.py#L129-L153","documentation":"Error \"raw_response.text\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/cohere/rerank/transformation.py:147 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the Cohere error response body for details."],"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"}