{"record":{"id":"c970d6c3a75b526c","repo":"sgl-project/sglang","slug":"path-requires-at-least-profile-min-condition-co","errorCode":null,"errorMessage":"{path} requires at least {profile.min_condition_count} entries for task {profile.task!r}, got {len(conditions)}","messagePattern":"(.+?) requires at least (.+?) entries for task (.+?), got (.+?)","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":168,"sourceCode":"    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        )\n\n    aligned_frame_count = (\n        minimax_h3_align_frame_count(frame_count) if frame_count is not None else None\n    )\n    normalized: list[dict[str, Any]] = []\n    seen_frame_indices: dict[int, int] = {}\n    for index, cond in enumerate(conditions):","sourceCodeStart":150,"sourceCodeEnd":186,"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#L150-L186","documentation":"The task profile sets a min_condition_count higher than 1 and fewer entries were supplied — e.g. first/multi-frame tasks that need N keyframes.","triggerScenarios":"Sending 1 condition to a task whose profile.min_condition_count is 2 or more.","commonSituations":"Multi-keyframe storyboard tasks where the client only uploads the first frame; partial upload failures silently dropping entries.","solutions":["Supply at least min_condition_count condition entries","Check the task profile's min_condition_count and enforce it in the client UI"],"exampleFix":"// before\n\"conditions\": [kf0]\n// after\n\"conditions\": [kf0, kf1]","handlingStrategy":"validation","validationCode":"if profile.min_condition_count and len(conditions) < profile.min_condition_count:\n    raise ValueError('too few conditions')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Read min_condition_count from the task profile in the client"],"tags":["minimax-h3","conditions","count-constraint"],"backgroundTag":"value-out-of-range","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}