sgl-project/sglang · error · ValueError
task alias targets undeclared task
Error message
task alias {alias!r} targets undeclared task {target!r} What it means
Every alias in task_aliases must point at a task that is actually declared in this metadata's tasks list. An alias targeting an undeclared task raises this error, because the alias could never resolve at request time.
Solutions
- Either add the target task to tasks (if this partition serves it) or delete the stale alias
- Keep aliases and tasks in sync by generating both from one source table
Example fix
// before
"tasks": ["image_gen"], "task_aliases": {"t2v": "text_to_video"}
// after
"tasks": ["image_gen", "text_to_video"], "task_aliases": {"t2v": "text_to_video"} Defensive patterns
Strategy: validation
Validate before calling
assert all(target in tasks for target in aliases.values()), "alias targets undeclared task"
Prevention
- Regenerate aliases and tasks together
- Add a CI check that diffs aliases against tasks
When it happens
Trigger: task_aliases: {"t2v": "text_to_video"} while tasks only lists "image_gen" — the target is not in the declared set.
Common situations: Trimming the tasks list without pruning aliases, or adding aliases copied from another partition's metadata.
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
- model_index.json._minimax_h3.task_aliases must map strings…
- unsupported task alias mapping
- MiniMaxH3TextEncodingStage requires the pipeline processor…
- model_index.json._minimax_h3 must be an object
- model_index.json._minimax_h3.partition must be one of…
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/005734df4814e728.
Report an issue: GitHub.
Appendix: source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/release_metadata.py:112
schema_version=1,
partition=partition,
tasks=tasks,
task_aliases=dict(aliases),
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}; "View on GitHub (pinned to 0132848349)