Skip to content

Commit f4156b2

Browse files
committed
Update mock_server.py
1 parent 7966d27 commit f4156b2

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tests/mock_server.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff 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
)

0 commit comments

Comments
 (0)