{"record":{"id":"5afccdb1427a12e5","repo":"sgl-project/sglang","slug":"unsupported-ref2va-condition-type-cond-type-r","errorCode":null,"errorMessage":"unsupported ref2va condition type {cond_type!r}","messagePattern":"unsupported ref2va condition type (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/presentation.py","lineNumber":296,"sourceCode":"                    \"video reference requires block token counts and timestamps\"\n                )\n            counts = video_counts_by_ref[video_seen - 1]\n            timestamps = video_timestamps_by_ref[video_seen - 1]\n            if not counts or not timestamps:\n                raise ValueError(\n                    \"video reference requires block token counts and timestamps\"\n                )\n            presentation.text(_text_ids(tokenizer, f\"<Video {ordinal}>: \"))\n            _timestamped_video_blocks(\n                presentation,\n                tokenizer,\n                counts=counts,\n                timestamps=timestamps,\n                context=\"\",\n                video_token_id=video_token_id,\n            )\n        else:\n            raise ValueError(f\"unsupported ref2va condition type {cond_type!r}\")\n    if image_seen != len(image_token_counts):\n        raise ValueError(\"unused image_token_count entries\")\n    if video_seen != len(video_counts_by_ref):\n        raise ValueError(\"unused video block token count entries\")\n    presentation.text(_text_ids(tokenizer, prompt))\n    return presentation.build(return_video_mask=return_video_mask)\n\n\n__all__ = [\n    \"minimax_h3_multi_image_presentation\",\n    \"minimax_h3_ref2va_presentation\",\n    \"minimax_h3_ref2va_video_presentation\",\n    \"minimax_h3_text_only_ids\",\n]\n","sourceCodeStart":278,"sourceCodeEnd":311,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/presentation.py#L278-L311","documentation":"condition_labels drives ref2va emission and only 'image', 'audio', and 'video' condition types are supported; any other string raises this error.","triggerScenarios":"Passing condition_labels containing (\"text\", 1), (\"Video\", 1) (wrong case), or a typo like (\"vidoe\", 1).","commonSituations":"New condition types added to a plan format without presentation support; case mismatches; hand-built label tuples with typos.","solutions":["Restrict condition type strings to exactly 'image', 'audio', 'video' (lowercase)","Fix typos/casing in the plan generator","If a new modality is needed, extend this function in the library rather than passing unknown types"],"exampleFix":"// before\ncondition_labels=[(\"Video\", 1)]\n// after\ncondition_labels=[(\"video\", 1)]","handlingStrategy":"type-guard","validationCode":"allowed = {\"image\", \"audio\", \"video\"}\nassert all(t in allowed for t, _ in condition_labels)","typeGuard":"def valid_condition_labels(labels) -> bool:\n    return all(isinstance(t, str) and t in {\"image\", \"audio\", \"video\"} for t, _ in labels)","tryCatchPattern":null,"preventionTips":["Centralize condition-type constants","Lowercase and validate labels when parsing plans"],"tags":["minimax-h3","ref2va","enum-validation"],"backgroundTag":"unsupported-value-validation","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}