{"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/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/bedrock/image_edit/amazon_nova_canvas_image_edit_transformation.py#L488-L511","documentation":"Bedrock image-edit routing recognizes only two families: stability.* edit models and Nova Canvas models explicitly flagged with supports_nova_canvas_image_edit in model_cost/model_prices. This helper (used to resolve a config class for a model string) raises ValueError for anything else so an unsupported model fails fast before any AWS call.","triggerScenarios":"Calling /v1/images/edits with a bedrock model id that is neither stability.* nor a nova-canvas id with the supports_nova_canvas_image_edit flag — e.g. 'bedrock/titan-image-generator-v1' or a custom/aliased id.","commonSituations":"New Bedrock edit model not yet in litellm's model_prices; custom model alias (bedrock/my-own-model) routed to image edits; typo in the model string; older litellm version lacking the nova-canvas flag.","solutions":["Use a supported model id: a stability.* edit model (e.g. bedrock/stability.sd3-large-img-edit) or an amazon nova-canvas id with supports_nova_canvas_image_edit in model_prices.","For a custom/private model id, add supports_nova_canvas_image_edit: true to its entry in model_prices_and_context.json (or via litellm known model metadata customization) and make the id resolvable.","Upgrade litellm — newly shipped Bedrock edit models get flags added over time.","If the model only supports generation, call /v1/images/generations instead."],"exampleFix":"# before: ValueError for unflagged id\nlitellm.image_edit(model=\"bedrock/titan-image-generator-v1\", ...)\n# after: use a routed family or flag your id in model_prices\nlitellm.image_edit(model=\"bedrock/stability.sd3-large-img-edit\", ...)","handlingStrategy":"validation","validationCode":"def is_supported_edit_model(model: str) -> bool:\n    return model.startswith(\"stability.\") or (\n        \"nova-canvas\" in model  # plus supports_nova_canvas_image_edit flag in model_prices\n    )","typeGuard":"def is_bedrock_edit_model(model: object) -> bool:\n    if not isinstance(model, str):\n        return False\n    m = model.removeprefix(\"bedrock/\")\n    return m.startswith(\"stability.\") or \"nova-canvas\" in m","tryCatchPattern":null,"preventionTips":["Whitelist edit-capable model ids in your model router before dispatching to /images/edits.","When adding custom bedrock models, register supports flags in model_prices at the same time.","Keep litellm updated so newly supported edit models route correctly."],"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"}