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 15, 04:45 UTC
[Frontend] early return chat format resolution when specified (#19735)
xzbdmw committed
Jun 20, 2025 at 02:49 UTC
ea10dd9d9e00a88705a6203ad3318a367f6c372e
1 file changed
+4
-1
vllm/entrypoints/chat_utils.py
+4
-1
@@ -448,6 +448,9 @@ def resolve_chat_template_content_format(
448
model_config: ModelConfig,
449
trust_remote_code: Optional[bool] = None,
450
) -> _ChatTemplateContentFormat:
451
+ if given_format != "auto":
452
+ return given_format
453
+
454
detected_format = _resolve_chat_template_content_format(
455
chat_template,
456
tools,
@@ -461,7 +464,7 @@ def resolve_chat_template_content_format(
464
detected_format=detected_format,
465
)
466
464
- return detected_format if given_format == "auto" else given_format
467
+ return detected_format
468
469
470