{"record":{"id":"f5aba379e9dc3cc4","repo":"sgl-project/sglang","slug":"queued-minimax-h3-jobs-require-pre-queue-resolved","errorCode":null,"errorMessage":"queued MiniMax H3 jobs require pre-queue resolved_v2 geometry","messagePattern":"queued MiniMax H3 jobs require pre-queue resolved_v2 geometry","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":285,"sourceCode":"\n    @staticmethod\n    def _resolved_shape(batch: Req) -> dict[str, Any] | None:\n        canonical = getattr(batch, \"extra\", {}).get(\"minimax_h3_canonical_request\")\n        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(","sourceCodeStart":267,"sourceCodeEnd":303,"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#L267-L303","documentation":"When a queued MiniMax H3 job is projected or its final outputs validated, the adapter reads the pre-queue generation plan and requires its shape['geometry'] to be 'resolved_v2'. This marker guarantees the prompt's spatial geometry (resolution/canvas) was resolved by the dedicated pre-queue stage before scheduling; if it is missing or a different geometry version, the queue invariant is broken.","triggerScenarios":"A batch/Req reaching project_queued_job_fields or validate_final_outputs_sync whose embedded minimax_h3 plan has shape.geometry absent or not equal to 'resolved_v2' — e.g. bypassing the prequeue stage, or a stale plan from an older geometry schema version.","commonSituations":"Custom pipelines that skip the MiniMax H3 prequeue resolution stage; upgrading SGLang where the geometry schema version changed; hand-crafted Req objects in tests.","solutions":["Ensure requests flow through the MiniMax H3 prequeue stage before queueing","Regenerate the plan with the current SGLang version so geometry is resolved as 'resolved_v2'","Inspect minimax_h3_plan_from_batch(batch).shape to see the actual geometry value"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"plan = minimax_h3_plan_from_batch(batch)\nif plan is None or str(plan.shape.get(\"geometry\") or \"\") != \"resolved_v2\":\n    # re-run prequeue resolution before queueing\n    ...","typeGuard":null,"tryCatchPattern":"try:\n    fields = adapter.project_queued_job_fields(batch)\nexcept ValueError as e:\n    if \"resolved_v2 geometry\" in str(e):\n        batch = run_prequeue_resolution(batch)  # then retry\n    else:\n        raise","preventionTips":["Always pass requests through the prequeue stage in custom pipelines","Add a pipeline assertion that geometry=='resolved_v2' before scheduling"],"tags":["minimax-h3","queue-invariant","geometry","internal"],"backgroundTag":"schema-validation-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}