{"record":{"id":"f30ff0d5119e9222","repo":"sgl-project/sglang","slug":"model-index-json-minimax-h3-task-aliases-must-map","errorCode":null,"errorMessage":"model_index.json._minimax_h3.task_aliases must map strings to strings","messagePattern":"model_index\\.json\\._minimax_h3\\.task_aliases must map strings to strings","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py","lineNumber":77,"sourceCode":"        if not isinstance(raw, Mapping):\n            raise ValueError(\"model_index.json._minimax_h3 must be an object\")\n        if raw.get(\"schema_version\") != 1:\n            raise ValueError(\"model_index.json._minimax_h3.schema_version must be 1\")\n        partition = raw.get(\"partition\")\n        if partition not in {\"fl2va\", \"ref2va\"}:\n            raise ValueError(\n                \"model_index.json._minimax_h3.partition must be one of \" \"fl2va, ref2va\"\n            )\n        tasks = _string_list(raw.get(\"tasks\"), \"model_index.json._minimax_h3.tasks\")\n        aliases = raw.get(\"task_aliases\", {})\n        if not isinstance(aliases, Mapping) or any(\n            not isinstance(key, str)\n            or not key\n            or not isinstance(value, str)\n            or not value\n            for key, value in aliases.items()\n        ):\n            raise ValueError(\n                \"model_index.json._minimax_h3.task_aliases must map strings to strings\"\n            )\n        scales = raw.get(\"sigma_shift_scales\")\n        if not isinstance(scales, Mapping):\n            raise ValueError(\n                \"model_index.json._minimax_h3.sigma_shift_scales must be an object\"\n            )\n        try:\n            video_sigma = float(scales[\"video\"])\n            audio_sigma = float(scales[\"audio\"])\n        except (KeyError, TypeError, ValueError) as exc:\n            raise ValueError(\n                \"model_index.json._minimax_h3.sigma_shift_scales requires numeric \"\n                \"video and audio values\"\n            ) from exc\n        metadata = cls(\n            schema_version=1,\n            partition=partition,","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py#L59-L95","documentation":"MiniMaxH3ReleaseMetadata.from_model_index validates the private `_minimax_h3.task_aliases` section of model_index.json. It requires task_aliases to be a mapping where every key and value is a non-empty string, because aliases are used later for canonical task resolution. A malformed aliases table (non-string key, empty string, or non-string target) raises this ValueError at load time.","triggerScenarios":"Loading a MiniMax H3 model whose model_index.json contains `_minimax_h3.task_aliases` with entries like integers as keys, null/None targets, or empty-string names; raised inside from_model_index which is called by _load_config.","commonSituations":"Hand-edited model_index.json, a converter/exporter that serializes alias maps with non-string JSON keys, or a config generated from Python dicts with int keys (JSON coerces them but round-trip tooling may not).","solutions":["Open model_index.json and inspect _minimax_h3.task_aliases; ensure every entry is \"alias\": \"canonical_task\" with both non-empty strings","Regenerate or re-export the model index from the official exporter instead of editing by hand","If you control the writer, coerce keys/values with str() and skip empty ones before serialization"],"exampleFix":"// before\n\"_minimax_h3\": {\"task_aliases\": {\"t2v\": 1}}\n// after\n\"_minimax_h3\": {\"task_aliases\": {\"t2v\": \"text_to_video\"}}","handlingStrategy":"validation","validationCode":"aliases = raw.get(\"_minimax_h3\", {}).get(\"task_aliases\", {})\nassert all(isinstance(k, str) and k and isinstance(v, str) and v for k, v in aliases.items()), \"bad task_aliases\"","typeGuard":"def valid_task_aliases(a: Any) -> bool:\n    return isinstance(a, Mapping) and all(\n        isinstance(k, str) and k and isinstance(v, str) and v for k, v in a.items()\n    )","tryCatchPattern":null,"preventionTips":["Validate model_index.json against a JSON schema before deployment","Generate metadata with tooling instead of hand-editing"],"tags":["minimax-h3","model-index","task-aliases","config-validation"],"backgroundTag":"schema-validation-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}