diff --git a/vllm/entrypoints/openai/responses/serving.py b/vllm/entrypoints/openai/responses/serving.py index 09c902008a48..960c69b376fb 100644 --- a/vllm/entrypoints/openai/responses/serving.py +++ b/vllm/entrypoints/openai/responses/serving.py @@ -792,9 +792,10 @@ def _make_request_with_harmony( ): has_unsupported_tool_choice = request.tool_choice not in ("auto", "none") if has_unsupported_tool_choice and not is_required_function_call: - raise NotImplementedError( + raise VLLMValidationError( "Only 'auto', 'none', or 'required' (with function tools) " - "tool_choice is supported in response API with Harmony" + "tool_choice is supported in response API with Harmony", + parameter="tool_choice", ) arrival_time = time.time()