BerriAI/litellm · error · NotImplementedError

ImageVariationConfig implementa…

Error message

ImageVariationConfig implementa 'transform_request_image_variation' for image variation models

What it means

Error "ImageVariationConfig implementa 'transform_request_image_variation' for image variation models" thrown in BerriAI/litellm.

Solutions

  1. Use a concrete ImageVariationConfig subclass implementing transform_request_image_variation.

When it happens

Trigger: Thrown at litellm/llms/base_llm/image_generation/transformation.py:81 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/d53e423a017412bb. Report an issue: GitHub.

Appendix: source

Thrown at litellm/llms/base_llm/image_generation/transformation.py:81

    ) -> dict:
        return {}

    def get_error_class(self, error_message: str, status_code: int, headers: dict | httpx.Headers) -> BaseLLMException:
        raise BaseLLMException(
            status_code=status_code,
            message=error_message,
            headers=headers,
        )

    def transform_image_generation_request(
        self,
        model: str,
        prompt: str,
        optional_params: dict,
        litellm_params: dict,
        headers: dict,
    ) -> dict:
        raise NotImplementedError(
            "ImageVariationConfig implementa 'transform_request_image_variation' for image variation models"
        )

    def transform_image_generation_response(
        self,
        model: str,
        raw_response: httpx.Response,
        model_response: ImageResponse,
        logging_obj: LiteLLMLoggingObj,
        request_data: dict,
        optional_params: dict,
        litellm_params: dict,
        encoding: Any,
        api_key: str | None = None,
        json_mode: bool | None = None,
    ) -> ImageResponse:
        raise NotImplementedError(
            "ImageVariationConfig implements 'transform_response_image_variation' for image variation models"

View on GitHub (pinned to 77b7c6c40c)