This commit is contained in:
2026-03-29 02:57:21 +08:00
parent 3792606cf9
commit 8802e9b226
4 changed files with 19 additions and 6 deletions
+11 -2
View File
@@ -128,12 +128,14 @@ def launch_model(model_id, config, model_path, gpu_count):
ctx = int(config.get("ctx", 8192))
max_seqs = int(config.get("max_num_seqs", 64))
gpu_util = float(config.get("gpu_util", 0.98))
served_model_name = config.get("served_model_name", model_id)
log(f"Config: TP={tp_size}, Ctx={ctx}, Seqs={max_seqs}, Util={gpu_util}")
# Build command
cmd = [
"vllm", "serve", model_path,
"--served-model-name", served_model_name,
"--host", HOST,
"--port", PORT,
"--tensor-parallel-size", str(tp_size),
@@ -159,9 +161,16 @@ def launch_model(model_id, config, model_path, gpu_count):
tool_call_parser = config.get("tool_call_parser")
if tool_call_parser:
cmd.extend(["--tool-call-parser", tool_call_parser])
cmd.extend(["--enable-auto-tool-choice"])
openclaw_compat = os.getenv("OPENCLAW_COMPAT", "false").lower() == "true"
enable_auto_tool_choice = config.get("enable_auto_tool_choice")
if enable_auto_tool_choice is None:
enable_auto_tool_choice = not openclaw_compat
if enable_auto_tool_choice:
cmd.extend(["--enable-auto-tool-choice"])
log("Added auto tool choice enabled")
else:
log("Auto tool choice disabled")
log(f"Added tool call parser: {tool_call_parser}")
log("Added auto tool choice enabled")
log(f"Command: {' '.join(cmd)}")