BerriAI/litellm · error · OCIError

param `{key}` is not supported on OCI

Error message

param `{key}` is not supported on OCI

What it means

Error "param `{key}` is not supported on OCI" thrown in BerriAI/litellm.

Source

Thrown at litellm/llms/oci/chat/transformation.py:357

        for key, value in {**non_default_params, **optional_params}.items():
            alias = param_map.get(key)
            if alias is False:
                # max_retries is a litellm-level control param (litellm applies
                # retries itself); it is never a generation param OCI accepts, so
                # drop it silently. The litellm proxy injects it on every request,
                # which otherwise 500s OCI calls unless drop_params is set.
                if key == "max_retries":
                    continue
                # n=1 (or None) is the OpenAI default: a single generation, which
                # every OCI model produces anyway. Drop it silently so standard
                # clients that always send n=1 (e.g. the MLflow gateway) are not
                # rejected; only n>1 is genuinely unsupported on Cohere, which
                # has no numGenerations field.
                if key == "n" and (value is None or value == 1):
                    continue
                if drop_params or litellm.drop_params:
                    continue
                raise OCIError(
                    status_code=400,
                    message=f"param `{key}` is not supported on OCI",
                )
            if alias is None:
                adapted_params[key] = value
                continue
            adapted_params[alias] = value
            # Preserve the original OpenAI ``response_format`` key alongside the
            # OCI-mapped ``responseFormat`` so downstream litellm framework code
            # (e.g. ``json_mode`` detection, logging) that inspects
            # ``optional_params["response_format"]`` continues to work.
            if alias == "responseFormat":
                adapted_params["response_format"] = value

        return adapted_params

    def sign_request(
        self,

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. Remove the unsupported parameter for OCI or set drop_params=True.

When it happens

Trigger: Thrown at litellm/llms/oci/chat/transformation.py:357 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15). Data as JSON: /api/errors/dd4a69240ecde26c. Report an issue: GitHub.