mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-08-13 02:16:18 +00:00
server: support "reasoning_effort": "none" in OAI API (#26045)
* support "reasoning_effort": "none" in OAI API * handle reasoning.effort: "none" in OAI responses API * clarify non-"none" values of reasoning_effort have no effect * use json_value instead of body.at
This commit is contained in:
parent
298219f985
commit
27209a598d
3 changed files with 19 additions and 0 deletions
|
|
@ -1086,6 +1086,14 @@ json oaicompat_chat_params_parse(
|
|||
throw std::invalid_argument("invalid type for \"enable_thinking\" (expected boolean, got string)");
|
||||
}
|
||||
|
||||
// Parse also the OAI "reasoning_effort": "none" specific value
|
||||
if (body.contains("reasoning_effort")) {
|
||||
auto reasoning_effort = json_value(body, "reasoning_effort", std::string(""));
|
||||
if (reasoning_effort == "none") {
|
||||
inputs.enable_thinking = false;
|
||||
} // other reasoning_effort values are model-specific and not yet handled
|
||||
}
|
||||
|
||||
inputs.force_pure_content = opt.force_pure_content;
|
||||
|
||||
// Apply chat template to the list of messages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue