File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -424,17 +424,6 @@ async def generate(
424424 },
425425 )
426426
427- if params .enable_thinking :
428- for msg in messages :
429- if msg .get ("partial" ):
430- return JSONResponse (
431- status_code = 400 ,
432- content = {
433- "code" : "InvalidParameter" ,
434- "message" : "<400> InternalError.Algo.InvalidParameter: Partial mode is not supported when enable_thinking is true" ,
435- },
436- )
437-
438427 # Stop parameter extraction
439428 proxy_stop_list : List [str ] = []
440429 if params .stop :
@@ -457,6 +446,17 @@ async def generate(
457446 target_model = self ._get_mapped_model (req_data .model )
458447 messages = self ._convert_input_to_messages (req_data .input )
459448
449+ if params .enable_thinking :
450+ for msg in messages :
451+ if msg .get ("partial" ):
452+ return JSONResponse (
453+ status_code = 400 ,
454+ content = {
455+ "code" : "InvalidParameter" ,
456+ "message" : "<400> InternalError.Algo.InvalidParameter: Partial mode is not supported when enable_thinking is true" ,
457+ },
458+ )
459+
460460 should_stream = (
461461 params .incremental_output or params .enable_thinking or force_stream
462462 )
You can’t perform that action at this time.
0 commit comments