[EC] Automatically enable embedding inputs on EC/KV consumers (#56379)
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
Tianyu Guo committed
Sep 11, 2026 at 12:53 UTC
e7edf17cea217e52701f913cd8491fcacf2d9490
1 file changed
+16
-6
vllm/config/vllm.py
+16
-6
@@ -1716,7 +1716,7 @@ class VllmConfig:
1716
)
1717
current_platform.check_and_update_config(self)
1718
1719
- self._resolve_allow_missing_mm_embeddings()
1719
+ self._resolve_mm_embedding_inputs()
1720
self._resolve_mm_processor_device()
1721
self._validate_mm_processor_device()
1722
@@ -2497,8 +2497,8 @@ class VllmConfig:
2497
f"kernel_config={self.kernel_config!r}"
2498
)
2499
2500
- def _resolve_allow_missing_mm_embeddings(self) -> None:
2501
- """Allow `*_embeds` tensors to be omitted on disaggregated consumers.
2500
+ def _resolve_mm_embedding_inputs(self) -> None:
2501
+ """Accept embedding inputs, tensor optional, on disaggregated consumers.
2502
2503
An EC consumer loads embeddings from its connector. A KV consumer
2504
receives the prompt KV produced from those embeddings, so it does not
@@ -2519,11 +2519,21 @@ class VllmConfig:
2519
mm_config.allow_missing_mm_embeddings = (
2520
ec_config is not None and ec_config.is_ec_consumer
2521
) or (kv_config is not None and kv_config.is_kv_consumer)
2522
- if mm_config.allow_missing_mm_embeddings:
2522
+ if not mm_config.allow_missing_mm_embeddings:
2523
+ return
2524
+
2525
+ if not mm_config.enable_mm_embeds:
2526
+ # Allowing missing tensors still requires enabling embedding inputs
2527
+ # for the frontend to accept metadata-only requests.
2528
+ mm_config.enable_mm_embeds = True
2529
logger.info_once(
2524
- "EC/KV consumer: pre-computed-embedding inputs may "
2525
- "omit the embedding tensor."
2530
+ "EC/KV consumer: accepting pre-computed-embedding inputs, "
2531
+ "which this role is sent by definition."
2532
)
2533
+ logger.info_once(
2534
+ "EC/KV consumer: pre-computed-embedding inputs may "
2535
+ "omit the embedding tensor."
2536
+ )
2537
2538
def _resolve_mm_encoder_only(self) -> None:
2539
"""Enable encoder-only mode for a dedicated EC producer."""