{"record":{"id":"7598155dc03f1a6a","repo":"vllm-project/vllm","slug":"name-only-provides-a-unified-parser-the-same-759815","errorCode":null,"errorMessage":"`{name}` only provides a unified parser; the same reasoning parser and tool parser should be specified together","messagePattern":"`(.+?)` only provides a unified parser; the same reasoning parser and tool parser should be specified together","errorType":"exception","errorClass":"ToolParserError","httpStatus":null,"severity":"error","filePath":"rust/src/parser/src/tool/error.rs","lineNumber":16,"sourceCode":"// SPDX-License-Identifier: Apache-2.0\n// SPDX-FileCopyrightText: Copyright contributors to the vLLM project\n\nuse thiserror::Error;\nuse thiserror_ext::Macro;\n\n/// Result alias for tool parser operations.\npub type Result<T> = std::result::Result<T, ToolParserError>;\n\n/// Errors produced while creating or running tool parsers.\n#[derive(Debug, Error, Macro)]\n#[thiserror_ext(macro(path = \"crate::tool::error\"))]\npub enum ToolParserError {\n    #[error(\"tool parser parsing failed: {message}\")]\n    ParsingFailed { message: String },\n    #[error(\n        \"`{name}` only provides a unified parser; the same reasoning parser and tool parser should be specified together\"\n    )]\n    DummyUnifiedParser { name: String },\n}\n","sourceCodeStart":1,"sourceCodeEnd":21,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/rust/src/parser/src/tool/error.rs#L1-L21","documentation":"ToolParserError::DummyUnifiedParser mirrors the reasoning-side variant: it is returned when trying to build a standalone (split) tool parser from a family that only provides a unified parser. Unified families must be constructed as one combined reasoning+tool parser, never as separate halves.","triggerScenarios":"Calling the tool-parser factory with a unified-only family name — i.e. enabling tool parsing without also enabling the matching reasoning parser from the same family.","commonSituations":"Configuring --tool-parser granite without --reasoning-parser granite; code iterating over available tool parsers and instantiating each; config migrations from split-parser setups.","solutions":["Enable both parsers of the same family so the unified parser path is taken","Pick a family with a genuine split tool parser if you need tool parsing alone","Guard programmatic enumeration against unified-only families"],"exampleFix":"# before\n--tool-parser granite\n\n# after\n--reasoning-parser granite --tool-parser granite","handlingStrategy":"validation","validationCode":"let unified_only = matches!(name.as_str(), \"granite\");\nif unified_only && reasoning_parser_name != name {\n    return Err(anyhow::anyhow!(\"{name} requires --reasoning-parser {name} too\"));\n}","typeGuard":"fn is_dummy_unified_tool(e: &ToolParserError) -> bool {\n    matches!(e, ToolParserError::DummyUnifiedParser { .. })\n}","tryCatchPattern":"match build_tool_parser(name, tokenizer) {\n    Err(ToolParserError::DummyUnifiedParser { name }) => {\n        eprintln!(\"{name} is unified-only; set both --reasoning-parser and --tool-parser to {name}\");\n        std::process::exit(2);\n    }\n    r => r,\n}","preventionTips":["Configure both parser roles together for unified families","Validate parser pairing at config load, before any request traffic","Keep a registry flag marking unified-only families and check it in tooling"],"tags":["tool-parser","unified-parser","configuration","rust"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}