From 180b4ef05a4399f9c7cd2ecfdd31dae2ca7d499e Mon Sep 17 00:00:00 2001 From: Long Ngo Date: Mon, 2 Mar 2026 10:11:16 -0600 Subject: [PATCH 1/2] fix: remove hnswlib from core deps and fix package name in docs hnswlib requires C++ compilation and is only used by the memory subsystem - it belongs in the [memory] extra, not core dependencies. Installing headroom-ai on slim Docker images or any environment without build tools would fail at the hnswlib build step. Also fixes docs/quickstart.md and docs/troubleshooting.md which referenced the wrong PyPI package name `headroom` (an unrelated package) instead of `headroom-ai`. Co-Authored-By: Claude Sonnet 4.6 --- docs/quickstart.md | 6 +++--- docs/troubleshooting.md | 12 ++++++------ pyproject.toml | 1 - 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/quickstart.md b/docs/quickstart.md index 7602997b0..0da33cebe 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -8,13 +8,13 @@ Get Headroom running in 5 minutes with these copy-paste examples. ```bash # Core only (minimal dependencies) -pip install headroom +pip install headroom-ai # With proxy server -pip install "headroom[proxy]" +pip install "headroom-ai[proxy]" # Everything -pip install "headroom[all]" +pip install "headroom-ai[all]" ``` --- diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 92e10b269..1524a87b5 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -21,7 +21,7 @@ lsof -i :8787 headroom proxy --port 8788 # 3. Check for missing dependencies -pip install "headroom[proxy]" +pip install "headroom-ai[proxy]" # 4. Run with debug logging headroom proxy --log-level debug @@ -223,13 +223,13 @@ client = HeadroomClient( ```bash # 1. Check it's installed in the right environment -pip show headroom +pip show headroom-ai # 2. If using virtual environment, ensure it's activated source venv/bin/activate # or equivalent # 3. Reinstall -pip install --upgrade headroom +pip install --upgrade headroom-ai ``` ### "ImportError: cannot import name 'X' from 'headroom'" @@ -256,13 +256,13 @@ from headroom import ( ```bash # For proxy server -pip install "headroom[proxy]" +pip install "headroom-ai[proxy]" # For embedding-based relevance scoring -pip install "headroom[relevance]" +pip install "headroom-ai[relevance]" # For everything -pip install "headroom[all]" +pip install "headroom-ai[all]" ``` --- diff --git a/pyproject.toml b/pyproject.toml index 1f49da104..f9bd2bd42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,6 @@ dependencies = [ "semantic-router>=0.1.12", "pillow>=10.0.0", # Image processing for compression "datasets>=4.5.0", - "hnswlib>=0.8.0", # HNSW vector index for memory system "click>=8.1.0", # CLI framework "rich>=13.0.0", # Rich terminal output ] From 460250c80e74fd7e9292d1344ac406590c445fd8 Mon Sep 17 00:00:00 2001 From: Long Ngo Date: Mon, 2 Mar 2026 10:13:15 -0600 Subject: [PATCH 2/2] revert: restore hnswlib to core dependencies hnswlib may be used by core features at runtime even without the [memory] extra explicitly installed. Safer to leave it in core deps and document the C++ build requirement instead. Co-Authored-By: Claude Sonnet 4.6 --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index f9bd2bd42..1f49da104 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,6 +55,7 @@ dependencies = [ "semantic-router>=0.1.12", "pillow>=10.0.0", # Image processing for compression "datasets>=4.5.0", + "hnswlib>=0.8.0", # HNSW vector index for memory system "click>=8.1.0", # CLI framework "rich>=13.0.0", # Rich terminal output ]