Skip to content

refactor: deduplicate optional extras using self-referencing dependencies#427

Merged
basnijholt merged 4 commits intomainfrom
deduplicate-pyproject-extras
Feb 12, 2026
Merged

refactor: deduplicate optional extras using self-referencing dependencies#427
basnijholt merged 4 commits intomainfrom
deduplicate-pyproject-extras

Conversation

@basnijholt
Copy link
Owner

Summary

  • Introduces a vectordb base extra that captures the 8 shared dependencies between rag and memory (chromadb, pydantic-ai, openai, onnxruntime, huggingface-hub, transformers, watchfiles, and fastapi)
  • Replaces repeated fastapi[standard] in 7 extras (rag, memory, faster-whisper, mlx-whisper, whisper-transformers, piper, kokoro) with agent-cli[server] self-references
  • Reduces rag and memory from ~8 lines each to 1-line self-references plus their unique dep

Before:

rag = [
    "pydantic-ai-slim[openai,google]>=0.1.1",
    "fastapi[standard]",
    "chromadb>=0.4.22",
    "openai>=1.0.0",
    "onnxruntime>=1.17.0",
    "huggingface-hub>=0.20.0",
    "transformers>=4.30.0",
    "watchfiles>=0.21.0",
    "markitdown[docx,pdf,pptx]>=0.1.3",
]
memory = [
    "pydantic-ai-slim[openai,google]>=0.1.1",
    "fastapi[standard]",
    "chromadb>=0.4.22",
    "openai>=1.0.0",
    "onnxruntime>=1.17.0",
    "huggingface-hub>=0.20.0",
    "transformers>=4.30.0",
    "watchfiles>=0.21.0",
    "pyyaml>=6.0.0",
]

After:

vectordb = [
    "agent-cli[server]",
    "pydantic-ai-slim[openai,google]>=0.1.1",
    "chromadb>=0.4.22",
    "openai>=1.0.0",
    "onnxruntime>=1.17.0",
    "huggingface-hub>=0.20.0",
    "transformers>=4.30.0",
    "watchfiles>=0.21.0",
]
rag = ["agent-cli[vectordb]", "markitdown[docx,pdf,pptx]>=0.1.3"]
memory = ["agent-cli[vectordb]", "pyyaml>=6.0.0"]

Uses the same self-referencing pattern already established by audio = [..., "agent-cli[wyoming]"].

Test plan

  • All 990 tests pass
  • All pre-commit hooks pass (including check-extras-sync, sync-requirements, uv lock)
  • _extras.json and _requirements/*.txt regenerated correctly
  • vectordb added to install-extras help text and docstring

basnijholt and others added 3 commits February 11, 2026 22:54
…cies

Introduce a `vectordb` base extra to eliminate duplication between `rag`
and `memory` (which shared 8 identical deps). Replace repeated
`fastapi[standard]` in 7 extras with `agent-cli[server]` references.
@basnijholt
Copy link
Owner Author

pre-commit.ci: please retry

@basnijholt basnijholt merged commit 2bdf090 into main Feb 12, 2026
10 of 11 checks passed
@basnijholt basnijholt deleted the deduplicate-pyproject-extras branch February 12, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant