change config path

This commit is contained in:
2025-10-13 22:37:16 +08:00
parent ec72d25c4a
commit cfe83867c2

View File

@@ -175,12 +175,14 @@ def signal_handler(sig, frame):
def load_config():
"""Load JSON config from $MCP_CONFIG or ./mcp_config.json. Return dict or {}."""
# path = os.environ.get("MCP_CONFIG") or os.path.join(os.getcwd(), "mcp_config.json")
path = "configs/mcp_config.json"
# path = "configs/mcp_config.json"
path = "configs/ws_mcp_config.json"
if not os.path.exists(path):
return {}
try:
with open(path, "r", encoding="utf-8") as f:
return mcp_langchain_to_ws_config(json.load(f))
# return mcp_langchain_to_ws_config(json.load(f))
return json.load(f)
except Exception as e:
logger.warning(f"Failed to load config {path}: {e}")
return {}