Skip to content

Commit 3a519a1

Browse files
committed
enable_thinking and assistant prefill cannot be enabled at the same time
1 parent 87653b6 commit 3a519a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/server/utils.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,10 @@ static json oaicompat_chat_params_parse(
780780
throw std::runtime_error("Cannot have 2 or more assistant messages at the end of the list.");
781781
}
782782

783+
if(inputs.chat_template_kwargs.find("enable_thinking") != inputs.chat_template_kwargs.end()) {
784+
throw std::runtime_error("Assistant response prefill is incompatible with enable_thinking.");
785+
}
786+
783787
inputs.extract_reasoning = false;
784788
inputs.add_generation_prompt = true;
785789
}

0 commit comments

Comments
 (0)