From 8b3e94a3575a0f36fe22b55d2a584b411e3b83f1 Mon Sep 17 00:00:00 2001 From: Brayden Zhong Date: Wed, 19 Mar 2025 01:09:32 -0400 Subject: [PATCH] [Model] Remove duplicated message check in Mistral chat completion request (#15069) Signed-off-by: Brayden Zhong --- vllm/transformers_utils/tokenizers/mistral.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/vllm/transformers_utils/tokenizers/mistral.py b/vllm/transformers_utils/tokenizers/mistral.py index 40a5777f..2d036e2c 100644 --- a/vllm/transformers_utils/tokenizers/mistral.py +++ b/vllm/transformers_utils/tokenizers/mistral.py @@ -143,10 +143,6 @@ def make_mistral_chat_completion_request( if last_message["role"] == "assistant": last_message["prefix"] = True - last_message = cast(Dict[str, Any], messages[-1]) - if last_message["role"] == "assistant": - last_message["prefix"] = True - # mistral-common requires AssistantMessage content to be string [1]. # # [1]: https://github.com/mistralai/mistral-common/blob/f4a06998b75ed78bbf5aaf569590b772ea26c9f6/src/mistral_common/protocol/instruct/messages.py#L80