unsloth/studio/backend/requirements
Roland Tannous 2093fb1608 Studio: swap RAG vector store from Qdrant to sqlite-vec
asg017/sqlite-vec is Apache-2.0 and OSI-approved. Replaces
qdrant-client (~30 MB) with a small SQLite extension loaded into a
dedicated rag.db file. Single file holds RAG vectors; bm25s indexes
and chat-side studio.db are unaffected.

- New core/rag/db.py owns the rag.db connection and sqlite-vec load.
  Extension load runs once at first open. Process-wide singleton
  protected by a lock; check_same_thread=False + WAL handles the
  FastAPI thread pool.
- core/rag/vector_store.py keeps the same public API
  (ensure_collection / upsert_chunks / search / collection_exists /
  delete_scope / delete_document) so callers in routes/rag.py,
  core/rag/ingestion.py, core/rag/tool.py, and core/rag/retrieval.py
  don't change. ensure_collection is now a no-op; collection_exists
  returns True iff the scope has at least one indexed vector.
- search uses sqlite-vec's vec_distance_cosine and converts distance
  to similarity in [0, 1] so the per-scope min_score threshold
  semantics stay identical.
- Mixed-dim scopes coexist behind WHERE scope = ? — the per-scope
  embedder resolver guarantees one embedder per scope.
- requirements/rag.txt swaps qdrant-client for sqlite-vec.
- utils/paths/storage_roots.py drops rag_vectordb_root() (the old
  qdrant directory); rag.db lives directly under rag_root().
- Rewritten tests/python/test_rag_vector_store.py for the new
  semantics (collection_exists tracks populated scopes; new tests
  for filtered search and upsert conflict resolution).

Python build requirement: connection.enable_load_extension(True)
must be available. install.sh creates the venv via uv-managed
python-build-standalone, which is compiled with
--enable-loadable-sqlite-extensions, so this works on standard
installs. core/rag/db.py raises an actionable error on the rare
custom-interpreter case.
2026-05-25 15:13:59 +04:00
..
single-env Studio: add github_repo seed reader and GitHub Support Bot recipe (#5169) 2026-04-24 12:02:03 -07:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
base.txt move requirements/ to studio/backend/ and update paths in setup.sh 2026-02-17 19:02:25 +00:00
extras-no-deps.txt Studio: re-bump sentence-transformers pin for Qwen3-VL embedder 2026-05-24 21:56:27 +04:00
extras.txt Fixing Qwen3.5 bug and adding Outetts dependencies (#4459) 2026-03-19 01:52:07 -07:00
no-torch-runtime.txt Studio: move RAG deps to dedicated rag.txt and install in normal path 2026-05-24 16:23:26 +04:00
overrides.txt fix: Windows installer fails on _yaml.pyd Access Denied (os error 5) (#4617) 2026-03-26 05:15:19 -07:00
rag.txt Studio: swap RAG vector store from Qdrant to sqlite-vec 2026-05-25 15:13:59 +04:00
studio.txt studio: API external provider support for chat (OpenAI, Mistral, Gemini, Cohere, Anthropic, OpenRouter, DeepSeek, custom providers) (#4706) 2026-05-14 16:13:59 +04:00
triton-kernels.txt move requirements/ to studio/backend/ and update paths in setup.sh 2026-02-17 19:02:25 +00:00