BareGit

model-switcher: update default host to localhost, port to 7330, and improve CLI help

Author: MetroWind <chris.corsair@gmail.com>
Date: Sun Jan 4 20:40:57 2026 -0800
Commit: efa1ee82d5bb2b17b1696ea66e2e30d0de0f4d3a

Changes

diff --git a/model-switcher/main.py b/model-switcher/main.py
index 2a03ed5..36607a4 100644
--- a/model-switcher/main.py
+++ b/model-switcher/main.py
@@ -9,7 +9,7 @@ from pathlib import Path
 
 # Global constants
 DEFAULT_PORT = 7330
-DEFAULT_HOST = ""
+DEFAULT_HOST = "127.0.0.1"
 CONF_DIR = "/etc/llama.cpp.d"
 LINK_PATH = "/etc/llama.cpp.conf"
 SERVICE_NAME = "llama.cpp"
@@ -134,7 +134,7 @@ class RequestHandler(http.server.BaseHTTPRequestHandler):
 
 def runServer():
     parser = argparse.ArgumentParser(description="LLM Model Switcher")
-    parser.add_argument("--host", default=DEFAULT_HOST, help="Host address to bind to. If a path (contains /), it will be treated as a unix socket. (default: '%(default)s')")
+    parser.add_argument("--host", default=DEFAULT_HOST, help="Host address to bind to. If a path (contains /), it will be treated as a unix socket. Use '' to bind to all interfaces. (default: '%(default)s')")
     parser.add_argument("--port", type=int, default=DEFAULT_PORT, help="Port to bind to (TCP only). (default: %(default)s)")
     args = parser.parse_args()