sgl-project/sglang · error · ValueError

Model architectures {architectures} are not supported for no

Error message

Model architectures {architectures} are not supported for now. Supported architectures: {all_supported_archs}

What it means

The companion error to 1724: none of the requested architectures exist in the registry's supported list, so resolution cannot proceed. The message enumerates all registered architectures so you can see what is available.

Source

Thrown at python/sglang/multimodal_gen/runtime/models/registry.py:352

            model = _LazyRegisteredModel(
                module_name=split_str[0], class_name=split_str[1]
            )
        else:
            model = _RegisteredModel.from_model_cls(model_cls)

        self.registered_models[model_arch] = model

    def _raise_for_unsupported(self, architectures: list[str]) -> NoReturn:
        all_supported_archs = self.get_supported_archs()

        if any(arch in all_supported_archs for arch in architectures):
            raise ValueError(
                f"Model architectures {architectures} failed "
                "to be inspected. Please check the logs for more details."
            )

        raise ValueError(
            f"Model architectures {architectures} are not supported for now. "
            f"Supported architectures: {all_supported_archs}"
        )

    def _try_load_model_cls(self, model_arch: str) -> type[nn.Module] | None:
        if model_arch not in self.registered_models:
            return None

        return _try_load_model_cls(model_arch, self.registered_models[model_arch])

    def _try_inspect_model_cls(self, model_arch: str) -> _ModelInfo | None:
        if model_arch not in self.registered_models:
            return None

        return _try_inspect_model_cls(model_arch, self.registered_models[model_arch])

    def _normalize_archs(
        self,

View on GitHub (pinned to 0132848349)

Solutions

  1. Copy the exact architecture string from the model's config.json into the call, or register your architecture with register_model(arch, module:class)
  2. Check case/spacing against the printed supported list
  3. If the model lives in the main sglang LLM path rather than multimodal_gen, use the LLM model registry instead
  4. For a custom model, register it before resolving: registry.register_model('MyArch', 'my_pkg.my_mod:MyModel')
Defensive patterns

Strategy: validation

Validate before calling

supported = set(registry.get_supported_archs())
missing = [a for a in config.architectures if a not in supported]
if missing:
    raise ValueError(f'architectures not registered: {missing}; registered: {sorted(supported)}')

Type guard

def is_supported(config, registry) -> bool:
    return any(a in registry.get_supported_archs() for a in config.architectures)

Try / catch

try:
    cls = registry.resolve_model_cls(config)
except ValueError as e:
    if 'not supported' in str(e):
        # fall back to explicit class or different registry
        ...

Prevention

When it happens

Trigger: Calling inspect_model_cls/resolve_model_cls with a config architectures value like ['MyNewModel'] that was never registered via register_model, or with a typo'd/case-mismatched architecture name.

Common situations: New diffusion/multimodal model not yet added to this registry; HF config using a renamed architecture string; using the multimodal_gen registry for a text-only LLM architecture it does not cover.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/fe03a82dc72d3eeb. Report an issue: GitHub.