sgl-project/sglang · error · ValueError

unsupported task alias mapping {alias!r} -> {target!r}

Error message

unsupported task alias mapping {alias!r} -> {target!r}

What it means

An alias is only valid if canonical_minimax_h3_task(alias) equals the alias's declared target. This prevents arbitrary renames: aliases must be the officially recognized spellings that the canonicalizer already knows.

Source

Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py:116

            video_sigma_shift=video_sigma,
            audio_sigma_shift=audio_sigma,
        )
        for task in metadata.tasks:
            if canonical_minimax_h3_task(task) != task:
                raise ValueError(
                    f"tasks must contain canonical task names, got {task!r}"
                )
            if partition_for_task(task) != partition:
                raise ValueError(
                    f"task {task!r} does not belong to partition {partition!r}"
                )
        for alias, target in metadata.task_aliases.items():
            if target not in metadata.tasks:
                raise ValueError(
                    f"task alias {alias!r} targets undeclared task {target!r}"
                )
            if canonical_minimax_h3_task(alias) != target:
                raise ValueError(
                    f"unsupported task alias mapping {alias!r} -> {target!r}"
                )
        return metadata

    @property
    def sigma_shift_scales(self) -> dict[str, float]:
        return {"video": self.video_sigma_shift, "audio": self.audio_sigma_shift}

    def canonical_task(self, task: str) -> str:
        normalized = task.strip().lower()
        canonical = self.task_aliases.get(normalized, normalized)
        if canonical not in self.tasks:
            raise ValueError(
                f"task {task!r} is not served by MiniMax H3 partition {self.partition!r}; "
                f"supported tasks: {list(self.tasks)!r}"
            )
        if partition_for_task(canonical) != self.partition:
            raise ValueError(

View on GitHub (pinned to 0132848349)

Solutions

  1. Use only the built-in recognized alias spellings from the canonicalizer
  2. Pass the canonical task name in requests instead of inventing aliases
  3. Update the canonical alias table in code if a new alias is genuinely required

Example fix

// before
"task_aliases": {"my_video": "text_to_video"}
// after
"task_aliases": {"t2v": "text_to_video"}  // recognized alias only
Defensive patterns

Strategy: validation

Validate before calling

assert all(canonical_minimax_h3_task(a) == t for a, t in aliases.items()), "invented alias"

Prevention

When it happens

Trigger: task_aliases: {"my_video": "text_to_video"} where canonical_minimax_h3_task("my_video") returns "my_video" (not "text_to_video") — an invented alias.

Common situations: Teams adding friendly local aliases to model_index.json expecting them to work; only the built-in alias table is honored.

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


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