{"record":{"id":"a1bfbf03de40cbaf","repo":"sgl-project/sglang","slug":"model-config-parser-model-config-parser-r-is-inc","errorCode":null,"errorMessage":"model_config_parser={model_config_parser!r} is incompatible with GGUF inputs; only 'hf' (or 'auto') is supported.","messagePattern":"model_config_parser=(.+?) is incompatible with GGUF inputs; only 'hf' \\(or 'auto'\\) is supported\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/utils/hf_transformers/config.py","lineNumber":232,"sourceCode":"        return load_mistral_config(\n            model, trust_remote_code=trust_remote_code, revision=revision\n        )\n\n\n@lru_cache_frozenset(maxsize=32)\ndef get_config(\n    model: str,\n    trust_remote_code: bool,\n    revision: Optional[str] = None,\n    model_override_args: Optional[dict] = None,\n    model_config_parser: str = \"auto\",\n    **kwargs,\n):\n    is_gguf = check_gguf_file(model)\n    gguf_has_sidecar_config = False\n    if is_gguf:\n        if model_config_parser not in (\"auto\", \"hf\"):\n            raise ValueError(\n                f\"model_config_parser={model_config_parser!r} is incompatible \"\n                \"with GGUF inputs; only 'hf' (or 'auto') is supported.\"\n            )\n        _ensure_gguf_version()\n        gguf_has_sidecar_config = gguf_sidecar_dir(model, \"config.json\") is not None\n        if not gguf_has_sidecar_config and has_native_gguf_support(model):\n            config = build_gguf_config(model)\n            if model_override_args:\n                config.update(model_override_args)\n            return config\n        if not gguf_has_sidecar_config:\n            kwargs[\"gguf_file\"] = model\n        model = Path(model).parent\n        # Skip auto-resolution for GGUF: the name-based Mistral heuristic\n        # would misfire on the rewritten parent dir.\n        model_config_parser = \"hf\"\n\n    model = resolve_runai_obj_uri(model)","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/utils/hf_transformers/config.py#L214-L250","documentation":"get_config rejects GGUF model inputs when model_config_parser is set to anything other than 'auto' or 'hf', because GGUF configs can only be parsed via the HF/transformers path (or a sidecar config.json).","triggerScenarios":"Launching with a .gguf model path plus --model-config-parser mistral (or any non-hf value).","commonSituations":"Users carry over mistral-config flags from Mistral-format models to GGUF-quantized HF models, or set the parser globally in a wrapper script.","solutions":["Drop --model-config-parser or set it to hf/auto for GGUF models","If you meant to serve a Mistral-format model, point --model at the mistral model, not a GGUF repo"],"exampleFix":"# before\n--model repo/model-Q4_K_M.gguf --model-config-parser mistral\n# after\n--model repo/model-Q4_K_M.gguf --model-config-parser hf","handlingStrategy":"validation","validationCode":"if model.endswith('.gguf') or '::' in model:\n    assert model_config_parser in ('auto', 'hf')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never combine GGUF models with --model-config-parser mistral"],"tags":["gguf","config","server-args"],"backgroundTag":"incompatible-config-option","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}