fix: preserve reasoning_content in conversation history for thinking models

This commit is contained in:
Re-bin committed 2026-02-08 18:37:41 +00:00
1 parent b4217b2690
commit 2931694eb8
5 files changed
+16 -4

No files matched your search

+4 -2
View File
@@ -213,7 +213,8 @@ class AgentLoop:
for tc in response.tool_calls
]
messages = self.context.add_assistant_message(
messages, response.content, tool_call_dicts
messages, response.content, tool_call_dicts,
reasoning_content=response.reasoning_content,
)
# Execute tools
@@ -317,7 +318,8 @@ class AgentLoop:
for tc in response.tool_calls
]
messages = self.context.add_assistant_message(
messages, response.content, tool_call_dicts
messages, response.content, tool_call_dicts,
reasoning_content=response.reasoning_content,
)
for tool_call in response.tool_calls: