{"record":{"id":"18f18fad96766cda","repo":"BerriAI/litellm","slug":"raw-response-text-18f18f","errorCode":null,"errorMessage":"raw_response.text","messagePattern":"raw_response\\.text","errorType":"http","errorClass":"OVHCloudException","httpStatus":null,"severity":"error","filePath":"litellm/llms/ovhcloud/embedding/transformation.py","lineNumber":100,"sourceCode":"        headers: dict,\n    ) -> dict:\n        return {\"input\": input, \"model\": model, **optional_params}\n\n    def transform_embedding_response(\n        self,\n        model: str,\n        raw_response: httpx.Response,\n        model_response: EmbeddingResponse,\n        logging_obj: LiteLLMLoggingObj,\n        api_key: str | None,\n        request_data: dict,\n        optional_params: dict,\n        litellm_params: dict,\n    ) -> EmbeddingResponse:\n        try:\n            raw_response_json: Final = raw_response.json()\n        except Exception:\n            raise OVHCloudException(\n                message=raw_response.text,\n                status_code=raw_response.status_code,\n                headers=raw_response.headers,\n            )\n\n        model_response.model = raw_response_json.get(\"model\")\n        model_response.data = raw_response_json.get(\"data\")\n        model_response.object = raw_response_json.get(\"object\")\n\n        usage: Final = Usage(\n            prompt_tokens=raw_response_json.get(\"usage\", {}).get(\"prompt_tokens\", 0),\n            total_tokens=raw_response_json.get(\"usage\", {}).get(\"total_tokens\", 0),\n        )\n\n        model_response.usage = usage\n        return model_response\n\n    def get_error_class(self, error_message: str, status_code: int, headers: dict | httpx.Headers) -> BaseLLMException:","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/ovhcloud/embedding/transformation.py#L82-L118","documentation":"LiteLLM's OVHCloud embedding handler calls raw_response.json(); on failure it raises OVHCloudException with the raw response body as the message plus the real status code and headers. The body text typically explains the underlying problem.","triggerScenarios":"Calling litellm.embedding() with an ovhcloud/* model when the endpoint returns non-JSON: invalid token error page, model not deployed on the OVH project, or an HTML gateway error.","commonSituations":"Wrong OVH token; embedding model name not matching what is deployed on the project; OVH incidents returning HTML maintenance pages.","solutions":["Read the exception message - it is the raw body and states the cause","Verify the OVH token is valid for AI Endpoints","Confirm the embedding model is actually deployed on your OVH project and spelled exactly as documented","Retry after OVH incidents if the body indicates a transient gateway error"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"Catch OVHCloudException around litellm.embedding(); log the message (raw body) and branch: auth/model errors need configuration fixes, gateway errors justify one retry with backoff.","preventionTips":["Confirm embedding model availability on the OVH project before routing traffic","Log raw-body messages verbatim for provider triage","Use a second embedding provider as a fallback for production paths"],"tags":["ovhcloud","embedding","json-parsing","http-response","litellm"],"backgroundTag":"invalid-json-response","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}