{"record":{"id":"da1cd4d5cc7f1395","repo":"BerriAI/litellm","slug":"missing-required-parameters-oci-user-oci-fingerp-da1cd4","errorCode":null,"errorMessage":"Missing required parameters: oci_user, oci_fingerprint, oci_tenancy, oci_compartment_id and at least one of oci_key or oci_key_file. These can be supplied via optional_params or via OCI_USER, OCI_FINGERPRINT, OCI_TENANCY, OCI_COMPARTMENT_ID, OCI_KEY_FILE environment variables. Alternatively, provide an oci_signer object from the OCI SDK.","messagePattern":"Missing required parameters: oci_user, oci_fingerprint, oci_tenancy, oci_compartment_id and at least one of oci_key or oci_key_file\\. These can be supplied via optional_params or via OCI_USER, OCI_FINGERPRINT, OCI_TENANCY, OCI_COMPARTMENT_ID, OCI_KEY_FILE environment variables\\. Alternatively, provide an oci_signer object from the OCI SDK\\.","errorType":"exception","errorClass":"OCIError","httpStatus":401,"severity":"critical","filePath":"litellm/llms/oci/embed/transformation.py","lineNumber":129,"sourceCode":"        optional_params: dict,\n        litellm_params: dict,\n        api_key: str | None = None,\n        api_base: str | None = None,\n    ) -> dict:\n        if optional_params.get(\"oci_signer\") is None:\n            creds: Final = resolve_oci_credentials(optional_params)\n            missing: Final = [\n                k\n                for k in (\n                    \"oci_user\",\n                    \"oci_fingerprint\",\n                    \"oci_tenancy\",\n                    \"oci_compartment_id\",\n                )\n                if not creds.get(k)\n            ]\n            if missing or not (creds.get(\"oci_key\") or creds.get(\"oci_key_file\")):\n                raise OCIError(\n                    status_code=401,\n                    message=(\n                        \"Missing required parameters: oci_user, oci_fingerprint, oci_tenancy, \"\n                        \"oci_compartment_id and at least one of oci_key or oci_key_file. \"\n                        \"These can be supplied via optional_params or via OCI_USER, OCI_FINGERPRINT, \"\n                        \"OCI_TENANCY, OCI_COMPARTMENT_ID, OCI_KEY_FILE environment variables. \"\n                        \"Alternatively, provide an oci_signer object from the OCI SDK.\"\n                    ),\n                )\n        return validate_oci_environment(headers, optional_params, api_key)\n\n    def get_complete_url(\n        self,\n        api_base: str | None,\n        api_key: str | None,\n        model: str,\n        optional_params: dict,\n        litellm_params: dict,","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/oci/embed/transformation.py#L111-L147","documentation":"The OCI embeddings config's validate_environment checks (unless an oci_signer is provided) that user, fingerprint, tenancy, compartment_id and a key source are all present, raising OCIError(401) listing the env-var alternatives. Embeddings additionally require oci_compartment_id because the OCI embedding API bills and scopes requests per compartment.","triggerScenarios":"litellm.embedding(..., model='oci/...') where any of OCI_USER, OCI_FINGERPRINT, OCI_TENANCY, OCI_COMPARTMENT_ID, OCI_KEY_FILE (or the optional_params equivalents) is missing.","commonSituations":"Chat completions work (no compartment needed) but embeddings fail — the classic missing-OCI_COMPARTMENT_ID case; same deployment/env gaps as chat (container missing env vars) plus compartment OCID never copied from the Console.","solutions":["Set OCI_COMPARTMENT_ID (or pass oci_compartment_id in optional params) to the compartment OCID (ocid1.compartment.oc1.....) that hosts/has access to the embedding model.","Set the remaining credentials: OCI_USER, OCI_FINGERPRINT, OCI_TENANCY, OCI_KEY_FILE (or inline OCI_KEY).","Alternatively pass an OCI SDK oci_signer to skip manual credential checks.","Verify all five values inside the failing process before the call."],"exampleFix":"# before\nlitellm.embedding(model=\"oci/generic.embedding.multilingual.v1.5\", input=[\"hello\"])\n# OCIError 401: missing oci_compartment_id\n\n# after\nos.environ[\"OCI_COMPARTMENT_ID\"] = \"ocid1.compartment.oc1..aaaa...\"\nlitellm.embedding(model=\"oci/generic.embedding.multilingual.v1.5\", input=[\"hello\"])","handlingStrategy":"validation","validationCode":"import os\nrequired = (\"OCI_USER\", \"OCI_FINGERPRINT\", \"OCI_TENANCY\", \"OCI_COMPARTMENT_ID\")\nmissing = [v for v in required if not os.environ.get(v)]\nhas_key = bool(os.environ.get(\"OCI_KEY\") or os.environ.get(\"OCI_KEY_FILE\"))\nassert not missing and has_key, f\"missing OCI embedding config: {missing}, key={not has_key}\"","typeGuard":null,"tryCatchPattern":"from litellm.llms.oci.common_utils import OCIError\ntry:\n    litellm.embedding(model=\"oci/generic.embedding.multilingual.v1.5\", input=texts)\nexcept OCIError as e:\n    if e.status_code == 401 and \"Missing required parameters\" in str(e):\n        raise ConfigError(\"set OCI_* env vars incl. OCI_COMPARTMENT_ID, or pass oci_signer\") from e\n    raise","preventionTips":["Remember embeddings need OCI_COMPARTMENT_ID in addition to chat credentials.","Add embeddings to the startup preflight once compartment-scoped models are used.","Document the full env-var set in your deployment template."],"tags":["oci","embeddings","credentials","compartment","configuration"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}