{"record":{"id":"d3b0964be0b59654","repo":"vllm-project/vllm","slug":"chat-template-is-required-but-none-was-configured","errorCode":null,"errorMessage":"chat template is required but none was configured","messagePattern":"chat template is required but none was configured","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"rust/src/chat/src/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::{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    },","sourceCodeStart":1,"sourceCodeEnd":34,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/rust/src/chat/src/error.rs#L1-L34","documentation":"The PyNcclEplbCommunicator constructor raised {exc}; the factory wraps it with this message and chains the original exception. Common underlying causes are stream mismatches, missing communicator state, or invalid group handles inside the PyNCCL wrapper.","triggerScenarios":"Any exception while PyNcclEplbCommunicator binds to the passed pynccl_comm (e.g. its group has not been initialized, wrong device context, or a CUDA error during setup).","commonSituations":"Constructing the EPLB communicator before distributed groups are fully initialized; CUDA context on a different device than the pynccl comm was created with.","solutions":["Read the chained cause ({exc} plus the full traceback) to identify the actual failing operation","Ensure torch.distributed and device groups are initialized and the correct device is set before creating the EPLB communicator","If the cause is environmental (CUDA error), fix that first — this wrapper only re-raises"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    eplb_comm = _create_pynccl()\nexcept RuntimeError as e:\n    if 'Failed to initialize PyNcclEplbCommunicator' in str(e):\n        log.error('underlying cause: %r', e.__cause__)\n    raise","preventionTips":["Initialize distributed groups and set the correct CUDA device before creating EPLB communicators","Always inspect __cause__ on wrapped init errors instead of the wrapper message alone"],"tags":["eplb","pynccl","initialization","vllm"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}