[Refactor] Keep chat template validation out of ServerArgs dispatcher (#33392)

Co-authored-by: Alex Nails <alex.nails@radixark.ai>
This commit is contained in:
Xinyuan Tong
2026-08-04 14:45:47 -07:00
committed by GitHub
co-authored by Alex Nails
parent e510dc58ba
commit a9c3b55435
+6 -7
View File
@@ -3476,13 +3476,6 @@ class ServerArgs:
# Validate transcription/ASR-specific server args. # Validate transcription/ASR-specific server args.
self._handle_asr_validation() self._handle_asr_validation()
if self.default_chat_template_kwargs is not None and not isinstance(
self.default_chat_template_kwargs, dict
):
raise ValueError(
"--default-chat-template-kwargs must decode to a JSON object"
)
# Handle deprecated arguments. # Handle deprecated arguments.
self._handle_deprecated_args() self._handle_deprecated_args()
@@ -8091,6 +8084,12 @@ class ServerArgs:
) )
def _handle_other_validations(self): def _handle_other_validations(self):
if self.default_chat_template_kwargs is not None and not isinstance(
self.default_chat_template_kwargs, dict
):
raise ValueError(
"--default-chat-template-kwargs must decode to a JSON object"
)
# Handle optimistic prefill validation # Handle optimistic prefill validation
if ( if (