{"record":{"id":"8d5714e57590923c","repo":"BerriAI/litellm","slug":"oci-embed-response-does-not-match-expected-schema","errorCode":null,"errorMessage":"OCI embed response does not match expected schema: {e}","messagePattern":"OCI embed response does not match expected schema: (.+?)","errorType":"exception","errorClass":"OCIError","httpStatus":500,"severity":"error","filePath":"litellm/llms/oci/embed/transformation.py","lineNumber":276,"sourceCode":"    ) -> 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}\",\n            )\n\n        model_response.model = parsed.modelId\n        model_response.data = [\n            {\n                \"object\": \"embedding\",\n                \"index\": i,\n                \"embedding\": embedding,\n            }\n            for i, embedding in enumerate(parsed.embeddings)\n        ]\n\n        if parsed.inputTextTokenCounts is not None:\n            # Actual OCI API returns per-input token counts — sum for total usage\n            total: Final = sum(parsed.inputTextTokenCounts)\n            model_response.usage = Usage(prompt_tokens=total, total_tokens=total)","sourceCodeStart":258,"sourceCodeEnd":294,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/oci/embed/transformation.py#L258-L294","documentation":"Error \"OCI embed response does not match expected schema: {e}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/oci/embed/transformation.py:276 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the OCI embedding model/endpoint returns the embedText schema; see the wrapped validation 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"}