From 138c5a90230084b57573cde4e89e04ad8eff5940 Mon Sep 17 00:00:00 2001 From: Ahmed Allam Date: Mon, 8 Sep 2025 23:56:44 -0700 Subject: [PATCH] Escaping tool arguments --- strix/llm/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/strix/llm/utils.py b/strix/llm/utils.py index 5258768..8c141c6 100644 --- a/strix/llm/utils.py +++ b/strix/llm/utils.py @@ -1,3 +1,4 @@ +import html import re from typing import Any @@ -36,6 +37,8 @@ def parse_tool_invocations(content: str) -> list[dict[str, Any]] | None: for param_match in param_matches: param_name = param_match.group(1) param_value = param_match.group(2).strip() + + param_value = html.unescape(param_value) args[param_name] = param_value tool_invocations.append({"toolName": fn_name, "args": args})