Skip to content

Commit a056e53

Browse files
committed
fix prefill for non thinking models
1 parent 4e1c329 commit a056e53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/server/utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ static json oaicompat_chat_params_parse(
772772
/* TODO: test this properly */
773773
inputs.reasoning_format = COMMON_REASONING_FORMAT_NONE;
774774

775-
if (inputs.enable_thinking || inputs.chat_template_kwargs.find("enable_thinking") != inputs.chat_template_kwargs.end()) {
775+
if ( (!inputs.enable_thinking) || inputs.chat_template_kwargs.find("enable_thinking") != inputs.chat_template_kwargs.end()) {
776776
throw std::runtime_error("Assistant response prefill is incompatible with enable_thinking.");
777777
}
778778

0 commit comments

Comments
 (0)