From 368d68baa535aca4d1a977a7afd8797b29999539 Mon Sep 17 00:00:00 2001 From: Liang Jiaqing Date: Wed, 1 Apr 2026 09:47:53 +0800 Subject: [PATCH] fix: remove stray brace in tool_pattern regex --- llmcore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llmcore.py b/llmcore.py index c2c64f3..7afe1e4 100644 --- a/llmcore.py +++ b/llmcore.py @@ -748,7 +748,7 @@ class ToolClient: remaining_text = re.sub(think_pattern, "", remaining_text, flags=re.DOTALL) tool_calls = []; json_strs = []; errors = [] - tool_pattern = r"<(?:tool_use|tool_call)>((?:(?!<(?:tool_use|tool_call)>).){15,}?)"} + tool_pattern = r"<(?:tool_use|tool_call)>((?:(?!<(?:tool_use|tool_call)>).){15,}?)" tool_all = re.findall(tool_pattern, remaining_text, re.DOTALL) if tool_all: