x
This commit is contained in:
+15
-3
@@ -68,6 +68,18 @@ def resolve_runtime_settings(content: dict[str, Any]) -> dict[str, Any]:
|
||||
internal_url = _to_str(content.get("vllm_openai_internal_url"))
|
||||
if not internal_url:
|
||||
internal_url = f"http://127.0.0.1:{openai_port}/v1"
|
||||
enable_thinking_env = os.getenv("VLLM_ENABLE_THINKING")
|
||||
if enable_thinking_env is not None:
|
||||
default_enable_thinking = _to_bool(enable_thinking_env, False)
|
||||
else:
|
||||
default_enable_thinking = _to_bool(content.get("default_enable_thinking"), False)
|
||||
|
||||
reasoning_enabled_env = os.getenv("VLLM_REASONING_ENABLED")
|
||||
if reasoning_enabled_env is not None:
|
||||
reasoning_enabled = _to_bool(reasoning_enabled_env, False)
|
||||
else:
|
||||
reasoning_enabled = _to_bool(content.get("reasoning_enabled"), False)
|
||||
|
||||
return {
|
||||
"host": str(api_service.get("host", "0.0.0.0")),
|
||||
"port": _to_int(api_service.get("port"), 8000),
|
||||
@@ -75,9 +87,9 @@ def resolve_runtime_settings(content: dict[str, Any]) -> dict[str, Any]:
|
||||
"openai_port": openai_port,
|
||||
"vllm_openai_internal_url": internal_url.rstrip("/"),
|
||||
"public_model_name": _to_str(content.get("public_model_name"), "Qwen_local_model"),
|
||||
"default_enable_thinking": _to_bool(content.get("default_enable_thinking"), False),
|
||||
"default_enable_thinking": default_enable_thinking,
|
||||
"api_key": str(content.get("api_key", "")).strip() or None,
|
||||
"reasoning_enabled": _to_bool(content.get("reasoning_enabled"), False),
|
||||
"reasoning_enabled": reasoning_enabled,
|
||||
"tensor_parallel_size": _to_int(content.get("tensor_parallel_size"), 2),
|
||||
"dtype": str(content.get("dtype", "bfloat16")),
|
||||
"revision": str(content.get("revision", "")).strip() or None,
|
||||
@@ -125,7 +137,7 @@ def resolve_model_profile(
|
||||
"dtype": _to_str(profile.get("dtype")),
|
||||
"quantization": _to_str(profile.get("quantization")),
|
||||
"model_impl": _to_str(profile.get("model_impl")),
|
||||
"reasoning_parser": _to_str(profile.get("reasoning_parser")),
|
||||
"reasoning_parser": _to_str(os.getenv("VLLM_REASONING_PARSER") or profile.get("reasoning_parser")),
|
||||
"max_model_len": _to_int(profile.get("ctx"), 8192),
|
||||
"max_num_seqs": _to_int(profile.get("max_num_seqs"), 64),
|
||||
"max_tokens": _to_int(profile.get("max_tokens"), 4096),
|
||||
|
||||
Reference in New Issue
Block a user