[CI Bug] Fix `pydantic_core._pydantic_core.ValidationError: Input should be a valid integer` (#51179)

Signed-off-by: yewentao256 <zhyanwentao@126.com>

Wentao Ye committed Aug 5, 2026 at 16:57 UTC e76b71f659859f1793ab730e798eb4b4236bce1f
1 file changed +4 -1
vllm/transformers_utils/model_arch_config_convertor.py
+4 -1
@@ -172,7 +172,10 @@ class ModelArchConfigConvertorBase:
172 "moe_topk",
173 "moe_top_k",
174 ]
175 - return getattr_iter(self.hf_text_config, names, 0) or 0
175 + num_experts_per_token = getattr_iter(self.hf_text_config, names, 0)
176 + if isinstance(num_experts_per_token, list):
177 + return max(num_experts_per_token, default=0)
178 + return num_experts_per_token or 0
179
180 @final
181 @classmethod