{"record":{"id":"ff87bbda70688c77","repo":"BerriAI/litellm","slug":"raw-response-text-ff87bb","errorCode":null,"errorMessage":"raw_response.text","messagePattern":"raw_response\\.text","errorType":"exception","errorClass":"OCIError","httpStatus":null,"severity":"error","filePath":"litellm/llms/oci/embed/transformation.py","lineNumber":260,"sourceCode":"            inputType=input_type,\n            truncate=optional_params.get(\"truncate\", \"END\"),\n            outputDimensions=optional_params.get(\"outputDimensions\"),\n        )\n        return request.model_dump(exclude_none=True)\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        if raw_response.status_code != 200:\n            raise OCIError(\n                status_code=raw_response.status_code,\n                message=raw_response.text,\n            )\n\n        try:\n            json_response: Final = raw_response.json()\n        except Exception as e:\n            raise OCIError(\n                status_code=raw_response.status_code,\n                message=f\"Failed to parse OCI embed response as JSON: {e}\",\n            )\n\n        try:\n            parsed: Final = OCIEmbedResponse(**json_response)\n        except Exception as e:\n            raise OCIError(\n                status_code=500,\n                message=f\"OCI embed response does not match expected schema: {e}\",","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/oci/embed/transformation.py#L242-L278","documentation":"After the HTTP request to the OCI embedText endpoint returns, the adapter checks the status code. Any non-200 response is surfaced as an OCIError whose message is the raw response body (`raw_response.text`). This is a pass-through of an upstream OCI API error, not a client-side validation failure.","triggerScenarios":"Invalid OCI credentials (401), wrong compartment OCID (404), model not entitled to your tenancy (403), rate limiting (429), or OCI service errors (5xx) — any non-200 from the embedText call. The status_code on the raised OCIError mirrors the upstream status.","commonSituations":"Expired or misconfigured OCI config file / API keys, using an ON_DEMAND model the tenancy has not accepted terms for, wrong region in the api_base, or throttling during bulk embedding runs.","solutions":["Read the message body — it contains OCI's own error details (e.g. 'NotAuthorizedOrNotFound', 'TooManyRequests') which pinpoint the fix.","For 401/403: verify OCI_COMPARTMENT_ID, your user/API key, and that the tenancy has access to the model.","For 429: add backoff/retry or reduce batch frequency.","For 404: confirm the modelId and region in the endpoint URL match a model your compartment can serve."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"from litellm.exceptions import litellm as _l  # generic\ntry:\n    resp = litellm.embedding(model=\"oci/...\", input=texts)\nexcept Exception as e:\n    code = getattr(e, \"status_code\", None)\n    if code == 429:\n        backoff_and_retry()  # rate limited\n    elif code in (401, 403):\n        audit_oci_credentials()  # config problem, do not retry\n    else:\n        raise","preventionTips":["Check e.status_code to branch: 429 retry, 4xx fix config, 5xx alert","Verify OCI_COMPARTMENT_ID and model entitlement before bulk runs","Read the raw OCI error body in the message for the precise cause"],"tags":["oci","embedding","upstream-error","http"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}