{"record":{"id":"df33d88476ad3ede","repo":"sgl-project/sglang","slug":"minimaxh3audioencodingstage-direct-audio-tokenizer","errorCode":null,"errorMessage":"MiniMaxH3AudioEncodingStage direct audio tokenizer encode requires a canonical minimax_h3 request (resolved plan); legacy audio_path-only requests are unsupported.","messagePattern":"MiniMaxH3AudioEncodingStage direct audio tokenizer encode requires a canonical minimax_h3 request \\(resolved plan\\); legacy audio_path-only requests are unsupported\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/stages/audio_encoding.py","lineNumber":75,"sourceCode":"            minimax_h3_cleanup_temp_dirs(batch, owners=(\"material\",))\n\n    def _forward(self, batch: Req, server_args: ServerArgs) -> Req:\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 not None:\n            routed = plan.encoders.get(\"audio\")\n            if not routed:\n                return batch\n            self._encode_references_from_plan(batch, plan, routed)\n            return batch\n        if (\n            batch.sampling_params is not None\n            and batch.sampling_params.audio_path is not None\n        ):\n            raise NotImplementedError(\n                \"MiniMaxH3AudioEncodingStage direct audio tokenizer encode \"\n                \"requires a canonical minimax_h3 request (resolved plan); \"\n                \"legacy audio_path-only requests are unsupported.\"\n            )\n        return batch\n\n    def _encode_references_from_plan(self, batch: Req, plan, routed) -> None:\n        \"\"\"Direct reference-audio encode: audio VAE posterior mean ->\n        normalized channel-major rows in batch.extra.\"\"\"\n        routed_set = set(routed)\n        routed_materials = [\n            material\n            for material in plan.materials\n            if material.condition_index in routed_set\n        ]\n        from .replica_broadcast import (\n            minimax_h3_replica_broadcast_error,\n            minimax_h3_replica_broadcast_extra,","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/stages/audio_encoding.py#L57-L93","documentation":"MiniMaxH3AudioEncodingStage only encodes audio via the canonical minimax_h3 resolved plan. If no plan was produced but the legacy batch.sampling_params.audio_path is set, it raises NotImplementedError rather than silently skipping audio.","triggerScenarios":"Sending a legacy request that only sets sampling_params.audio_path without a canonical minimax_h3 request/plan through the pipeline.","commonSituations":"Porting old audio_path-based workflows or reusing generic pipeline request builders that populate sampling_params directly instead of the canonical multimodal request schema.","solutions":["Migrate the request to the canonical minimax_h3 schema so a resolved plan (with reference audio conditions) is produced","Clear audio_path if no audio conditioning is intended and rely on the plan path"],"exampleFix":"# before\nreq.sampling_params.audio_path = \"ref.wav\"  # legacy\n# after\ncanonical[\"conditions\"].append({\"type\":\"audio\",\"path\":\"ref.wav\", ...})  # canonical plan path","handlingStrategy":"fallback","validationCode":"if batch.sampling_params is not None and batch.sampling_params.audio_path is not None and plan is None:\n    raise ValueError(\"migrate request to canonical minimax_h3 schema\")","typeGuard":null,"tryCatchPattern":"try:\n    out = stage.forward(batch)\nexcept NotImplementedError as e:\n    if \"legacy audio_path\" in str(e):\n        raise ValueError(\"rebuild request as canonical minimax_h3\") from e\n    raise","preventionTips":["Never rely on sampling_params.audio_path for MiniMax H3","Always go through the canonical request builder"],"tags":["minimax-h3","audio-encoding","legacy-api","not-implemented"],"backgroundTag":"unsupported-legacy-api","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}