From bdf93f06604a281e3ea6c75ed039ef98ccdff511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Boschi?= Date: Wed, 8 Apr 2026 16:06:26 +0200 Subject: [PATCH] fix: exclude local-llm from [all] extra, add as opt-in to hindsight-all (#936) * fix: exclude local-llm from [all] extra to avoid heavy llama-cpp-python dep local-llm (llama-cpp-python) requires C++ compilation and is only needed for the built-in llamacpp provider. Keep it as a separate opt-in: pip install 'hindsight-api-slim[local-llm]' * feat: add local-llm optional extra to hindsight-all Allows: pip install 'hindsight-all[local-llm]' to get built-in llamacpp support. * chore: regenerate uv.lock from workspace root --- hindsight-all/pyproject.toml | 3 +++ hindsight-api-slim/pyproject.toml | 2 +- uv.lock | 10 ++++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hindsight-all/pyproject.toml b/hindsight-all/pyproject.toml index 2a697936..87748bc2 100644 --- a/hindsight-all/pyproject.toml +++ b/hindsight-all/pyproject.toml @@ -20,6 +20,9 @@ hindsight-client = { workspace = true } hindsight-embed = { workspace = true } [project.optional-dependencies] +local-llm = [ + "hindsight-api-slim[local-llm]>=0.4.17", +] test = [ "pytest>=7.0.0", "pytest-asyncio>=0.21.0", diff --git a/hindsight-api-slim/pyproject.toml b/hindsight-api-slim/pyproject.toml index bf2590ec..19078a98 100644 --- a/hindsight-api-slim/pyproject.toml +++ b/hindsight-api-slim/pyproject.toml @@ -87,7 +87,7 @@ embedded-db = [ "pg0-embedded>=0.11.0", ] all = [ - "hindsight-api-slim[local-ml,local-llm,embedded-db]", + "hindsight-api-slim[local-ml,embedded-db]", ] test = [ "pytest>=7.0.0", diff --git a/uv.lock b/uv.lock index 7c6b3fec..7f937d50 100644 --- a/uv.lock +++ b/uv.lock @@ -1480,6 +1480,9 @@ dependencies = [ ] [package.optional-dependencies] +local-llm = [ + { name = "hindsight-api-slim", extra = ["local-llm"] }, +] test = [ { name = "pytest" }, { name = "pytest-asyncio" }, @@ -1488,12 +1491,13 @@ test = [ [package.metadata] requires-dist = [ { name = "hindsight-api-slim", extras = ["all"], editable = "hindsight-api-slim" }, + { name = "hindsight-api-slim", extras = ["local-llm"], marker = "extra == 'local-llm'", editable = "hindsight-api-slim" }, { name = "hindsight-client", editable = "hindsight-clients/python" }, { name = "hindsight-embed", editable = "hindsight-embed" }, { name = "pytest", marker = "extra == 'test'", specifier = ">=7.0.0" }, { name = "pytest-asyncio", marker = "extra == 'test'", specifier = ">=0.21.0" }, ] -provides-extras = ["test"] +provides-extras = ["local-llm", "test"] [[package]] name = "hindsight-all-slim" @@ -1595,8 +1599,6 @@ dependencies = [ all = [ { name = "einops" }, { name = "flashrank" }, - { name = "huggingface-hub" }, - { name = "llama-cpp-python", extra = ["server"] }, { name = "mlx" }, { name = "mlx-lm" }, { name = "pg0-embedded" }, @@ -1668,7 +1670,7 @@ requires-dist = [ { name = "google-auth", specifier = ">=2.0.0" }, { name = "google-genai", specifier = ">=1.0.0" }, { name = "greenlet", specifier = ">=3.2.4" }, - { name = "hindsight-api-slim", extras = ["local-ml", "local-llm", "embedded-db"], marker = "extra == 'all'" }, + { name = "hindsight-api-slim", extras = ["local-ml", "embedded-db"], marker = "extra == 'all'" }, { name = "httpx", specifier = ">=0.27.0" }, { name = "huggingface-hub", marker = "extra == 'local-llm'", specifier = ">=0.20.0" }, { name = "langchain-core", specifier = ">=1.2.22" },