Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

deps: update sqlite-vec requirement from >=0.1.6 to >=0.1.9 (#4654)

dependabot[bot]de1a1e0f478d
diff --git a/pyproject.toml b/pyproject.toml
index ed5d3f99e..00d9f21b3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -127,7 +127,7 @@ proxy = [
# publishes no macOS wheel for Python 3.14, so installing it there needs a C
# compiler. The watcher is optional and skips itself when watchdog is absent.
"watchdog>=4.0.0; sys_platform != 'darwin' or python_version < '3.14'",
- "sqlite-vec>=0.1.6", # Vector index for memory (--memory). Lightweight, no torch.
+ "sqlite-vec>=0.1.9", # Vector index for memory (--memory). Lightweight, no torch.
]
# Production ASGI/WSGI server — Unix-only (gunicorn does not support Windows).
# Kept separate from [proxy] so that dev, CI, and Windows users are not forced
@@ -167,7 +167,7 @@ ml = [
# in the [vector] extra below; installing it here would make `[all]` (which pulls
# [memory]) fail on any machine without a compiler — see #1368.
memory = [
- "sqlite-vec>=0.1.6",
+ "sqlite-vec>=0.1.9",
"sentence-transformers>=2.2.0,<7.0; sys_platform != 'darwin' or platform_machine != 'x86_64'",
]
# Optional HNSW vector backend. Needs a C++ toolchain to build hnswlib, so it is
@@ -347,7 +347,7 @@ dev = [
"ollama>=0.4.0",
"langchain-ollama>=0.2.0",
"hnswlib>=0.8.0",
- "sqlite-vec>=0.1.6",
+ "sqlite-vec>=0.1.9",
"sentence-transformers>=2.2.0,<7.0",
"numpy>=1.24.0",
"openpyxl>=3.1.0", # exercises spreadsheet_ingest (.xlsx) in the test suite
diff --git a/tests/test_sqlite_vector_index.py b/tests/test_sqlite_vector_index.py
index d82da5179..4333f5e40 100644
--- a/tests/test_sqlite_vector_index.py
+++ b/tests/test_sqlite_vector_index.py
@@ -15,6 +15,7 @@ import tempfile
import numpy as np
import pytest
+import pytest_asyncio
from headroom.memory.models import Memory
from headroom.memory.ports import VectorFilter
@@ -32,8 +33,8 @@ except ImportError:
class TestSQLiteVectorIndex:
"""Tests for SQLiteVectorIndex."""
- @pytest.fixture
- def index(self):
+ @pytest_asyncio.fixture
+ async def index(self):
"""Create a temporary SQLite vector index."""
with tempfile.NamedTemporaryFile(suffix=".db", delete=False) as f:
db_path = f.name
@@ -41,10 +42,12 @@ class TestSQLiteVectorIndex:
from headroom.memory.adapters.sqlite_vector import SQLiteVectorIndex
index = SQLiteVectorIndex(dimension=384, db_path=db_path)
- yield index
-
- if os.path.exists(db_path):
- os.unlink(db_path)
+ try:
+ yield index
+ finally:
+ await index.close()
+ if os.path.exists(db_path):
+ os.unlink(db_path)
@pytest.mark.asyncio
async def test_index_and_search(self, index):
@@ -270,6 +273,7 @@ class TestSQLiteVectorIndexPersistence:
with tempfile.NamedTemporaryFile(suffix=".db", delete=False) as f:
db_path = f.name
+ index1 = index2 = None
try:
from headroom.memory.adapters.sqlite_vector import SQLiteVectorIndex
@@ -287,7 +291,8 @@ class TestSQLiteVectorIndexPersistence:
memory_id = memory.id
- # Create new index instance
+ # Close the first connection before reopening the persisted index.
+ await index1.close()
index2 = SQLiteVectorIndex(dimension=384, db_path=db_path)
assert index2.size == 1
@@ -302,6 +307,9 @@ class TestSQLiteVectorIndexPersistence:
assert len(results) == 1
assert results[0].memory.id == memory_id
finally:
+ for index in (index1, index2):
+ if index is not None:
+ await index.close()
if os.path.exists(db_path):
os.unlink(db_path)
@@ -310,8 +318,8 @@ class TestSQLiteVectorIndexPersistence:
class TestSQLiteVectorIndexMemoryStats:
"""Tests for memory statistics."""
- @pytest.fixture
- def index(self):
+ @pytest_asyncio.fixture
+ async def index(self):
"""Create a temporary SQLite vector index."""
with tempfile.NamedTemporaryFile(suffix=".db", delete=False) as f:
db_path = f.name
@@ -319,10 +327,12 @@ class TestSQLiteVectorIndexMemoryStats:
from headroom.memory.adapters.sqlite_vector import SQLiteVectorIndex
index = SQLiteVectorIndex(dimension=384, db_path=db_path, page_cache_size_kb=4096)
- yield index
-
- if os.path.exists(db_path):
- os.unlink(db_path)
+ try:
+ yield index
+ finally:
+ await index.close()
+ if os.path.exists(db_path):
+ os.unlink(db_path)
@pytest.mark.asyncio
async def test_memory_stats(self, index):
@@ -375,8 +385,8 @@ class TestSQLiteVectorIndexMemoryStats:
class TestSQLiteVectorIndexEdgeCases:
"""Tests for edge cases."""
- @pytest.fixture
- def index(self):
+ @pytest_asyncio.fixture
+ async def index(self):
"""Create a temporary SQLite vector index."""
with tempfile.NamedTemporaryFile(suffix=".db", delete=False) as f:
db_path = f.name
@@ -384,10 +394,12 @@ class TestSQLiteVectorIndexEdgeCases:
from headroom.memory.adapters.sqlite_vector import SQLiteVectorIndex
index = SQLiteVectorIndex(dimension=384, db_path=db_path)
- yield index
-
- if os.path.exists(db_path):
- os.unlink(db_path)
+ try:
+ yield index
+ finally:
+ await index.close()
+ if os.path.exists(db_path):
+ os.unlink(db_path)
@pytest.mark.asyncio
async def test_search_empty_index(self, index):
diff --git a/uv.lock b/uv.lock
index 66827650b..ff9c6094a 100644
--- a/uv.lock
+++ b/uv.lock
@@ -1792,9 +1792,9 @@ requires-dist = [
{ name = "sentence-transformers", marker = "(platform_machine != 'x86_64' and extra == 'memory') or (sys_platform != 'darwin' and extra == 'memory')", specifier = ">=2.2.0,<7.0" },
{ name = "sentence-transformers", marker = "extra == 'dev'", specifier = ">=2.2.0,<7.0" },
{ name = "sentencepiece", marker = "extra == 'image'", specifier = ">=0.1.99" },
- { name = "sqlite-vec", marker = "extra == 'dev'", specifier = ">=0.1.6" },
- { name = "sqlite-vec", marker = "extra == 'memory'", specifier = ">=0.1.6" },
- { name = "sqlite-vec", marker = "extra == 'proxy'", specifier = ">=0.1.6" },
+ { name = "sqlite-vec", marker = "extra == 'dev'", specifier = ">=0.1.9" },
+ { name = "sqlite-vec", marker = "extra == 'memory'", specifier = ">=0.1.9" },
+ { name = "sqlite-vec", marker = "extra == 'proxy'", specifier = ">=0.1.9" },
{ name = "starlette", marker = "extra == 'mcp'", specifier = ">=0.27.0" },
{ name = "strands-agents", marker = "extra == 'strands'", specifier = ">=0.1.0" },
{ name = "tiktoken", specifier = ">=0.5.0" },
@@ -5442,14 +5442,14 @@ wheels = [
[[package]]
name = "sqlite-vec"
-version = "0.1.6"
+version = "0.1.9"
source = { registry = "https://pypi.org/simple/" }
wheels = [
- { url = "https://files.pythonhosted.org/packages/88/ed/aabc328f29ee6814033d008ec43e44f2c595447d9cccd5f2aabe60df2933/sqlite_vec-0.1.6-py3-none-macosx_10_6_x86_64.whl", hash = "sha256:77491bcaa6d496f2acb5cc0d0ff0b8964434f141523c121e313f9a7d8088dee3", size = 164075, upload-time = "2024-11-20T16:40:29.847Z" },
- { url = "https://files.pythonhosted.org/packages/a7/57/05604e509a129b22e303758bfa062c19afb020557d5e19b008c64016704e/sqlite_vec-0.1.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:fdca35f7ee3243668a055255d4dee4dea7eed5a06da8cad409f89facf4595361", size = 165242, upload-time = "2024-11-20T16:40:31.206Z" },
- { url = "https://files.pythonhosted.org/packages/f2/48/dbb2cc4e5bad88c89c7bb296e2d0a8df58aab9edc75853728c361eefc24f/sqlite_vec-0.1.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b0519d9cd96164cd2e08e8eed225197f9cd2f0be82cb04567692a0a4be02da3", size = 103704, upload-time = "2024-11-20T16:40:33.729Z" },
- { url = "https://files.pythonhosted.org/packages/80/76/97f33b1a2446f6ae55e59b33869bed4eafaf59b7f4c662c8d9491b6a714a/sqlite_vec-0.1.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux1_x86_64.whl", hash = "sha256:823b0493add80d7fe82ab0fe25df7c0703f4752941aee1c7b2b02cec9656cb24", size = 151556, upload-time = "2024-11-20T16:40:35.387Z" },
- { url = "https://files.pythonhosted.org/packages/6a/98/e8bc58b178266eae2fcf4c9c7a8303a8d41164d781b32d71097924a6bebe/sqlite_vec-0.1.6-py3-none-win_amd64.whl", hash = "sha256:c65bcfd90fa2f41f9000052bcb8bb75d38240b2dae49225389eca6c3136d3f0c", size = 281540, upload-time = "2024-11-20T16:40:37.296Z" },
+ { url = "https://files.pythonhosted.org/packages/68/85/9fad0045d8e7c8df3e0fa5a56c630e8e15ad6e5ca2e6106fceb666aa6638/sqlite_vec-0.1.9-py3-none-macosx_10_6_x86_64.whl", hash = "sha256:1b62a7f0a060d9475575d4e599bbf94a13d85af896bc1ce86ee80d1b5b48e5fb", size = 131171, upload-time = "2026-03-31T08:02:31.717Z" },
+ { url = "https://files.pythonhosted.org/packages/a4/3d/3677e0cd2f92e5ebc43cd29fbf565b75582bff1ccfa0b8327c7508e1084f/sqlite_vec-0.1.9-py3-none-macosx_11_0_arm64.whl", hash = "sha256:1d52e30513bae4cc9778ddbf6145610434081be4c3afe57cd877893bad9f6b6c", size = 165434, upload-time = "2026-03-31T08:02:32.712Z" },
+ { url = "https://files.pythonhosted.org/packages/00/d4/f2b936d3bdc38eadcbd2a87875815db36430fab0363182ba5d12cd8e0b51/sqlite_vec-0.1.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e921e592f24a5f9a18f590b6ddd530eb637e2d474e3b1972f9bbeb773aa3cb9", size = 160076, upload-time = "2026-03-31T08:02:33.796Z" },
+ { url = "https://files.pythonhosted.org/packages/6f/ad/6afd073b0f817b3e03f9e37ad626ae341805891f23c74b5292818f49ac63/sqlite_vec-0.1.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux1_x86_64.whl", hash = "sha256:1515727990b49e79bcaf75fdee2ffc7d461f8b66905013231251f1c8938e7786", size = 163388, upload-time = "2026-03-31T08:02:34.888Z" },
+ { url = "https://files.pythonhosted.org/packages/42/89/81b2907cda14e566b9bf215e2ad82fc9b349edf07d2010756ffdb902f328/sqlite_vec-0.1.9-py3-none-win_amd64.whl", hash = "sha256:4a28dc12fa4b53d7b1dced22da2488fade444e96b5d16fd2d698cd670675cf32", size = 292804, upload-time = "2026-03-31T08:02:36.035Z" },
]
[[package]]