{"record":{"id":"5c83682d9f4b80a8","repo":"BerriAI/litellm","slug":"oci-embedtext-does-not-support-token-array-inputs","errorCode":null,"errorMessage":"OCI embedText does not support token-array inputs. Convert token lists to strings before calling embedding().","messagePattern":"OCI embedText does not support token-array inputs\\. Convert token lists to strings before calling embedding\\(\\)\\.","errorType":"exception","errorClass":"OCIError","httpStatus":400,"severity":"error","filePath":"litellm/llms/oci/embed/transformation.py","lineNumber":200,"sourceCode":"        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. \"\n                            \"Convert token lists to strings before calling embedding().\"\n                        ),\n                    )\n                texts.append(item if isinstance(item, str) else str(item))\n        else:\n            texts = [str(input)]\n\n        if len(texts) > OCI_EMBED_BATCH_LIMIT:\n            raise OCIError(\n                status_code=400,\n                message=(\n                    f\"OCI embedText accepts at most {OCI_EMBED_BATCH_LIMIT} inputs per request \"\n                    f\"(got {len(texts)}). Batch your requests.\"\n                ),\n            )","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/oci/embed/transformation.py#L182-L218","documentation":"Error \"OCI embedText does not support token-array inputs. Convert token lists to strings before calling embedding().\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/oci/embed/transformation.py:200 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Convert token-id lists to plain strings before calling embedding() with the OCI provider."],"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"}