Skip to content

Commit 5267aea

Browse files
committed
set thinking field for tool use
1 parent 95fed4e commit 5267aea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

common/chat.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ json common_chat_msgs_to_json_oaicompat(const std::vector<common_chat_msg> & msg
297297
}
298298
if (!msg.reasoning_content.empty()) {
299299
jmsg["reasoning_content"] = msg.reasoning_content;
300+
301+
// gpt-oss requires the thinking field for tool calls
302+
jmsg["thinking"] = msg.reasoning_content;
300303
}
301304
if (!msg.tool_name.empty()) {
302305
jmsg["name"] = msg.tool_name;

0 commit comments

Comments
 (0)