{"record":{"id":"a7dba00c830948a7","repo":"vllm-project/vllm","slug":"chat-request-must-contain-at-least-one-message","errorCode":null,"errorMessage":"chat request must contain at least one message","messagePattern":"chat request must contain at least one message","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"rust/src/chat/src/error.rs","lineNumber":12,"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}`\")]","sourceCodeStart":1,"sourceCodeEnd":30,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/rust/src/chat/src/error.rs#L1-L30","documentation":"PyNCCL EPLB transfers require every expert-weight dtype to be mappable to an ncclDataType. At least one dtype in the first MoE layer (listed in the message) is not supported by NCCL collectives, e.g. int8 metadata tensors or exotic quantized dtypes.","triggerScenarios":"Constructing the pynccl EPLB communicator over expert weights that include tensors with dtypes NCCL cannot express (some 8-bit/4-bit quantized types, or non-standard packed types).","commonSituations":"Heavily quantized MoE checkpoints where scale/zero-point tensors ride alongside weights in the same list; new quant formats not yet wired into ncclDataTypeEnum.supports_torch_dtype.","solutions":["Check the dtype list in the error message and separate non-transferable metadata tensors out of expert_weights","Use BF16/FP16/FP8 expert weights, which NCCL supports, when using the pynccl backend","Switch to the 'nixl' backend, which transfers raw bytes and is dtype-agnostic"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from vllm.distributed.device_communicators.pynccl_wrapper import ncclDataTypeEnum\nbad = [str(t.dtype) for layer in expert_weights[:1] for t in layer if not ncclDataTypeEnum.supports_torch_dtype(t.dtype)]\nassert not bad, f'pynccl cannot transfer dtypes: {bad}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep expert weight tensors to NCCL-representable dtypes (bf16/fp16/fp8/fp32) for pynccl","Exclude metadata/scale tensors from the weight lists passed to the communicator","Prefer the nixl backend for exotic quantized layouts (byte-level transfers)"],"tags":["eplb","pynccl","dtype","quantization","vllm"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}