From 6e8990acd186624429e270b953b7629275526dd3 Mon Sep 17 00:00:00 2001 From: SZCJW <792430652@qq.com> Date: Sun, 29 Mar 2026 03:09:54 +0800 Subject: [PATCH] x --- config.json | 4 ++-- scripts/start_vllm.py | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/config.json b/config.json index bd65c0b..f5ffaf2 100644 --- a/config.json +++ b/config.json @@ -36,7 +36,7 @@ "max_tokens": "65536", "gpu_util": "0.95", "tool_call_parser": "qwen3_xml", - "enable_auto_tool_choice": false, + "enable_auto_tool_choice": true, "served_model_name": "Qwen3-Coder-30B-A3B-Instruct-GPTQ-4bit", "hf_model_id": "cpatonn/Qwen3-Coder-30B-A3B-Instruct-GPTQ-4bit" }, @@ -50,7 +50,7 @@ "enforce_eager": false, "env": {"VLLM_USE_TRITON_AWQ": "1"}, "tool_call_parser": "qwen3_xml", - "enable_auto_tool_choice": false, + "enable_auto_tool_choice": true, "served_model_name": "Qwen3-Next-80B-A3B-Instruct-AWQ-4bit", "hf_model_id": "cpatonn/Qwen3-Next-80B-A3B-Instruct-AWQ-4bit" }, diff --git a/scripts/start_vllm.py b/scripts/start_vllm.py index 8827cc5..2b19660 100644 --- a/scripts/start_vllm.py +++ b/scripts/start_vllm.py @@ -159,12 +159,19 @@ def launch_model(model_id, config, model_path, gpu_count): # Add tool call parser if specified tool_call_parser = config.get("tool_call_parser") + openclaw_compat = os.getenv("OPENCLAW_COMPAT", "false").lower() == "true" + if openclaw_compat and not tool_call_parser: + tool_call_parser = os.getenv("OPENCLAW_TOOL_CALL_PARSER", "qwen3_xml") if tool_call_parser: cmd.extend(["--tool-call-parser", tool_call_parser]) - openclaw_compat = os.getenv("OPENCLAW_COMPAT", "false").lower() == "true" enable_auto_tool_choice = config.get("enable_auto_tool_choice") + auto_tool_choice_env = os.getenv("ENABLE_AUTO_TOOL_CHOICE") + if auto_tool_choice_env is not None: + enable_auto_tool_choice = auto_tool_choice_env.lower() == "true" if enable_auto_tool_choice is None: - enable_auto_tool_choice = not openclaw_compat + enable_auto_tool_choice = True + if openclaw_compat: + enable_auto_tool_choice = True if enable_auto_tool_choice: cmd.extend(["--enable-auto-tool-choice"]) log("Added auto tool choice enabled")