{"record":{"id":"47eb2f6735cf47da","repo":"sgl-project/sglang","slug":"asr-max-buffer-seconds-must-be-positive-got-cf","errorCode":null,"errorMessage":"--asr-max-buffer-seconds must be positive (got {cfg.asr_max_buffer_seconds}).","messagePattern":"--asr-max-buffer-seconds must be positive \\(got (.+?)\\)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/server_args.py","lineNumber":9554,"sourceCode":"            self._declare(\n                \"_handle_dllm_inference\",\n                disaggregation_mode=\"null\",\n            )\n\n        if cfg.enable_mixed_chunk:\n            logger.warning(\n                \"Mixed chunked prefill is disabled because of using diffusion LLM inference.\"\n            )\n            self._declare(\n                \"_handle_dllm_inference\",\n                enable_mixed_chunk=False,\n            )\n\n    def _handle_asr_validation(self):\n        \"\"\"Validate transcription/ASR-specific server args.\"\"\"\n        cfg = resolving_view(self)\n        if cfg.asr_max_buffer_seconds <= 0:\n            raise ValueError(\n                f\"--asr-max-buffer-seconds must be positive \"\n                f\"(got {cfg.asr_max_buffer_seconds}).\"\n            )\n        if cfg.asr_max_concurrent_sessions <= 0:\n            raise ValueError(\n                f\"--asr-max-concurrent-sessions must be positive \"\n                f\"(got {cfg.asr_max_concurrent_sessions}).\"\n            )\n\n    def _validate_prefill_decode_interval(self):\n        cfg = resolving_view(self)\n        if cfg.prefill_decode_interval < 0:\n            raise ValueError(\"--prefill-decode-interval must be non-negative.\")\n\n    def _handle_other_validations(self):\n        cfg = resolving_view(self)\n        if cfg.default_chat_template_kwargs is not None and not isinstance(\n            cfg.default_chat_template_kwargs, dict","sourceCodeStart":9536,"sourceCodeEnd":9572,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/server_args.py#L9536-L9572","documentation":"Raised by _handle_asr_validation when --asr-max-buffer-seconds is <= 0. This buffers streaming ASR (transcription) audio, so a non-positive buffer duration is meaningless and rejected before server start.","triggerScenarios":"Launching with --asr-max-buffer-seconds 0 or a negative value while ASR/transcription features are configured.","commonSituations":"Trying to disable buffering by setting 0; typos or unit confusion (passing milliseconds where seconds expected).","solutions":["Set a positive value, e.g. --asr-max-buffer-seconds 5.0","If you meant minimal latency, use a small positive buffer like 0.5"],"exampleFix":"# before\n--asr-max-buffer-seconds 0\n# after\n--asr-max-buffer-seconds 5.0","handlingStrategy":"validation","validationCode":"if args.asr_max_buffer_seconds is not None:\n    assert args.asr_max_buffer_seconds > 0, 'asr_max_buffer_seconds must be > 0'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat 0 as invalid for buffer/capacity knobs; there is usually no 'off' value","Centralize CLI arg validation in a prelaunch check function"],"tags":["sglang","asr","transcription","server-args","validation"],"backgroundTag":"config-value-out-of-range","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}