BerriAI/litellm · error · ValueError

image variation provider not found: {custom_llm_provider}.

Error message

image variation provider not found: {custom_llm_provider}.

What it means

Error "image variation provider not found: {custom_llm_provider}." thrown in BerriAI/litellm.

Source

Thrown at litellm/llms/custom_httpx/aiohttp_handler.py:566

        litellm_params: dict,
        print_verbose: Callable | None = None,
        api_base: str | None = None,
        aimage_variation: bool = False,
        logger_fn=None,
        client=None,
        organization: str | None = None,
        headers: dict | None = None,
    ) -> ImageResponse:
        if model is None:
            raise ValueError("model is required for non-openai image variations")

        provider_config: Final = ProviderConfigManager.get_provider_image_variation_config(
            model=model,  # openai defaults to dall-e-2
            provider=LlmProviders(custom_llm_provider),
        )

        if provider_config is None:
            raise ValueError(f"image variation provider not found: {custom_llm_provider}.")

        api_base = provider_config.get_complete_url(
            api_base=api_base,
            api_key=api_key,
            model=model,
            optional_params=optional_params,
            litellm_params=litellm_params,
            stream=False,
        )

        headers = provider_config.validate_environment(
            api_key=api_key,
            headers=headers or {},
            model=model,
            messages=[{"role": "user", "content": "test"}],
            optional_params=optional_params,
            litellm_params=litellm_params,
            api_base=api_base,

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. Use a supported image variation provider.

When it happens

Trigger: Thrown at litellm/llms/custom_httpx/aiohttp_handler.py:566 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/3389a6848b0c5026. Report an issue: GitHub.