{"record":{"id":"8a0312497381d811","repo":"vllm-project/vllm","slug":"chat-template-error-0","errorCode":null,"errorMessage":"chat template error: {0}","messagePattern":"chat template error: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"rust/src/chat/src/error.rs","lineNumber":18,"sourceCode":"// SPDX-License-Identifier: Apache-2.0\n// SPDX-FileCopyrightText: Copyright contributors to the vLLM project\n\nuse thiserror::Error;\nuse thiserror_ext::{AsReport as _, Macro};\n\ntype BoxedError = Box<dyn std::error::Error + Send + Sync>;\n\n#[derive(Debug, Error, Macro)]\n#[thiserror_ext(macro(path = \"crate::error\"))]\npub enum Error {\n    #[error(\"chat request must contain at least one message\")]\n    EmptyMessages,\n    #[error(\"cannot continue the final message when the last message is not from the assistant\")]\n    ContinueFinalAssistantWithoutFinalAssistant,\n    #[error(\"chat template is required but none was configured\")]\n    MissingChatTemplate,\n    #[error(\"chat template error: {0}\")]\n    ChatTemplate(String),\n    #[error(\"multimodal input is not supported by this chat renderer\")]\n    UnsupportedMultimodalRenderer,\n    #[error(\"unsupported multimodal content: {0}\")]\n    UnsupportedMultimodalContent(&'static str),\n    #[error(\"`{modality}` input is not supported by this model\")]\n    UnsupportedModality { modality: String },\n    #[error(\"At most {limit} {modality}(s) may be provided in one prompt.\")]\n    MmLimitExceeded { modality: String, limit: usize },\n    #[error(\"multimodal preprocessing error: {0}\")]\n    Multimodal(#[message] String),\n    #[error(\"{kind} parsing is not available for model `{model_id}`\")]\n    ParserUnavailableForModel {\n        kind: &'static str,\n        model_id: String,\n    },\n    #[error(\"{kind} parsing is disabled by frontend configuration\")]\n    ParserDisabled { kind: &'static str },","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/rust/src/chat/src/error.rs#L1-L36","documentation":"For stateless elastic EP (StatelessGroupCoordinator), only the torch_nccl, pynccl, and nixl backends are implemented; torch_gloo and others rely on process-group state that stateless ranks do not share. The requested backend string is not in that set.","triggerScenarios":"Passing backend='torch_gloo' (or any other string) to the EPLB communicator factory while running under a StatelessGroupCoordinator, i.e. stateless/multi-process elastic EP mode.","commonSituations":"Copying a stateful EPLB configuration (which allows torch_gloo) into a stateless elastic EP deployment; custom orchestration code hardcoding a backend name.","solutions":["Use 'torch_nccl', 'pynccl', or 'nixl' for stateless elastic EP (torch_nccl is transparently forced to pynccl anyway)","If you truly need gloo, run the non-stateless EPLB path instead of StatelessGroupCoordinator"],"exampleFix":"# before\nbackend = \"torch_gloo\"  # stateless coordinator\n\n# after\nbackend = \"pynccl\"","handlingStrategy":"validation","validationCode":"from vllm.distributed.parallel_state import StatelessGroupCoordinator\nif isinstance(group_coordinator, StatelessGroupCoordinator):\n    assert backend in ('torch_nccl', 'pynccl', 'nixl'), 'stateless EP supports only these backends'","typeGuard":"def stateless_safe_backend(backend: str) -> bool:\n    return backend in ('torch_nccl', 'pynccl', 'nixl')","tryCatchPattern":null,"preventionTips":["Do not reuse stateful EPLB configs verbatim for stateless elastic deployments","Centralize backend selection logic in one helper that knows the coordinator type"],"tags":["eplb","elastic-ep","stateless","backend-selection","vllm"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}