From 1c78f76c29a642379ad0ec953a77af9bc44376b6 Mon Sep 17 00:00:00 2001 From: anish <145943060+anishesg@users.noreply.github.com> Date: Thu, 21 May 2026 11:07:46 -0400 Subject: [PATCH] [Bugfix] Add early validation to reject incompatible runner types for embedding models (#43079) Signed-off-by: anish Signed-off-by: Your Name Signed-off-by: anish <145943060+anishesg@users.noreply.github.com> Co-authored-by: anish Co-authored-by: Claude Opus 4.6 Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com> --- vllm/config/model.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vllm/config/model.py b/vllm/config/model.py index 9413810674..6db60cee50 100644 --- a/vllm/config/model.py +++ b/vllm/config/model.py @@ -584,6 +584,15 @@ class ModelConfig: architectures, self.runner_type, self.convert ) + if ( + is_pooling_model + and not is_generative_model + and self.runner_type in ("draft", "generate") + ): + raise ValueError( + f"Embedding models do not support `--runner {self.runner_type}`. " + "Use `--runner pooling` or `--runner auto` for embedding models." + ) if self.runner_type == "generate" and not is_generative_model: generate_converts = _RUNNER_CONVERTS["generate"] if self.convert_type not in generate_converts: