{"record":{"id":"a803e4c914ec4f78","repo":"sgl-project/sglang","slug":"unsupported-minimax-h3-task-task-r","errorCode":null,"errorMessage":"unsupported MiniMax H3 task {task!r}","messagePattern":"unsupported MiniMax H3 task (.+?)","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":56,"sourceCode":")\n\n\ndef canonical_minimax_h3_task(task: str) -> str:\n    \"\"\"Normalize a public task name (no aliases are currently defined).\"\"\"\n\n    return task\n\n\ndef partition_for_task(task: str) -> str:\n    \"\"\"Return the deployment partition serving *task*.\"\"\"\n\n    if not isinstance(task, str) or not task.strip():\n        raise ValueError(\"MiniMax H3 task must be a non-empty string\")\n    normalized = task.strip().lower()\n    try:\n        return MINIMAX_H3_TASK_PARTITIONS[normalized]\n    except KeyError as exc:\n        raise ValueError(f\"unsupported MiniMax H3 task {task!r}\") from exc\n\n\nMINIMAX_H3_FINITE_ASPECT_RATIOS = (\n    \"21:9\",\n    \"16:9\",\n    \"4:3\",\n    \"1:1\",\n    \"3:4\",\n    \"9:16\",\n)\n\n# ``fl2va`` remains the single public task name for all keyframe variants:\n# first-frame-only, last-frame-only, and first+last.  Keep the accepted\n# semantic signatures centralized so validation and every downstream sink can\n# reject middle/reversed/stale payloads consistently.\nMINIMAX_H3_FL2VA_KEYFRAME_SIGNATURES: tuple[tuple[int, ...], ...] = (\n    (0,),\n    (-1,),","sourceCodeStart":38,"sourceCodeEnd":74,"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#L38-L74","documentation":"After normalization (strip + lower), the task string is looked up in MINIMAX_H3_TASK_PARTITIONS. An unknown task raises ValueError with the original (non-normalized) task in the message, chained from the KeyError. Only tasks with a configured deployment partition are accepted.","triggerScenarios":"Calling partition_for_task('t2v') instead of 't2va', 'FL2VA' works (lowercased) but 'image2video', 'i2v', or any typo fails. Also custom task aliases not registered in MINIMAX_H3_TASK_PARTITIONS.","commonSituations":"Using task names from other video-generation APIs (i2v, v2v, t2v) that don't map to MiniMax H3 naming; version changes that added/renamed tasks; case/whitespace is handled so failures are genuine name mismatches.","solutions":["Use one of the supported MiniMax H3 tasks: check MINIMAX_H3_TASK_PARTITIONS keys for the exact set (includes t2va, fl2va, ref2va)","Print sorted(MINIMAX_H3_TASK_PARTITIONS) to see what your version supports","If you need a new task alias, register it in the partition map via the public registration path or request upstream support"],"exampleFix":"# before\npartition_for_task(\"t2v\")\n\n# after\npartition_for_task(\"t2va\")","handlingStrategy":"type-guard","validationCode":"from ...task_profiles import MINIMAX_H3_TASK_PARTITIONS\nif task.strip().lower() not in MINIMAX_H3_TASK_PARTITIONS:\n    raise ValueError(f\"pick one of {sorted(MINIMAX_H3_TASK_PARTITIONS)}\")","typeGuard":"def is_supported_task(task: str) -> bool:\n    from ...task_profiles import MINIMAX_H3_TASK_PARTITIONS\n    return task.strip().lower() in MINIMAX_H3_TASK_PARTITIONS","tryCatchPattern":"catch ValueError and present the supported task list to the end user for selection","preventionTips":["Use a closed enum/choices list for task in CLI and API schemas","Centralize task normalization through canonical_task"],"tags":["minimax-h3","task-validation","unknown-task"],"backgroundTag":"invalid-enum-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}