diff --git a/python/sglang/srt/configs/model_config.py b/python/sglang/srt/configs/model_config.py index 1afb405c2..2d8def57d 100644 --- a/python/sglang/srt/configs/model_config.py +++ b/python/sglang/srt/configs/model_config.py @@ -460,13 +460,17 @@ class ModelConfig: self.is_audio_model = enable_multimodal and is_audio_model( self.hf_config.architectures ) - # TODO: requires further polishing + # Gated on `is_multimodal` because this flag is advertised via /model_info + # and drives the VLM warmup request, while the OpenAI serving layer rejects + # media input for models that are not `is_multimodal`. A text-only model + # with an auto-populated `vision_config` (see above) would otherwise warm up + # with an image request that its own serving layer answers with 400. # Key on the tower, not the attribute: several config classes default # vision_config to None, which presence alone would read as image-capable # (MuseGlimmerConfig's text-only layouts are one such case). + # TODO: requires further polishing self.is_image_understandable_model = ( - enable_multimodal - and not self.is_lm_only + self.is_multimodal and getattr(self.hf_config, "vision_config", None) is not None )