{"record":{"id":"017d56f15a696bb2","repo":"BerriAI/litellm","slug":"unsupported-bedrock-image-edit-model-model-r-u","errorCode":null,"errorMessage":"Unsupported Bedrock image-edit model: {model!r}. Use a stability.* image-edit model id or add supports_nova_canvas_image_edit in model_prices for this id.","messagePattern":"Unsupported Bedrock image-edit model: (.+?)\\. Use a stability\\.\\* image-edit model id or add supports_nova_canvas_image_edit in model_prices for this id\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/image_edit/amazon_nova_canvas_image_edit_transformation.py","lineNumber":506,"sourceCode":"\ndef get_bedrock_image_edit_config_for_model(\n    model: str,\n) -> BaseImageEditConfig:\n    \"\"\"\n    Return the correct Bedrock image-edit config for the model id.\n\n    Same routing as ``BedrockImageEdit.get_config_class``: Stability edit models,\n    Nova Canvas when marked in model_cost; otherwise raises ``ValueError``.\n    \"\"\"\n    from litellm.llms.bedrock.image_edit.stability_transformation import (\n        BedrockStabilityImageEditConfig,\n    )\n\n    if BedrockStabilityImageEditConfig._is_stability_edit_model(model):\n        return BedrockStabilityImageEditConfig()\n    if BedrockAmazonNovaCanvasImageEditConfig._is_nova_canvas_image_edit_model(model):\n        return BedrockAmazonNovaCanvasImageEditConfig()\n    raise ValueError(\n        f\"Unsupported Bedrock image-edit model: {model!r}. \"\n        \"Use a stability.* image-edit model id or add supports_nova_canvas_image_edit \"\n        \"in model_prices for this id.\"\n    )\n","sourceCodeStart":488,"sourceCodeEnd":511,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/bedrock/image_edit/amazon_nova_canvas_image_edit_transformation.py#L488-L511","documentation":"get_bedrock_image_edit_config_for_model routes a Bedrock model id to a request transformer: stability.* edit ids go to BedrockStabilityImageEditConfig, ids flagged supports_nova_canvas_image_edit in model_cost go to the Nova Canvas config, and everything else raises this ValueError. It mirrors BedrockImageEdit.get_config_class for callers that need a config instance directly.","triggerScenarios":"get_bedrock_image_edit_config_for_model('bedrock/some.new-model') where the id is neither a stability edit model nor marked supports_nova_canvas_image_edit in model_prices_and_context / model_cost.","commonSituations":"A newly released Bedrock image-edit model not yet present in the installed LiteLLM's model catalog (version lag); custom/private model ids; typo in the model string.","solutions":["Use a supported stability edit id, e.g. bedrock/stability.stable-image-core-v1:1, bedrock/stability.stable-image-ultra-v1:1","For Nova Canvas models, register the id with supports_nova_canvas_image_edit: true in your model_prices/custom config","Upgrade LiteLLM so fresh model_prices_and_context entries include the new model","Check the exact model id spelling and its bedrock/ prefix"],"exampleFix":"# before\nconfig = get_bedrock_image_edit_config_for_model(\"bedrock/my-custom-editor\")\n\n# after\nfrom litellm.constants import MODEL_COST\nMODEL_COST[\"my-custom-editor\"] = {\"supports_nova_canvas_image_edit\": True, ...}\nconfig = get_bedrock_image_edit_config_for_model(\"bedrock/my-custom-editor\")","handlingStrategy":"validation","validationCode":"def is_supported_edit_model(model: str, model_cost: dict) -> bool:\n    m = model.removeprefix(\"bedrock/\").lower()\n    if m.startswith(\"stability.\"):\n        return True\n    return bool(model_cost.get(model) or {}).get(\"supports_nova_canvas_image_edit\")\n\nassert is_supported_edit_model(model, litellm.model_cost), f\"unsupported edit model {model}\"","typeGuard":"def is_bedrock_image_edit_model(model: str, model_cost: dict | None = None) -> bool:\n    \"\"\"True when the id routes to a Bedrock image-edit transformer.\"\"\"\n    m = (model or \"\").removeprefix(\"bedrock/\").lower()\n    if m.startswith(\"stability.\"):\n        return True\n    if model_cost:\n        for key in (model, f\"bedrock/{model}\"):\n            entry = model_cost.get(key)\n            if entry and entry.get(\"supports_nova_canvas_image_edit\"):\n                return True\n    return False","tryCatchPattern":"try:\n    config = get_bedrock_image_edit_config_for_model(model)\nexcept ValueError as e:\n    if \"Unsupported Bedrock image-edit model\" in str(e):\n        raise ConfigurationError(f\"{model} cannot edit images; use a stability edit id or flag it\") from e\n    raise","preventionTips":["Pin model ids in config with a capability flag list (image_edit: true/false) instead of free-form strings","Run a routing smoke test on startup for each configured model","Track LiteLLM release notes for new supports_nova_canvas_image_edit entries"],"tags":["bedrock","image-edit","model-routing","model-registry","unsupported-model"],"backgroundTag":"unsupported-model","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}