BerriAI/litellm · error · ValueError
Model is not supported for Azure AI image editing.
Error message
Model {model} is not supported for Azure AI image editing. What it means
Error "Model {model} is not supported for Azure AI image editing." thrown in BerriAI/litellm.
Solutions
- Use a model supported for Azure AI image editing (e.g. FLUX or MAI image models).
When it happens
Trigger: Thrown at litellm/llms/azure_ai/image_edit/__init__.py:42 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/12df82b29a3ca2ea.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/llms/azure_ai/image_edit/__init__.py:42
Get the appropriate image edit config for an Azure AI model.
- MAI models use /mai/v1/images/edits with multipart form data and size
- FLUX 2 models use JSON with base64 image
- FLUX 1 models use multipart/form-data
"""
if AzureFoundryMAIImageGenerationConfig.is_mai_model(model):
return AzureFoundryMAIImageEditConfig()
# Check if it's a FLUX 2 model
if AzureFoundryFluxImageGenerationConfig.is_flux2_model(model):
return AzureFoundryFlux2ImageEditConfig()
# Default to FLUX 1 config for other FLUX models
model_normalized: Final = model.lower().replace("-", "").replace("_", "")
if model_normalized == "" or "flux" in model_normalized:
return AzureFoundryFluxImageEditConfig()
raise ValueError(f"Model {model} is not supported for Azure AI image editing.")
View on GitHub (pinned to 77b7c6c40c)