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
chore: tighten malformed tool-call guard wording
Xubin Ren7dc45ff94e89
diff --git a/nanobot/agent/runner.py b/nanobot/agent/runner.pyindex 70740b0c6..784d32716 100644--- a/nanobot/agent/runner.py+++ b/nanobot/agent/runner.py@@ -952,7 +952,7 @@ class AgentRunner:retry_messages = list(messages)note = ("The previous model response attempted to call tools, but every tool call "- "was malformed: the tool_use blocks had missing/non-string name, id, or input. "+ "was malformed: the tool_use blocks had missing or non-string tool names. ""Do not answer with a promise to use tools. Either call the required tools again ""using valid tool names from the provided tool list and JSON object inputs, or give ""a final answer only if no tool is required."diff --git a/tests/agent/test_tool_hint.py b/tests/agent/test_tool_hint.pyindex 6aeed4008..c299d22e0 100644--- a/tests/agent/test_tool_hint.py+++ b/tests/agent/test_tool_hint.py@@ -1,7 +1,7 @@"""Tests for tool hint formatting (nanobot.utils.tool_hints)."""-from nanobot.utils.tool_hints import format_tool_hintsfrom nanobot.providers.base import ToolCallRequest+from nanobot.utils.tool_hints import format_tool_hintsdef _tc(name: str, args) -> ToolCallRequest: