From 3f05a87cdfa466c2d42f53f099d9da61b34836dc Mon Sep 17 00:00:00 2001 From: Entrpi Date: Sat, 27 Jun 2026 17:29:27 +1000 Subject: [PATCH] fix(serve): let empty TOOL_PARSER/REASONING_PARSER disable the parser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use ${VAR-default} instead of ${VAR:-default} so an explicit empty value (e.g. REASONING_PARSER=) disables the parser rather than falling back to the default — matching the README's documented "disable with TOOL_PARSER=''". --- runtime/serve.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/serve.sh b/runtime/serve.sh index 63333ee..a25ab35 100755 --- a/runtime/serve.sh +++ b/runtime/serve.sh @@ -70,8 +70,8 @@ python3 /host/patch_unify2.py || { [ "$NSPEC" = "0" ] && true; } # and reasoning the qwen3 parser splits into `reasoning_content`. Verified: # tool_choice="auto" -> tool_calls=[get_weather {"city":"Paris"}]. Disable either with # TOOL_PARSER="" / REASONING_PARSER="", or override the name (e.g. qwen3_coder). -TOOL_PARSER="${TOOL_PARSER:-qwen3_xml}" -REASONING_PARSER="${REASONING_PARSER:-qwen3}" +TOOL_PARSER="${TOOL_PARSER-qwen3_xml}" +REASONING_PARSER="${REASONING_PARSER-qwen3}" TOOL_ARG=() [ -n "$TOOL_PARSER" ] && TOOL_ARG+=(--enable-auto-tool-choice --tool-call-parser "$TOOL_PARSER") [ -n "$REASONING_PARSER" ] && TOOL_ARG+=(--reasoning-parser "$REASONING_PARSER")