vllm-project/vllm · error · Error
chat template is required but none was configured
Error message
chat template is required but none was configured
What it means
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.
Source
Thrown at rust/src/chat/src/error.rs:16
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright contributors to the vLLM project
use thiserror::Error;
use thiserror_ext::{AsReport as _, Macro};
type BoxedError = Box<dyn std::error::Error + Send + Sync>;
#[derive(Debug, Error, Macro)]
#[thiserror_ext(macro(path = "crate::error"))]
pub enum Error {
#[error("chat request must contain at least one message")]
EmptyMessages,
#[error("cannot continue the final message when the last message is not from the assistant")]
ContinueFinalAssistantWithoutFinalAssistant,
#[error("chat template is required but none was configured")]
MissingChatTemplate,
#[error("chat template error: {0}")]
ChatTemplate(String),
#[error("multimodal input is not supported by this chat renderer")]
UnsupportedMultimodalRenderer,
#[error("unsupported multimodal content: {0}")]
UnsupportedMultimodalContent(&'static str),
#[error("`{modality}` input is not supported by this model")]
UnsupportedModality { modality: String },
#[error("At most {limit} {modality}(s) may be provided in one prompt.")]
MmLimitExceeded { modality: String, limit: usize },
#[error("multimodal preprocessing error: {0}")]
Multimodal(#[message] String),
#[error("{kind} parsing is not available for model `{model_id}`")]
ParserUnavailableForModel {
kind: &'static str,
model_id: String,
},View on GitHub (pinned to c794754062)
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
Defensive patterns
Strategy: try-catch
Try / catch
try:
eplb_comm = _create_pynccl()
except RuntimeError as e:
if 'Failed to initialize PyNcclEplbCommunicator' in str(e):
log.error('underlying cause: %r', e.__cause__)
raise Prevention
- 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
When it happens
Trigger: 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).
Common situations: Constructing the EPLB communicator before distributed groups are fully initialized; CUDA context on a different device than the pynccl comm was created with.
Related errors
- Configuration error: {0}
- Image generation should not fail
- chat request must contain at least one message
- cannot continue the final message when the last message is n
- `{modality}` input is not supported by this model
AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14).
Data as JSON: /api/errors/d3b0964be0b59654.
Report an issue: GitHub.