BerriAI/litellm · error · ValueError

Parameter {k} is not supported for model {model}. Supported

Error message

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

What it means

Error "Parameter {k} 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/fal_ai/image_generation/imagen4_transformation.py:86

            if k not in optional_params:
                if k in supported_params:
                    # Use mapped parameter name if exists
                    mapped_key = param_mapping.get(k, k)
                    mapped_value = non_default_params[k]

                    # Transform specific parameters
                    if k == "response_format":
                        # Imagen4 always returns URLs, so we can ignore this
                        continue
                    elif k == "size":
                        # Map OpenAI size format to Imagen4 aspect ratio
                        mapped_value = self._map_aspect_ratio(mapped_value)

                    optional_params[mapped_key] = mapped_value
                elif drop_params:
                    pass
                else:
                    raise ValueError(
                        f"Parameter {k} is not supported for model {model}. Supported parameters are {supported_params}. Set drop_params=True to drop unsupported parameters."
                    )

        return optional_params

    def _map_aspect_ratio(self, size: str) -> str:
        """
        Map OpenAI size format to Imagen4 aspect ratio format.

        OpenAI format: "1024x1024", "1792x1024", etc.
        Imagen4 format: "1:1", "16:9", "9:16", "3:4", "4:3"

        Available aspect ratios:
        - 1:1 (default)
        - 16:9
        - 9:16
        - 3:4
        - 4:3

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/fal_ai/image_generation/imagen4_transformation.py:86 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/1d96198db67edd5a. Report an issue: GitHub.