{"record":{"id":"a6beedee22b9843f","repo":"calesthio/OpenMontage","slug":"unsupported-minimax-image-model-model","errorCode":null,"errorMessage":"Unsupported MiniMax image model '{model}'.","messagePattern":"Unsupported MiniMax image model '(.+?)'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/graphics/minimax_image.py","lineNumber":176,"sourceCode":"        return f\"MiniMax API error {status_code}: {status_msg}\"\n\n    @staticmethod\n    def _output_paths(output_path: str | None, count: int) -> list[Path]:\n        path = Path(output_path or \"minimax_image.png\")\n        if not path.suffix:\n            path = path.with_suffix(\".png\")\n        if count == 1:\n            return [path]\n        return [\n            path.with_name(f\"{path.stem}_{index}{path.suffix}\")\n            for index in range(1, count + 1)\n        ]\n\n    @staticmethod\n    def _build_payload(inputs: dict[str, Any]) -> dict[str, Any]:\n        model = inputs.get(\"model\", DEFAULT_MODEL)\n        if model not in MODELS:\n            raise ValueError(f\"Unsupported MiniMax image model '{model}'.\")\n\n        prompt = inputs.get(\"prompt\")\n        if not isinstance(prompt, str) or not prompt:\n            raise ValueError(\"MiniMax image generation requires 'prompt'.\")\n        if len(prompt) > 1500:\n            raise ValueError(\"MiniMax image prompt must not exceed 1500 characters.\")\n\n        width = inputs.get(\"width\")\n        height = inputs.get(\"height\")\n        if (width is None) != (height is None):\n            raise ValueError(\"MiniMax image width and height must be set together.\")\n\n        payload: dict[str, Any] = {\n            \"model\": model,\n            \"prompt\": prompt,\n            \"response_format\": inputs.get(\"response_format\", \"url\"),\n            \"n\": inputs.get(\"n\", 1),\n            \"prompt_optimizer\": inputs.get(\"prompt_optimizer\", False),","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/graphics/minimax_image.py#L158-L194","documentation":"Raised by MiniMaxImage._build_payload when the 'model' input is not in the module's MODELS allowlist (the default is DEFAULT_MODEL when omitted). The tool only accepts the MiniMax image model ids it was built and tested against, so unknown ids fail fast before any API call.","triggerScenarios":"Passing model='image-01-2025' style strings from memory, or a newly released MiniMax model id that the tool version predates; also typos and case mismatch ('Image-01' vs 'image-01').","commonSituations":"MiniMax releases a new image model and the pinned tool version doesn't know it; copying a model id from a different provider's tool or from newer API docs.","solutions":["Check the tool's get_info()/MODELS list for supported ids and use one of those","Update the OpenMontage tool to a version whose MODELS includes the new id","If the new model is API-compatible, add its id to MODELS locally and re-verify"],"exampleFix":"# before\ninputs = {\"model\": \"image-02-live\", \"prompt\": \"...\"}\n# after\ninputs = {\"model\": \"image-01\", \"prompt\": \"...\"}  # an id present in MODELS","handlingStrategy":"validation","validationCode":"from tools.graphics.minimax_image import MODELS\nmodel = inputs.get(\"model\", \"image-01\")\nif model not in MODELS:\n    raise ValueError(f\"pick one of {sorted(MODELS)}\")","typeGuard":"def is_supported_minimax_model(model: Any) -> bool:\n    return isinstance(model, str) and model in MODELS","tryCatchPattern":null,"preventionTips":["Source model ids from the tool's get_info() at runtime, not from memory","Fail fast on unknown ids in config validation","Upgrade the tool when adopting newly released MiniMax models"],"tags":["minimax","image-generation","model-id","config"],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}