Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(subagent): preserve reasoning_content in assistant messages
lailoo2ffeb9295bdb
diff --git a/nanobot/agent/subagent.py b/nanobot/agent/subagent.pyindex f9eda1f8f..308e67d77 100644--- a/nanobot/agent/subagent.py+++ b/nanobot/agent/subagent.py@@ -145,11 +145,19 @@ class SubagentManager:}for tc in response.tool_calls]- messages.append({+ assistant_msg: dict[str, Any] = {"role": "assistant","content": response.content or "","tool_calls": tool_call_dicts,- })+ }+ # Preserve reasoning_content for providers that require it+ # (e.g. Deepseek Reasoner mandates this field on every+ # assistant message when thinking mode is active).+ if response.reasoning_content is not None:+ assistant_msg["reasoning_content"] = response.reasoning_content+ if response.thinking_blocks:+ assistant_msg["thinking_blocks"] = response.thinking_blocks+ messages.append(assistant_msg)# Execute toolsfor tool_call in response.tool_calls: