{"record":{"id":"1a6f7e6c4c506d08","repo":"sgl-project/sglang","slug":"unsupported-model-architecture-arch-registered","errorCode":null,"errorMessage":"Unsupported model architecture: {arch}. Registered architectures: {registered_models}","messagePattern":"Unsupported model architecture: (.+?)\\. Registered architectures: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/models/registry.py","lineNumber":390,"sourceCode":"    ) -> list[str]:\n        load_external_model_package()\n        if isinstance(architectures, str):\n            architectures = [architectures]\n        if not architectures:\n            logger.warning(\"No model architectures are specified\")\n\n        normalized_arch = []\n        for arch in architectures:\n            if arch not in self.registered_models:\n                # A checkpoint may name a class that is only a rename of one we\n                # already implement (e.g. LTX-2.5's `LTX2VocoderWithBWE` is\n                # `LTX2Vocoder`); `_aliases` declares those equivalences.\n                canonical = _ALIAS_TO_MODEL.get(arch)\n                if canonical is not None and canonical in self.registered_models:\n                    normalized_arch.append(canonical)\n                    continue\n                registered_models = list(self.registered_models.keys())\n                raise Exception(\n                    f\"Unsupported model architecture: {arch}. Registered architectures: {registered_models}\"\n                )\n            normalized_arch.append(arch)\n        return normalized_arch\n\n    def inspect_model_cls(\n        self,\n        architectures: str | list[str],\n    ) -> tuple[_ModelInfo, str]:\n        architectures = self._normalize_archs(architectures)\n\n        for arch in architectures:\n            model_info = self._try_inspect_model_cls(arch)\n            if model_info is not None:\n                return (model_info, arch)\n\n        return self._raise_for_unsupported(architectures)\n","sourceCodeStart":372,"sourceCodeEnd":408,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/registry.py#L372-L408","documentation":"_normalize_archs maps aliases (via _ALIAS_TO_MODEL, e.g. 'LTX2Vocoder' to its canonical class) and then requires every architecture to be present in registered_models. Anything unregistered and unaliased raises a bare Exception listing the registered architectures. Note it raises Exception, so catching ValueError alone will not intercept it.","triggerScenarios":"resolve_model_cls/inspect_model_cls receiving an architecture that is neither an alias with a registered canonical name nor directly registered; also when a canonical alias target itself was never registered (alias exists, canonical missing).","commonSituations":"Adding a new alias in _ALIAS_TO_MODEL but forgetting to register the canonical model; plugin registration code not executed before resolution; architecture strings sourced from a newer config.json than the installed registry supports.","solutions":["Register the architecture (or its canonical class) with register_model before calling resolve/inspect","If you added an alias, confirm the canonical name it maps to is itself in registry.registered_models","Diff the requested arch string against registered_models keys for typos/case","Upgrade the package so the registry knows the newer architecture names"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"registered = set(registry.registered_models) | set(_ALIAS_TO_MODEL)\nassert all(a in registered for a in config.architectures), f'unregistered: {config.architectures}'","typeGuard":"def arch_resolvable(arch: str, registry) -> bool:\n    if arch in registry.registered_models:\n        return True\n    canonical = _ALIAS_TO_MODEL.get(arch)\n    return canonical is not None and canonical in registry.registered_models","tryCatchPattern":"try:\n    archs = registry._normalize_archs(config.architectures)\nexcept Exception as e:  # note: bare Exception, not ValueError\n    ...","preventionTips":["Remember this raises bare Exception — catch Exception, not ValueError, if you must","When adding an alias, register the canonical model in the same PR","Test alias resolution in registry unit tests"],"tags":["registry","alias","architecture","unsupported-architecture"],"backgroundTag":"unsupported-model-architecture","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}