BerriAI/litellm · error · ValueError

Parameter {key} is not supported for model {model}. Supporte

Error message

Parameter {key} is not supported for model {model}. Supported parameters are {supported_params}. Set drop_params=True to drop unsupported parameters.

What it means

Error "Parameter {key} is not supported for model {model}. Supported parameters are {supported_params}. Set drop_params=True to drop unsupported parameters." thrown in BerriAI/litellm.

Source

Thrown at litellm/llms/azure_ai/image_edit/mai_transformation.py:52

        model: str,
        drop_params: bool,
    ) -> dict:
        optional_params: Final[dict[str, Any]] = {}
        supported_params: Final = self.get_supported_openai_params(model)

        for key, value in dict(image_edit_optional_params).items():
            if value is None or key in optional_params:
                continue

            if key in supported_params:
                if key == "size" and value:
                    size_param = cast(str, value)
                    self._validate_size_param(size_param)
                    optional_params[key] = size_param
                else:
                    optional_params[key] = value
            elif not drop_params:
                raise ValueError(
                    f"Parameter {key} is not supported for model {model}. "
                    f"Supported parameters are {supported_params}. "
                    f"Set drop_params=True to drop unsupported parameters."
                )

        if "size" not in optional_params:
            optional_params["size"] = self.DEFAULT_SIZE

        return optional_params

    def _validate_size_param(self, size: str) -> None:
        known_sizes: Final = {
            "1024x1024",
            "1792x1024",
            "1024x1792",
            "512x512",
            "256x256",
        }

View on GitHub (pinned to 6c2dcb801b)

Solutions

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

When it happens

Trigger: Thrown at litellm/llms/azure_ai/image_edit/mai_transformation.py:52 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/9153119f431944df. Report an issue: GitHub.