[Frontend] Migrate input-validation errors to VLLMValidationError (harmony/mistral/chat_utils/params) (#55735)
Signed-off-by: shaolila <shaolila@buaa.edu.cn> Co-authored-by: shaolila <shaolila@buaa.edu.cn>
This commit is contained in:
@@ -29,6 +29,7 @@ from vllm.entrypoints.openai.chat_completion.protocol import ChatCompletionReque
|
||||
from vllm.entrypoints.openai.responses.protocol import ResponsesRequest
|
||||
from vllm.entrypoints.openai.responses.serving import OpenAIServingResponses
|
||||
from vllm.entrypoints.serve.engine.protocol import ErrorResponse
|
||||
from vllm.exceptions import VLLMValidationError
|
||||
from vllm.inputs import tokens_input
|
||||
from vllm.renderers.online_renderer import OnlineRenderer
|
||||
from vllm.renderers.params import ChatParams
|
||||
@@ -427,6 +428,19 @@ class TestReasoningRenderParity:
|
||||
},
|
||||
)
|
||||
|
||||
async def test_reasoning_effort_none_rejected_by_harmony(self, online_renderer):
|
||||
"""Harmony rejects reasoning_effort="none" as invalid user input."""
|
||||
request = ChatCompletionRequest(
|
||||
model=_MODEL,
|
||||
messages=_USER,
|
||||
reasoning_effort="none",
|
||||
)
|
||||
with pytest.raises(
|
||||
VLLMValidationError, match="Harmony does not support"
|
||||
) as exc_info:
|
||||
online_renderer._make_request_with_harmony(request)
|
||||
assert exc_info.value.parameter == "reasoning_effort"
|
||||
|
||||
async def test_explicit_enable_thinking_not_overridden(
|
||||
self, online_renderer, serving_responses
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user