Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 25, 2025

Summary

This PR implements support for multiple vector database providers in the codebase indexing feature, addressing issue #6223.

Changes

Core Implementation

  • Created abstract VectorDBAdapter base class to define the vector database interface
  • Implemented adapters for:
    • LanceDB: Embedded vector database, no external service required
    • ChromaDB: Supports both client-server and in-memory modes
    • SQLite+Vector: Lightweight embedded solution using sqlite-vss extension
  • Refactored existing Qdrant implementation to use the adapter pattern

Configuration & Service Updates

  • Updated service-factory.ts to support dynamic vector database provider selection
  • Extended config-manager.ts to handle new configuration options:
    • vectorDBProvider: Select between 'qdrant', 'lancedb', 'chromadb', or 'sqlite-vector'
    • chromadbUrl: Configure ChromaDB server URL (default: http://localhost:8000)
    • chromadbApiKey: Optional API key for ChromaDB authentication
  • Added proper configuration validation and restart detection for provider changes

Internationalization

  • Added i18n translations for all new vector database options and error messages
  • Updated settings UI translations to support the new provider selection

Benefits

  1. Flexibility: Users can now choose their preferred vector database based on their needs
  2. Embedded Options: LanceDB and SQLite+Vector don't require external services, simplifying deployment
  3. Backward Compatibility: Qdrant remains the default provider, ensuring existing installations continue to work
  4. Extensibility: The adapter pattern makes it easy to add support for additional vector databases in the future

Testing

The implementation includes proper error handling for missing dependencies and dimension mismatches. Each adapter gracefully handles initialization failures and provides clear error messages.

Next Steps

  • UI component updates for vector database selection (to be implemented in a follow-up PR)
  • Comprehensive unit tests for each adapter implementation
  • Documentation updates for the new configuration options

Fixes #6223


Important

Adds support for multiple vector database providers in codebase indexing, including LanceDB, ChromaDB, and SQLite+Vector, with configuration and internationalization updates.

  • Core Implementation:
    • Introduces VectorDBAdapter base class for vector database interface.
    • Implements adapters for LanceDB, ChromaDB, and SQLite+Vector.
    • Refactors Qdrant implementation to use adapter pattern.
  • Configuration & Service Updates:
    • Updates service-factory.ts for dynamic vector database provider selection.
    • Extends config-manager.ts for new configuration options: vectorDBProvider, chromadbUrl, chromadbApiKey.
    • Adds configuration validation and restart detection for provider changes.
  • Internationalization:
    • Adds i18n translations for new vector database options and error messages.
    • Updates settings UI translations for new provider selection.

This description was created by Ellipsis for 3a0a6d0. You can customize this summary. It will automatically update as commits are pushed.

- Create abstract VectorDBAdapter base class
- Implement adapters for LanceDB, ChromaDB, and SQLite+Vector
- Update Qdrant implementation to use adapter pattern
- Update service factory to support multiple vector databases
- Update configuration manager to handle vector DB selection
- Add i18n translations for new vector DB options

This allows users to choose from multiple vector database options:
- Qdrant (existing, requires external service)
- LanceDB (embedded, no external service needed)
- ChromaDB (can run embedded or as service)
- SQLite+Vector (embedded, lightweight option)

Addresses #6223
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 25, 2025 22:12
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Jul 25, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 25, 2025
@daniel-lxs
Copy link
Member

This should be done in steps, adding 1 at a time

@daniel-lxs daniel-lxs closed this Jul 28, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 28, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Support for Alternative Vector Databases in Codebase Indexing

4 participants