calesthio/OpenMontage · error · ValueError

Unsupported Atlas image model id {model!r}. Use get_info()['

Error message

Unsupported Atlas image model id {model!r}. Use get_info()['model_catalog'] for live routes.

What it means

ValueError raised by AtlasImageTool._resolve_model when the requested model id is not a key in the IMAGE_MODELS registry. Model ids are exact-match strings; the error points to get_info()['model_catalog'] as the live source of valid ids. _estimate_cost swallows this ValueError and returns a default, but the actual resolve path during execution raises.

Source

Thrown at tools/graphics/atlas_image.py:133

        }
        return info

    def estimate_cost(self, inputs: dict[str, Any]) -> float:
        try:
            model = self._resolve_model(
                str(inputs.get("model", _DEFAULT_MODEL)),
                str(inputs.get("generation_mode", "generate")),
            )
        except ValueError:
            return _DEFAULT_COST
        return float(IMAGE_MODELS[model]["cost_per_image"])

    def estimate_runtime(self, inputs: dict[str, Any]) -> float:
        return 30.0

    def _resolve_model(self, model: str, operation: str) -> str:
        if model not in IMAGE_MODELS:
            raise ValueError(
                f"Unsupported Atlas image model id {model!r}. Use get_info()['model_catalog'] for live routes."
            )
        family = IMAGE_MODELS[model]["family"]
        route = IMAGE_ROUTES.get(family, {}).get(operation)
        if not route:
            raise ValueError(f"{family} does not expose generation_mode={operation!r} on Atlas Cloud")
        return route

    def _build_payload(self, inputs: dict[str, Any], model: str) -> dict[str, Any]:
        spec = IMAGE_MODELS[model]
        payload: dict[str, Any] = {"model": model, "prompt": inputs.get("prompt", "")}
        width = int(inputs.get("width", 2048))
        height = int(inputs.get("height", 2048))
        style = spec["size_style"]

        if style == "star":
            payload["size"] = f"{width}*{height}"
        elif style == "x":

View on GitHub (pinned to 95e1c3d0ab)

Solutions

  1. Call get_info()['model_catalog'] and copy the exact model id string from it.
  2. Update stale hardcoded ids in your code/config to the current catalog names.
  3. If you need a stable default, omit the model argument — the tool falls back to _DEFAULT_MODEL.
  4. Keep model ids in one config location so catalog renames are a one-line fix.

Example fix

# before
inputs = {"model": "seedream", "prompt": "..."}  # alias, not in registry -> ValueError

# after
info = tool.get_info()
valid_ids = list(info["model_catalog"].keys())
inputs = {"model": valid_ids[0], "prompt": "..."}  # exact id from live catalog
Defensive patterns

Strategy: validation

Validate before calling

valid_models = set(tool.get_info()["model_catalog"].keys())
assert inputs.get("model", _DEFAULT) in valid_models or "model" not in inputs

Type guard

def is_valid_atlas_model(tool, model: str) -> bool:
    return model in tool.get_info()["model_catalog"]

Try / catch

try:
    result = tool.run(inputs)
except ValueError as e:
    if "Unsupported Atlas image model id" in str(e):
        inputs["model"] = next(iter(tool.get_info()["model_catalog"]))  # or fix from catalog
        result = tool.run(inputs)
    raise

Prevention

When it happens

Trigger: Passing model='seedream' or another shorthand/alias instead of the full registry id, using a model id from a different provider, or referencing a model removed/renamed in the current tool version.

Common situations: Model catalogs evolve (renames, new versions like seedream-4 -> seedream-5); prompts/code copied from older docs or examples; typos or wrong casing in the id.

Related errors


AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15). Data as JSON: /api/errors/2d10e54924cd3ee4. Report an issue: GitHub.