{"record":{"id":"96fc0e639eaee71e","repo":"sgl-project/sglang","slug":"unsupported-minimax-h3-condition-type-condition-t","errorCode":null,"errorMessage":"unsupported MiniMax H3 condition type {condition_type!r}","messagePattern":"unsupported MiniMax H3 condition type (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py","lineNumber":395,"sourceCode":"            raise ValueError(\"MiniMax H3 image material is invalid\") from exc\n        if image_format not in {\"JPEG\", \"PNG\", \"WEBP\"}:\n            raise ValueError(\"MiniMax H3 image material uses an unsupported format\")\n        if width <= 0 or height <= 0:\n            raise ValueError(\n                \"MiniMax H3 image material has no positive display geometry\"\n            )\n        return {\n            \"condition_type\": \"image\",\n            \"coded_width\": int(coded_width),\n            \"coded_height\": int(coded_height),\n            \"display_width\": int(width),\n            \"display_height\": int(height),\n            \"image_format\": image_format,\n            \"exif_transposed\": (coded_width, coded_height) != (width, height),\n        }\n\n    if condition_type not in {\"audio\", \"video\", \"video_audio\"}:\n        raise ValueError(f\"unsupported MiniMax H3 condition type {condition_type!r}\")\n    try:\n        payload = _ffprobe_media(path)\n    except Exception as exc:\n        raise ValueError(\"MiniMax H3 media material is invalid\") from exc\n\n    streams = payload.get(\"streams\") or []\n    format_names = set(\n        str((payload.get(\"format\") or {}).get(\"format_name\") or \"\").split(\",\")\n    )\n    allowed_formats = {\n        \"mov\",\n        \"mp4\",\n        \"m4a\",\n        \"3gp\",\n        \"3g2\",\n        \"mj2\",\n        \"matroska\",\n        \"webm\",","sourceCodeStart":377,"sourceCodeEnd":413,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py#L377-L413","documentation":"The material's condition_type is not one of image, audio, video, video_audio. _validate_localized_media dispatches on condition_type and only supports these four.","triggerScenarios":"Passing a material dict/URI with condition_type such as 'text', 'Video', 'img', or None to the MiniMax H3 material validation path.","commonSituations":"Typos or casing differences in generated requests, schema drift between your request builder and the pipeline, or missing condition_type defaulting to an unexpected value.","solutions":["Set condition_type to exactly one of: image, audio, video, video_audio","Check for trailing whitespace/casing in the field ('video ' vs 'video')","Regenerate the request from the current schema/typed client"],"exampleFix":"# before\n{\"condition_type\": \"Video\", \"path\": \"clip.mp4\"}\n# after\n{\"condition_type\": \"video\", \"path\": \"clip.mp4\"}","handlingStrategy":"type-guard","validationCode":"assert condition_type in {\"image\", \"audio\", \"video\", \"video_audio\"}","typeGuard":"def is_valid_condition_type(t: str) -> bool:\n    return t in {\"image\", \"audio\", \"video\", \"video_audio\"}","tryCatchPattern":null,"preventionTips":["Use a Literal/Enum type for condition_type in request models","Validate requests against the schema before dispatch"],"tags":["minimax-h3","condition-type","enum-validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}