{"record":{"id":"00079442ffb90205","repo":"BerriAI/litellm","slug":"oci-compartment-id-is-required-for-oci-embedding-r","errorCode":null,"errorMessage":"oci_compartment_id is required for OCI embedding requests. Pass it as optional_params or set the OCI_COMPARTMENT_ID env var.","messagePattern":"oci_compartment_id is required for OCI embedding requests\\. Pass it as optional_params or set the OCI_COMPARTMENT_ID env var\\.","errorType":"exception","errorClass":"OCIError","httpStatus":400,"severity":"error","filePath":"litellm/llms/oci/embed/transformation.py","lineNumber":185,"sourceCode":"            request_data=request_data,\n            api_base=api_base,\n            api_key=api_key,\n            model=model,\n            stream=stream,\n            fake_stream=fake_stream,\n        )\n\n    def transform_embedding_request(\n        self,\n        model: str,\n        input: AllEmbeddingInputValues,\n        optional_params: dict,\n        headers: dict,\n    ) -> dict:\n        creds: Final = resolve_oci_credentials(optional_params)\n        compartment_id: Final = creds[\"oci_compartment_id\"]\n        if not compartment_id:\n            raise OCIError(\n                status_code=400,\n                message=(\n                    \"oci_compartment_id is required for OCI embedding requests. \"\n                    \"Pass it as optional_params or set the OCI_COMPARTMENT_ID env var.\"\n                ),\n            )\n\n        # Normalise input to a flat list of strings\n        if isinstance(input, str):\n            texts = [input]\n        elif isinstance(input, list):\n            texts = []\n            for item in input:\n                if isinstance(item, list):\n                    raise OCIError(\n                        status_code=400,\n                        message=(\n                            \"OCI embedText does not support token-array inputs. \"","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/oci/embed/transformation.py#L167-L203","documentation":"Error \"oci_compartment_id is required for OCI embedding requests. Pass it as optional_params or set the OCI_COMPARTMENT_ID env var.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/oci/embed/transformation.py:185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass oci_compartment_id in optional_params, or set the OCI_COMPARTMENT_ID environment variable."],"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"}