Skip to content

Commit ea10dd9

Browse files
authored
[Frontend] early return chat format resolution when specified (#19735)
1 parent ead2110 commit ea10dd9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vllm/entrypoints/chat_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,9 @@ def resolve_chat_template_content_format(
448448
model_config: ModelConfig,
449449
trust_remote_code: Optional[bool] = None,
450450
) -> _ChatTemplateContentFormat:
451+
if given_format != "auto":
452+
return given_format
453+
451454
detected_format = _resolve_chat_template_content_format(
452455
chat_template,
453456
tools,
@@ -461,7 +464,7 @@ def resolve_chat_template_content_format(
461464
detected_format=detected_format,
462465
)
463466

464-
return detected_format if given_format == "auto" else given_format
467+
return detected_format
465468

466469

467470

0 commit comments

Comments
 (0)