BerriAI/litellm · error · ValueError
image variation provider has no known model info config - re
Error message
image variation provider has no known model info config - required for getting api keys, etc.: {custom_llm_provider}. Supported providers are: {LITELLM_IMAGE_VARIATION_PROVIDERS} What it means
The provider was accepted into LITELLM_IMAGE_VARIATION_PROVIDERS, but ProviderConfigManager.get_provider_model_info() returned None, meaning litellm has no model-info config from which to resolve API keys and base URLs for variations (litellm/images/main.py:645-653). This is an internal-coverage gap: the enum knows the provider, the config registry does not.
Source
Thrown at litellm/images/main.py:651
# route to the correct provider w/ the params
try:
llm_provider: Final = LlmProviders(custom_llm_provider)
image_variation_provider: Final = LITELLM_IMAGE_VARIATION_PROVIDERS(llm_provider)
except ValueError:
raise ValueError(
f"Invalid image variation provider: {custom_llm_provider}. Supported providers are: {LITELLM_IMAGE_VARIATION_PROVIDERS}"
)
model_response: Final = ImageResponse()
response: ImageResponse | None = None
provider_config: Final = ProviderConfigManager.get_provider_model_info(
model=model or "", # openai defaults to dall-e-2
provider=llm_provider,
)
if provider_config is None:
raise ValueError(
f"image variation provider has no known model info config - required for getting api keys, etc.: {custom_llm_provider}. Supported providers are: {LITELLM_IMAGE_VARIATION_PROVIDERS}"
)
api_key: Final = provider_config.get_api_key(litellm_params.get("api_key", None))
api_base = provider_config.get_api_base(litellm_params.get("api_base", None))
if image_variation_provider == LITELLM_IMAGE_VARIATION_PROVIDERS.OPENAI:
if api_key is None:
raise ValueError("API key is required for OpenAI image variations")
if api_base is None:
raise ValueError("API base is required for OpenAI image variations")
response = openai_image_variations.image_variations(
model_response=model_response,
api_key=api_key,
api_base=api_base,
model=model,
image=image,View on GitHub (pinned to 6c2dcb801b)
Solutions
- Upgrade litellm to a release where the variation provider's model info config is registered
- Pin to a known-good litellm version if a recent release introduced the regression
- If unresolved, fall back to OpenAI/Topaz variation endpoints which have complete configs
- Report the provider/model pair to litellm's GitHub issues
Defensive patterns
Strategy: validation
Validate before calling
def variation_model_info_available(model: str, provider: str) -> bool:
from litellm.provider_config_manager import ProviderConfigManager # adjust import
try:
return ProviderConfigManager.get_provider_model_info(model=model, provider=provider) is not None
except Exception:
return False Try / catch
try:
r = litellm.image_variations(model=m, image=img)
except ValueError as e:
if "no known model info config" in str(e):
raise RuntimeError(f"litellm version lacks variation config for {m}; upgrade litellm") from e
raise Prevention
- Pin litellm and test image-variation smoke calls in CI to catch coverage gaps
- Upgrade litellm when adopting a new variation provider
- Report missing configs upstream with the exact model string
When it happens
Trigger: Hitting a variation provider whose enum entry exists but whose model-info registration is missing in the installed litellm version; typically after adding a new provider enum member without the accompanying config, or version skew between enum and registry.
Common situations: Using a fork/patched litellm where the enum was extended; or a bug in a specific litellm release.
Related errors
- Unclassified keys in {PRICES_PATH.name}: {', '.join(unclassi
- No Braintrust API token provided. Pass via Authorization hea
- File not found. banned_keywords_list={banned_keywords_list}
- image generation config is not supported for {custom_llm_pro
- Invalid image variation provider: {custom_llm_provider}. Sup
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/df7cc84f28e078d6.
Report an issue: GitHub.