Skip to content

Self-hosted AI workspace.

Python

Treat Docker host gateway as local

Elleff4fb3bb22c1
diff --git a/src/model_context.py b/src/model_context.py
index df644d2dd..23cdb86b7 100644
--- a/src/model_context.py
+++ b/src/model_context.py
@@ -14,7 +14,7 @@ import httpx
logger = logging.getLogger(__name__)
-_LOCAL_HOSTS = {"localhost", "127.0.0.1", "0.0.0.0", "::1"}
+_LOCAL_HOSTS = {"localhost", "127.0.0.1", "0.0.0.0", "::1", "host.docker.internal"}
_PRIVATE_PREFIXES = ("10.", "172.16.", "172.17.", "172.18.", "172.19.",
"172.20.", "172.21.", "172.22.", "172.23.", "172.24.",
"172.25.", "172.26.", "172.27.", "172.28.", "172.29.",