BerriAI/litellm · error · ValueError
image edit is not supported for {custom_llm_provider}
Error message
image edit is not supported for {custom_llm_provider} What it means
image_edit routes through ProviderConfigManager.get_provider_image_edit_config(); when no BaseImageEditConfig exists for the provider/model (litellm/images/main.py:827-833), litellm raises ValueError — the provider does not support the image-edit endpoint in this version.
Source
Thrown at litellm/images/main.py:833
image=images,
prompt=prompt,
model_response=model_response,
api_key=kwargs.get("api_key"),
api_base=kwargs.get("api_base"),
optional_params=kwargs,
logging_obj=litellm_logging_obj,
timeout=timeout,
client=custom_client,
)
# get provider config
image_edit_provider_config: BaseImageEditConfig | None = ProviderConfigManager.get_provider_image_edit_config(
model=model,
provider=litellm.LlmProviders(custom_llm_provider),
)
if image_edit_provider_config is None:
raise ValueError(f"image edit is not supported for {custom_llm_provider}")
local_vars.update(kwargs)
# Get ImageEditOptionalRequestParams with only valid parameters
image_edit_optional_params: Final[ImageEditOptionalRequestParams] = (
_get_ImageEditRequestUtils().get_requested_image_edit_optional_param(local_vars)
)
# Get optional parameters for the responses API
image_edit_request_params: Final[dict] = _get_ImageEditRequestUtils().get_optional_params_image_edit(
model=model,
image_edit_provider_config=image_edit_provider_config,
image_edit_optional_params=image_edit_optional_params,
drop_params=kwargs.get("drop_params"),
additional_drop_params=kwargs.get("additional_drop_params"),
)
# Pre Call logging
litellm_logging_obj.update_from_kwargs(
kwargs=kwargs,View on GitHub (pinned to 6c2dcb801b)
Solutions
- Upgrade litellm — image-edit provider coverage (gpt-image-1, bedrock, BFL, azure) expanded across releases
- Verify model spelling and provider prefix against the docs (e.g. 'azure/gpt-image-1')
- Switch to a provider with edit support (OpenAI gpt-image-1/dall-e-2, Bedrock, Black Forest Labs)
- For bedrock/black_forest_labs, ensure model is set (separate guard exists)
Defensive patterns
Strategy: validation
Validate before calling
EDIT_CAPABLE_PREFIXES = ("openai/", "azure/", "bedrock/", "black_forest_labs/", "vertex_ai/")
def supports_image_edit(model: str) -> bool:
return model.startswith(EDIT_CAPABLE_PREFIXES) or model.split("/", 1)[0] in {p.rstrip("/") for p in EDIT_CAPABLE_PREFIXES} Try / catch
try:
r = litellm.image_edit(model=m, image=img, prompt=p)
except ValueError as e:
if "image edit is not supported" in str(e):
raise UnsupportedEditProvider(m) from e
raise Prevention
- Gate edit features in your UI on a per-provider allowlist
- Upgrade litellm when adding new edit providers to your stack
- Verify model strings exactly as documented per provider
When it happens
Trigger: Calling litellm.image_edit(model='openai/gpt-image-1'|'azure/...'|'vertex_ai/...') with a provider whose image-edit config is not registered in the installed version; or a model string that doesn't resolve to a config.
Common situations: Using a provider for edit that only supports generation; older litellm versions before edits were added for a provider; typos in model names preventing config match.
Related errors
- Unclassified keys in {PRICES_PATH.name}: {', '.join(unclassi
- Error apply_db_fixes: {str(e)}
- image generation config is not supported for {custom_llm_pro
- Invalid image variation provider: {custom_llm_provider}. Sup
- image variation provider has no known model info config - re
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/7d5907de91f46528.
Report an issue: GitHub.