{"record":{"id":"0d6e9f6a4667f2a9","repo":"vllm-project/vllm","slug":"gpt-oss-uses-native-harmony-output-parsing-generi","errorCode":null,"errorMessage":"gpt_oss uses native Harmony output parsing; generic {kind} parser override `{selection}` is not supported","messagePattern":"gpt_oss uses native Harmony output parsing; generic (.+?) parser override `(.+?)` is not supported","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"rust/src/chat/src/error.rs","lineNumber":53,"sourceCode":"    #[error(\"{kind} parsing is disabled by frontend configuration\")]\n    ParserDisabled { kind: &'static str },\n    #[error(\n        \"{kind} parser `{name}` is not registered{}\",\n        available_parser_hint(.available_names)\n    )]\n    ParserUnavailableByName {\n        kind: &'static str,\n        name: String,\n        available_names: Vec<String>,\n    },\n    #[error(\"failed to initialize {kind} parser `{name}`\")]\n    ParserInitialization {\n        kind: &'static str,\n        name: String,\n        #[source]\n        error: BoxedError,\n    },\n    #[error(\n        \"gpt_oss uses native Harmony output parsing; generic {kind} parser override `{selection}` is not supported\"\n    )]\n    HarmonyParserOverrideUnsupported {\n        kind: &'static str,\n        selection: String,\n    },\n    #[error(\"harmony output parsing failed\")]\n    HarmonyOutputParsing {\n        #[source]\n        error: BoxedError,\n    },\n    #[error(\n        \"this model's maximum context length is {max_model_len} tokens, \\\n         but the prompt contains {prompt_len} input tokens\"\n    )]\n    PromptTooLong { max_model_len: u32, prompt_len: u32 },\n    #[error(\"chat request stream `{request_id}` closed before terminal output\")]\n    StreamClosedBeforeTerminalOutput { request_id: String },","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/rust/src/chat/src/error.rs#L35-L71","documentation":"vLLM's gpt-oss models parse their output natively through the Harmony format; this error is returned when a configuration explicitly overrides the generic parser selection for a gpt-oss model. The frontend detects model id `gpt-oss*` and rejects any `--tool-call-parser` / structured-output parser override because it would bypass Harmony.","triggerScenarios":"Launching the Rust frontend serving a gpt-oss model with an explicit generic parser selection set in the frontend config (e.g. `tool_call_parser = \"hermes\"`).","commonSituations":"Copy-pasting a server config built for Llama/Qwen models onto a gpt-oss deployment; upgrading vLLM where the override used to be silently ignored and is now rejected.","solutions":["Remove the parser override from the config for gpt-oss models and let Harmony parsing handle output.","If you truly need a generic parser, serve a non-gpt-oss model.","Check the model_id detection: only the actual gpt-oss model family takes this path, so verify which model the frontend resolved."],"exampleFix":"# before\nmodel = \"openai/gpt-oss-120b\"\ntool_call_parser = \"hermes\"\n\n# after\nmodel = \"openai/gpt-oss-120b\"\n# no tool_call_parser override: Harmony parsing is used natively","handlingStrategy":"validation","validationCode":"let is_gpt_oss = model_id.starts_with(\"gpt-oss\");\nif is_gpt_oss {\n    assert!(tool_call_parser_override.is_none(), \"gpt-oss uses native Harmony parsing; remove the parser override\");\n}","typeGuard":"fn forbids_parser_override(model_id: &str) -> bool {\n    model_id.starts_with(\"gpt-oss\")\n}","tryCatchPattern":"match result {\n    Err(e @ vllm_chat::Error::HarmonyParserOverrideUnsupported { .. }) => {\n        eprintln!(\"remove the parser override for gpt-oss models: {e}\");\n        std::process::exit(2);\n    }\n    other => other?,\n}","preventionTips":["Keep model-specific config in separate profiles so gpt-oss deployments never inherit generic parser settings.","Validate config against the resolved model_id before starting to serve."],"tags":["rust","gpt-oss","harmony","parser","configuration"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}