[Bugfix][Frontend] Raise VLLMValidationError for user-facing errors in chat_utils.py (#50491)
Signed-off-by: latent-9 <296084221+latent-9@users.noreply.github.com> Co-authored-by: latent-9 <296084221+latent-9@users.noreply.github.com>
This commit is contained in:
@@ -316,7 +316,7 @@ _PLACEHOLDER_ERROR_PATTERN: Final[str] = re.sub(
|
||||
def test_parse_chat_messages_rejects_placeholder_in_user_text(content):
|
||||
mc = _make_mock_model_config() # enable_prompt_embeds=True by default
|
||||
messages = [{"role": "user", "content": content}]
|
||||
with pytest.raises(ValueError, match=_PLACEHOLDER_ERROR_PATTERN):
|
||||
with pytest.raises(VLLMValidationError, match=_PLACEHOLDER_ERROR_PATTERN):
|
||||
parse_chat_messages(messages, mc, content_format="openai")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user