@@ -180,10 +180,13 @@ async def chat_completions_impl(request: ChatCompletionRequest, raw_request: Req
180180 from .api_http import g_objs
181181
182182 if request .logit_bias is not None :
183- logger .debug ("Received unsupported parameter 'logit_bias', ignoring" )
183+ return create_error_response (
184+ HTTPStatus .BAD_REQUEST ,
185+ "The logit_bias parameter is not currently supported" ,
186+ )
184187
185188 if request .function_call != "none" :
186- logger . debug ( "Received unsupported parameter 'function_call', ignoring " )
189+ return create_error_response ( HTTPStatus . BAD_REQUEST , "The function call feature is not supported " )
187190
188191 created_time = int (time .time ())
189192
@@ -604,7 +607,10 @@ async def completions_impl(request: CompletionRequest, raw_request: Request) ->
604607 from .api_http import g_objs
605608
606609 if request .logit_bias is not None :
607- logger .debug ("Received unsupported parameter 'logit_bias', ignoring" )
610+ return create_error_response (
611+ HTTPStatus .BAD_REQUEST ,
612+ "The logit_bias parameter is not currently supported" ,
613+ )
608614
609615 created_time = int (time .time ())
610616
@@ -632,7 +638,10 @@ async def completions_impl(request: CompletionRequest, raw_request: Request) ->
632638
633639 # Handle suffix for completion mode
634640 if request .suffix :
635- logger .debug ("Received unsupported parameter 'suffix', ignoring" )
641+ return create_error_response (
642+ HTTPStatus .BAD_REQUEST ,
643+ "The suffix parameter is not currently supported" ,
644+ )
636645
637646 # Prepare sampling parameters - same as g_generate_stream_func pattern
638647 sampling_params_dict = {
0 commit comments