This commit is contained in:
2026-03-30 03:29:24 +08:00
parent 10925e742b
commit 1a61a7bb17
5 changed files with 15 additions and 4 deletions
+6 -1
View File
@@ -63,11 +63,16 @@ def resolve_runtime_settings(content: dict[str, Any]) -> dict[str, Any]:
api_service = dict(services.get("api", {}))
openai_service = dict(services.get("openai", {}))
models = dict(content.get("models", {}))
openai_port = _to_int(openai_service.get("port"), 8001)
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"
return {
"host": str(api_service.get("host", "0.0.0.0")),
"port": _to_int(api_service.get("port"), 8000),
"openai_host": str(openai_service.get("host", "0.0.0.0")),
"openai_port": _to_int(openai_service.get("port"), 8001),
"openai_port": openai_port,
"vllm_openai_internal_url": internal_url.rstrip("/"),
"public_model_name": _to_str(content.get("public_model_name"), "Qwen_local_model"),
"api_key": str(content.get("api_key", "")).strip() or None,
"reasoning_enabled": _to_bool(content.get("reasoning_enabled"), False),