@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 2c06cf3486
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 4, 15:00 UTC

[Bugfix] use `served_model_name` for multimodal error message (#41003)

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

Moritz Sanft committed Apr 27, 2026 at 17:22 UTC 2c06cf3486a67efcbdf265b8a183f9ed836cebb7
2 files changed +18 -1
tests/multimodal/test_registry.py
+16
@@ -5,6 +5,8 @@ Unit tests for MultiModalRegistry.supports_multimodal_inputs and
5 Qwen2.5-VL visual component loading behavior.
6 """
7
8 +from types import SimpleNamespace
9 +
10 import pytest
11
12 from vllm.multimodal import MULTIMODAL_REGISTRY
@@ -32,3 +34,17 @@ def test_supports_multimodal_inputs(model_id, limit_mm_per_prompt, expected):
34 limit_mm_per_prompt=limit_mm_per_prompt,
35 )
36 assert MULTIMODAL_REGISTRY.supports_multimodal_inputs(ctx.model_config) is expected
37 +
38 +
39 +def test_create_processor_error_uses_served_model_name():
40 + model_config = SimpleNamespace(
41 + is_multimodal_model=False,
42 + model="/path/to/model/weights",
43 + served_model_name="friendly-model-name",
44 + )
45 +
46 + with pytest.raises(
47 + ValueError,
48 + match="friendly-model-name is not a multimodal model",
49 + ):
50 + MULTIMODAL_REGISTRY.create_processor(model_config)
vllm/multimodal/registry.py
+2 -1
@@ -207,7 +207,8 @@ class MultiModalRegistry:
207 Create a multi-modal processor for a specific model and tokenizer.
208 """
209 if not model_config.is_multimodal_model:
210 - raise ValueError(f"{model_config.model} is not a multimodal model")
210 + model_name = model_config.served_model_name or model_config.model
211 + raise ValueError(f"{model_name} is not a multimodal model")
212
213 model_cls = self._get_model_cls(model_config)
214 factories = model_cls._processor_factory