sgl-project/sglang · error · ValueError
model_index.json._minimax_h3.task_aliases must map strings t
Error message
model_index.json._minimax_h3.task_aliases must map strings to strings
What it means
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.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py:77
if not isinstance(raw, Mapping):
raise ValueError("model_index.json._minimax_h3 must be an object")
if raw.get("schema_version") != 1:
raise ValueError("model_index.json._minimax_h3.schema_version must be 1")
partition = raw.get("partition")
if partition not in {"fl2va", "ref2va"}:
raise ValueError(
"model_index.json._minimax_h3.partition must be one of " "fl2va, ref2va"
)
tasks = _string_list(raw.get("tasks"), "model_index.json._minimax_h3.tasks")
aliases = raw.get("task_aliases", {})
if not isinstance(aliases, Mapping) or any(
not isinstance(key, str)
or not key
or not isinstance(value, str)
or not value
for key, value in aliases.items()
):
raise ValueError(
"model_index.json._minimax_h3.task_aliases must map strings to strings"
)
scales = raw.get("sigma_shift_scales")
if not isinstance(scales, Mapping):
raise ValueError(
"model_index.json._minimax_h3.sigma_shift_scales must be an object"
)
try:
video_sigma = float(scales["video"])
audio_sigma = float(scales["audio"])
except (KeyError, TypeError, ValueError) as exc:
raise ValueError(
"model_index.json._minimax_h3.sigma_shift_scales requires numeric "
"video and audio values"
) from exc
metadata = cls(
schema_version=1,
partition=partition,View on GitHub (pinned to 0132848349)
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
Example fix
// before
"_minimax_h3": {"task_aliases": {"t2v": 1}}
// after
"_minimax_h3": {"task_aliases": {"t2v": "text_to_video"}} Defensive patterns
Strategy: validation
Validate before calling
aliases = raw.get("_minimax_h3", {}).get("task_aliases", {})
assert all(isinstance(k, str) and k and isinstance(v, str) and v for k, v in aliases.items()), "bad task_aliases" Type guard
def valid_task_aliases(a: Any) -> bool:
return isinstance(a, Mapping) and all(
isinstance(k, str) and k and isinstance(v, str) and v for k, v in a.items()
) Prevention
- Validate model_index.json against a JSON schema before deployment
- Generate metadata with tooling instead of hand-editing
When it happens
Trigger: 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.
Common situations: 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).
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- task {task!r} is not served by MiniMax H3 partition {self.pa
- {path} must be a non-empty list
- {path} must contain non-empty strings
- {path} must not contain duplicates
- model_index.json._minimax_h3 must be an object
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/f30ff0d5119e9222.
Report an issue: GitHub.