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
Merge branch 'main' into pr-887
Re-bin8bb849470b5d
diff --cc nanobot/agent/loop.pyindex 177302e78,4850f9c0f..2348df77f--- a/nanobot/agent/loop.py+++ b/nanobot/agent/loop.py@@@ -232,22 -249,12 +250,18 @@@ class AgentLoopelse:final_content = self._strip_think(response.content)# Some models send an interim text response before tool calls.- # Give them one retry; don't forward the text to avoid duplicates.+ # Give them one retry; save the content as fallback in case+ # the retry produces nothing useful (e.g. model already answered).if not tools_used and not text_only_retried and final_content:text_only_retried = True+ interim_content = final_contentlogger.debug("Interim text response (no tools used yet), retrying: {}", final_content[:80])- messages = self.context.add_assistant_message(- messages, response.content,- reasoning_content=response.reasoning_content,- )final_content = Nonecontinue+ # Fall back to interim content if retry produced nothing+ # and no tools were used (if tools ran, interim was truly interim)+ if not final_content and interim_content and not tools_used:+ final_content = interim_contentbreakreturn final_content, tools_used