calesthio/OpenMontage · error · ValueError
Unsupported MiniMax image model '{model}'.
Error message
Unsupported MiniMax image model '{model}'. What it means
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.
Source
Thrown at tools/graphics/minimax_image.py:176
return f"MiniMax API error {status_code}: {status_msg}"
@staticmethod
def _output_paths(output_path: str | None, count: int) -> list[Path]:
path = Path(output_path or "minimax_image.png")
if not path.suffix:
path = path.with_suffix(".png")
if count == 1:
return [path]
return [
path.with_name(f"{path.stem}_{index}{path.suffix}")
for index in range(1, count + 1)
]
@staticmethod
def _build_payload(inputs: dict[str, Any]) -> dict[str, Any]:
model = inputs.get("model", DEFAULT_MODEL)
if model not in MODELS:
raise ValueError(f"Unsupported MiniMax image model '{model}'.")
prompt = inputs.get("prompt")
if not isinstance(prompt, str) or not prompt:
raise ValueError("MiniMax image generation requires 'prompt'.")
if len(prompt) > 1500:
raise ValueError("MiniMax image prompt must not exceed 1500 characters.")
width = inputs.get("width")
height = inputs.get("height")
if (width is None) != (height is None):
raise ValueError("MiniMax image width and height must be set together.")
payload: dict[str, Any] = {
"model": model,
"prompt": prompt,
"response_format": inputs.get("response_format", "url"),
"n": inputs.get("n", 1),
"prompt_optimizer": inputs.get("prompt_optimizer", False),View on GitHub (pinned to 95e1c3d0ab)
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
Example fix
# before
inputs = {"model": "image-02-live", "prompt": "..."}
# after
inputs = {"model": "image-01", "prompt": "..."} # an id present in MODELS Defensive patterns
Strategy: validation
Validate before calling
from tools.graphics.minimax_image import MODELS
model = inputs.get("model", "image-01")
if model not in MODELS:
raise ValueError(f"pick one of {sorted(MODELS)}") Type guard
def is_supported_minimax_model(model: Any) -> bool:
return isinstance(model, str) and model in MODELS Prevention
- 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
When it happens
Trigger: 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').
Common situations: 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.
Related errors
- MiniMax image generation requires 'prompt'.
- MiniMax image prompt must not exceed 1500 characters.
- MiniMax image width and height must be set together.
- Unsupported Atlas video model id {model!r}. Use get_info()['
- model must be a non-empty Ark Model/Endpoint ID
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/a6beedee22b9843f.
Report an issue: GitHub.