Skip to content

Commit 820b353

Browse files
committed
enable_thinking and assistant prefill cannot be enabled at the same time
1 parent ba2704a commit 820b353

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
@@ -749,6 +749,10 @@ static json oaicompat_completion_params_parse(
749749
throw std::runtime_error("Cannot have 2 or more assistant messages at the end of the list.");
750750
}
751751

752+
if(inputs.chat_template_kwargs.find("enable_thinking") != inputs.chat_template_kwargs.end()) {
753+
throw std::runtime_error("Assistant response prefill is incompatible with enable_thinking.");
754+
}
755+
752756
inputs.extract_reasoning = false;
753757
inputs.add_generation_prompt = true;
754758
}

0 commit comments

Comments
 (0)