{"record":{"id":"da2a869a31935546","repo":"sgl-project/sglang","slug":"path-requires-at-least-one-entry-for-task-profi","errorCode":null,"errorMessage":"{path} requires at least one entry for task {profile.task!r}","messagePattern":"(.+?) requires at least one entry for task (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/request_validation.py","lineNumber":161,"sourceCode":"    *,\n    profile: MiniMaxH3TaskProfile,\n    frame_count: int | None,\n) -> list[dict[str, Any]]:\n    path = \"conditions\"\n    if conditions is None:\n        conditions = []\n    if not isinstance(conditions, Sequence) or isinstance(conditions, (str, bytes)):\n        raise ValueError(f\"{path} must be a list\")\n\n    if not profile.conditions_required:\n        if len(conditions) > 0:\n            raise ValueError(\n                f\"{path} must be empty for task {profile.task!r} \"\n                f\"(got {len(conditions)} entries)\"\n            )\n        return []\n    if len(conditions) == 0:\n        raise ValueError(\n            f\"{path} requires at least one entry for task {profile.task!r}\"\n        )\n    if (\n        profile.min_condition_count is not None\n        and len(conditions) < profile.min_condition_count\n    ):\n        raise ValueError(\n            f\"{path} requires at least {profile.min_condition_count} entries \"\n            f\"for task {profile.task!r}, got {len(conditions)}\"\n        )\n    if (\n        profile.max_condition_count is not None\n        and len(conditions) > profile.max_condition_count\n    ):\n        raise ValueError(\n            f\"{path} allows at most {profile.max_condition_count} entries \"\n            f\"for task {profile.task!r}, got {len(conditions)}\"\n        )","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/request_validation.py#L143-L179","documentation":"The task requires conditions (conditions_required true, no special minimum) but the list is empty. Reference-driven tasks need at least one keyframe/reference entry.","triggerScenarios":"Submitting an image/video-conditioned task (e.g. ref2va) with conditions omitted or [].","commonSituations":"Defaulting conditions to [] universally; forgetting to attach the reference image after moving file upload code.","solutions":["Add at least one valid condition entry with role/type/uri","If you intended text-only generation, use the text-only task instead"],"exampleFix":"// before\n\"conditions\": []\n// after\n\"conditions\": [{\"role\": \"reference\", \"type\": \"image\", \"uri\": \"ref.png\"}]","handlingStrategy":"validation","validationCode":"if profile.conditions_required and not conditions:\n    raise ValueError('this task requires at least one condition')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify reference uploads completed before submitting"],"tags":["minimax-h3","conditions","required-field"],"backgroundTag":"missing-required-field","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}