{"record":{"id":"adb54a05fc65a57f","repo":"sgl-project/sglang","slug":"task-task-r-resolves-outside-partition-self-par","errorCode":null,"errorMessage":"task {task!r} resolves outside partition {self.partition!r}","messagePattern":"task (.+?) resolves outside partition (.+?)","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":129,"sourceCode":"            if target not in metadata.tasks:\n                raise ValueError(\n                    f\"task alias {alias!r} targets undeclared task {target!r}\"\n                )\n            if canonical_minimax_h3_task(alias) != target:\n                raise ValueError(\n                    f\"unsupported task alias mapping {alias!r} -> {target!r}\"\n                )\n        return metadata\n\n    @property\n    def sigma_shift_scales(self) -> dict[str, float]:\n        return {\"video\": self.video_sigma_shift, \"audio\": self.audio_sigma_shift}\n\n    def canonical_task(self, task: str) -> str:\n        normalized = task.strip().lower()\n        canonical = self.task_aliases.get(normalized, normalized)\n        if canonical not in self.tasks:\n            raise ValueError(\n                f\"task {task!r} is not served by MiniMax H3 partition {self.partition!r}; \"\n                f\"supported tasks: {list(self.tasks)!r}\"\n            )\n        if partition_for_task(canonical) != self.partition:\n            raise ValueError(\n                f\"task {task!r} resolves outside partition {self.partition!r}\"\n            )\n        return canonical\n\n\nclass MiniMaxH3PartitionAdmissionStage(PipelineStage):\n    def __init__(self, metadata: MiniMaxH3ReleaseMetadata) -> None:\n        super().__init__()\n        self.metadata = metadata\n\n    def forward(self, batch: Req, server_args: ServerArgs) -> Req:\n        task = None if batch.sampling_params is None else batch.sampling_params.task\n        if not isinstance(task, str) or not task.strip():","sourceCodeStart":111,"sourceCodeEnd":147,"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#L111-L147","documentation":"canonical_task resolves a requested task through aliases and then verifies the canonical name both is declared and maps back to the loaded partition. This error fires in forward when the task name is declared but partition_for_task places it in the other partition (fl2va vs ref2va).","triggerScenarios":"Sending a request whose task string (after alias resolution) belongs to the other partition, e.g. asking a ref2va checkpoint to serve a fl2va task at forward time.","commonSituations":"Single checkpoint deployed for the wrong workload, client reusing task names across model versions, or alias table drift between releases.","solutions":["Deploy the checkpoint whose partition matches the requested task (check _minimax_h3.partition in model_index.json)","Fix the task string or alias in the request to one this partition serves","Serve both partitions if you need both task families"],"exampleFix":"// before\nresponse = partition.forward(task=\"t2v\", ...)  # on ref2va weights\n\n// after\nresponse = ref2va_partition.forward(task=partition.canonical_task(\"ref2v\"), ...)","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    task = meta.canonical_task(requested)\nexcept ValueError as e:\n    return unsupported_task(str(e))","preventionTips":["Advertise the partition's supported tasks in the API surface","Route requests by partition_for_task before forward"],"tags":["minimax-h3","task-routing","partition"],"backgroundTag":"unsupported-task-for-model","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}