From 0601850791155003afbe5a0d5d086350cada8deb Mon Sep 17 00:00:00 2001 From: Rafli Surya Wijaya <260355617@qq.com> Date: Sun, 2 Aug 2026 13:50:40 +0800 Subject: [PATCH] [Bugfix][Models] Accept Qwen3_5MoeTextConfig in Qwen3_5MoeProcessingInfo for transformers 5.x compatibility (#50704) Signed-off-by: loulanyue Co-authored-by: loulanyue --- vllm/model_executor/models/qwen3_5.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vllm/model_executor/models/qwen3_5.py b/vllm/model_executor/models/qwen3_5.py index de18e36ca1..50b47f16fe 100644 --- a/vllm/model_executor/models/qwen3_5.py +++ b/vllm/model_executor/models/qwen3_5.py @@ -108,7 +108,11 @@ class Qwen3_5ProcessingInfo(Qwen3VLProcessingInfo): class Qwen3_5MoeProcessingInfo(Qwen3VLProcessingInfo): def get_hf_config(self): - return self.ctx.get_hf_config(Qwen3_5MoeConfig) + # transformers 5.x renames the top-level Qwen3.5-MoE config class to + # Qwen3_5MoeTextConfig for text-only models, while transformers ≤4.x + # returns Qwen3_5MoeConfig (the multimodal wrapper). Accept both so + # that vLLM works regardless of which transformers version is installed. + return self.ctx.get_hf_config((Qwen3_5MoeConfig, Qwen3_5MoeTextConfig)) class Qwen3_5DecoderLayer(Qwen3NextDecoderLayer):