common : fix gpt-oss Jinja error when assistant message has both content and thinking with tool calls (#19704)

This commit is contained in:
abhijitb11 2026-02-19 12:59:20 -08:00 committed by GitHub
parent 11c325c6e0
commit 39e4b1dc9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -2043,6 +2043,7 @@ static common_chat_params common_chat_params_init_gpt_oss(const common_chat_temp
if (has_reasoning_content && has_tool_calls) {
auto adjusted_message = msg;
adjusted_message["thinking"] = msg.at("reasoning_content");
adjusted_message.erase("content");
adjusted_messages.push_back(adjusted_message);
} else {
adjusted_messages.push_back(msg);