{"record":{"id":"5dbfc73293f50ad5","repo":"BerriAI/litellm","slug":"unsupported-bedrock-image-edit-model-model-r-u-5dbfc7","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/handler.py","lineNumber":63,"sourceCode":"\n    endpoint_url: str\n    prepped: AWSPreparedRequest\n    body: bytes\n    data: dict\n\n\nclass BedrockImageEdit(BaseAWSLLM):\n    \"\"\"\n    Bedrock Image Edit handler\n    \"\"\"\n\n    @classmethod\n    def get_config_class(cls, model: str | None):\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\n    def image_edit(\n        self,\n        model: str,\n        image: list,\n        prompt: str | None,\n        model_response: ImageResponse,\n        optional_params: dict,\n        logging_obj: LitellmLogging,\n        timeout: float | httpx.Timeout | None,\n        aimage_edit: bool = False,\n        api_base: str | None = None,\n        extra_headers: dict | None = None,\n        client: HTTPHandler | AsyncHTTPHandler | None = None,","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/bedrock/image_edit/handler.py#L45-L81","documentation":"BedrockImageEdit.get_config_class performs the same routing as the standalone helper: stability.* edit models, then Nova Canvas when flagged in model_cost; otherwise ValueError. This is the entry-point check on every bedrock image_edit call, so an unrecognized model never reaches AWS.","triggerScenarios":"Any litellm.image_edit(model='bedrock/<id>', ...) or /v1/images/edits where <id> fails both _is_stability_edit_model and _is_nova_canvas_image_edit_model checks.","commonSituations":"Passing chat/inference model ids (bedrock/anthropic.claude-...) to images/edits by mistake; using model aliases without metadata; typo'd ids; litellm version predating nova-canvas edit support.","solutions":["Check the model id: it must match a stability.* image-edit pattern or be a nova-canvas id with supports_nova_canvas_image_edit.","Register custom ids with the flag in model_prices (or update litellm to a version that knows the model).","Route generation-only models to /v1/images/generations."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"EDIT_MODEL_PREFIXES = (\"stability.\",)\nEDIT_MODEL_SUBSTR = \"nova-canvas\"\n\ndef editable(model: str) -> bool:\n    m = model.split(\"/\")[-1]\n    return m.startswith(EDIT_MODEL_PREFIXES) or EDIT_MODEL_SUBSTR in m","typeGuard":"def is_edit_routed(model: object) -> bool:\n    return isinstance(model, str) and (\n        model.split(\"/\")[-1].startswith(\"stability.\") or \"nova-canvas\" in model\n    )","tryCatchPattern":null,"preventionTips":["Validate model id against the routed families before calling image_edit.","Fail fast in your API layer with a clear message instead of relying on litellm's ValueError.","Watch litellm release notes for new image-edit model support."],"tags":["bedrock","image-edit","model-routing","validation"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}