This commit is contained in:
2026-03-30 03:55:57 +08:00
parent 1a61a7bb17
commit f82de29267
5 changed files with 14 additions and 0 deletions
+8
View File
@@ -1,3 +1,4 @@
import json
import os
import subprocess
import sys
@@ -19,6 +20,7 @@ def build_command() -> list[str]:
host = str(runtime["openai_host"])
port = str(runtime["openai_port"])
public_model_name = str(runtime["public_model_name"]).strip()
default_enable_thinking = bool(runtime["default_enable_thinking"])
reasoning_enabled = bool(runtime["reasoning_enabled"])
api_key = runtime["api_key"] or ""
dtype = str(updates["dtype"] or runtime["dtype"])
@@ -56,6 +58,12 @@ def build_command() -> list[str]:
cmd.append("--enable-auto-tool-choice")
if updates["tool_call_parser"]:
cmd.extend(["--tool-call-parser", str(updates["tool_call_parser"])])
cmd.extend(
[
"--default-chat-template-kwargs",
json.dumps({"enable_thinking": default_enable_thinking}),
]
)
if reasoning_enabled and reasoning_parser:
cmd.extend(["--reasoning-parser", reasoning_parser])
if quantization: