{"record":{"id":"4696008254473722","repo":"sgl-project/sglang","slug":"queued-minimax-h3-jobs-require-pre-queue-resolved-469600","errorCode":null,"errorMessage":"queued MiniMax H3 jobs require pre-queue resolved temporal dimensions","messagePattern":"queued MiniMax H3 jobs require pre-queue resolved temporal dimensions","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/video_adapter.py","lineNumber":289,"sourceCode":"        if not isinstance(canonical, dict) or not all(\n            key in canonical\n            for key in (\"schema\", \"task\", \"prompt\", \"conditions\", \"target\")\n        ):\n            return None\n        from sglang.multimodal_gen.runtime.pipelines_core.stages.model_specific_stages.minimax_h3.resolved_plan import (\n            minimax_h3_plan_from_batch,\n        )\n\n        plan = minimax_h3_plan_from_batch(batch)\n        if plan is None:\n            return None\n        shape = plan.shape\n        if str(shape.get(\"geometry\") or \"\") != \"resolved_v2\":\n            raise ValueError(\n                \"queued MiniMax H3 jobs require pre-queue resolved_v2 geometry\"\n            )\n        if shape.get(\"frame_count\") is None:\n            raise ValueError(\n                \"queued MiniMax H3 jobs require pre-queue resolved temporal dimensions\"\n            )\n        return shape\n\n    def project_queued_job_fields(self, batch: Req) -> dict[str, str]:\n        shape = self._resolved_shape(batch)\n        if shape is None:\n            return {}\n        fields: dict[str, str] = {}\n        if shape.get(\"width\") is not None and shape.get(\"height\") is not None:\n            fields[\"size\"] = f\"{int(shape['width'])}x{int(shape['height'])}\"\n        queued_frame_count = shape.get(\"frame_count\")\n        if queued_frame_count is not None:\n            fields[\"seconds\"] = _format_video_seconds(\n                int(queued_frame_count) / float(shape[\"fps\"])\n            )\n        quality = getattr(batch.sampling_params, \"quality\", None)\n        explicit_fields = getattr(batch.sampling_params, \"_explicit_fields\", ())","sourceCodeStart":271,"sourceCodeEnd":307,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/video_adapter.py#L271-L307","documentation":"Companion invariant to the geometry check: the pre-queue plan for a queued MiniMax H3 job must carry a resolved frame_count. Temporal dimensions (duration, fps, frame count) are resolved before queueing so downstream validation knows exactly how many frames the output must contain; a None frame_count means temporal resolution never happened.","triggerScenarios":"project_queued_job_fields or validate_final_outputs_sync reads a plan where shape['frame_count'] is None (resolution fields present but temporal fields unresolved).","commonSituations":"Requests that skip the prequeue temporal resolution stage (e.g. image-only or malformed video specs); partial plan objects built by older code or tests.","solutions":["Run the request through the MiniMax H3 prequeue stage that resolves duration/frame_count","Specify explicit duration/fps in the request so temporal resolution succeeds","Log the full plan.shape to identify which temporal keys are missing"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"shape = plan.shape\nassert shape.get(\"geometry\") == \"resolved_v2\" and shape.get(\"frame_count\") is not None","typeGuard":null,"tryCatchPattern":"try:\n    adapter.project_queued_job_fields(batch)\nexcept ValueError as e:\n    if \"temporal dimensions\" in str(e):\n        batch = rerun_temporal_resolution(batch)\n    else:\n        raise","preventionTips":["Give explicit duration/fps in requests so temporal resolution never fails","Validate plan.shape keys in unit tests for the prequeue stage"],"tags":["minimax-h3","queue-invariant","frame-count","internal"],"backgroundTag":"schema-validation-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}