{"record":{"id":"ba8a05ff5179268c","repo":"sgl-project/sglang","slug":"unknown-minimax-h3-task-task-r-supported-sort","errorCode":null,"errorMessage":"unknown minimax_h3 task {task!r}; supported: {sorted(MINIMAX_H3_TASK_PROFILES)}","messagePattern":"unknown minimax_h3 task (.+?); supported: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/task_profiles.py","lineNumber":248,"sourceCode":"        required_components=_BASE_COMPONENTS,\n        # ref2va video may use an explicit aspect ratio such as \"7:4\":\n        # ref2va allows explicit aspect ratios; \"auto\" falls back to the\n        # policy default (references never bind target geometry).\n        aspect_ratio_forced_auto=False,\n        geometry_source=\"explicit_target\",\n        duration_from_audio_reference=True,\n        auto_aspect_ratio=\"16:9\",\n        auto_geometry_source=\"policy_default\",\n        # ref2va video uses a subject image plus a reference video with soundtrack.\n        video_reference_supported=True,\n    ),\n}\n\n\ndef minimax_h3_task_profile(task: str) -> MiniMaxH3TaskProfile:\n    profile = MINIMAX_H3_TASK_PROFILES.get(task)\n    if profile is None:\n        raise ValueError(\n            f\"unknown minimax_h3 task {task!r}; supported: \"\n            f\"{sorted(MINIMAX_H3_TASK_PROFILES)}\"\n        )\n    return profile\n\n\ndef _validate_profiles() -> None:\n    for task, profile in MINIMAX_H3_TASK_PROFILES.items():\n        if profile.task != task:\n            raise ValueError(f\"profile key/task mismatch: {task} vs {profile.task}\")\n        rule_keys = [\n            (rule.role, rule.condition_type) for rule in profile.condition_rules\n        ]\n        if len(rule_keys) != len(set(rule_keys)):\n            raise ValueError(f\"task {task}: condition rules must be unique\")\n        if profile.min_condition_count is not None and profile.min_condition_count <= 0:\n            raise ValueError(f\"task {task}: min_condition_count must be positive\")\n        if profile.max_condition_count is not None and profile.max_condition_count <= 0:","sourceCodeStart":230,"sourceCodeEnd":266,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/task_profiles.py#L230-L266","documentation":"minimax_h3_task_profile looks the task up in the MINIMAX_H3_TASK_PROFILES registry by exact string match (no normalization). An unknown task raises ValueError listing the supported task names. This is the entry point used by request validation and plan resolution.","triggerScenarios":"Calling minimax_h3_validate_canonical_request or minimax_h3_resolve_plan with a task string that isn't an exact key of MINIMAX_H3_TASK_PROFILES — including case mismatches like 'T2VA' (this function does not lowercase, unlike partition_for_task) or whitespace-padded strings.","commonSituations":"Passing an uppercase or padded task from user input directly; using a task alias that exists in the partition table but not in the profile registry; typo'd task names.","solutions":["Use the exact canonical task key; print sorted(MINIMAX_H3_TASK_PROFILES) to list them","Normalize (strip/lower) task strings before calling, since this function does exact-match lookup","Validate the task early with canonical_task to get the normalized form"],"exampleFix":"# before\nminimax_h3_task_profile(\"T2VA\")\n\n# after\nfrom ...task_profiles import canonical_task\nminimax_h3_task_profile(canonical_task(\"T2VA\"))  # -> \"t2va\"","handlingStrategy":"validation","validationCode":"from ...task_profiles import MINIMAX_H3_TASK_PROFILES, canonical_task\ncanonical = canonical_task(task)\nif canonical not in MINIMAX_H3_TASK_PROFILES:\n    raise ValueError(f\"unknown task; supported: {sorted(MINIMAX_H3_TASK_PROFILES)}\")","typeGuard":"def is_known_task(task: str) -> bool:\n    from ...task_profiles import MINIMAX_H3_TASK_PROFILES\n    return task in MINIMAX_H3_TASK_PROFILES","tryCatchPattern":"catch ValueError from minimax_h3_task_profile and return the supported list in the error response","preventionTips":["Remember this lookup is exact-match: strip/lower the task first","Keep task constants in one module instead of string literals"],"tags":["minimax-h3","task-profile","unknown-task","registry-lookup"],"backgroundTag":"invalid-enum-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}