[PR #22287] [CLOSED] feat: SurrealDB Integration as VectorDB #65445

Closed
opened 2026-05-06 11:16:39 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/22287
Author: @mbrannen
Created: 3/6/2026
Status: Closed

Base: devHead: feat/surrealdb-vector-backend


📝 Commits (4)

  • 8f3cbbb feat: Implement SurrealDB client for vector database operations
  • 829c4e0 Merge remote-tracking branch 'upstream/dev' into feat/surrealdb-vector-backend
  • e109bff another docs pass
  • ce7feba Merge remote-tracking branch 'upstream/dev' into feat/surrealdb-vector-backend

📊 Changes

6 files changed (+606 additions, -2 deletions)

View changed files

📝 README.md (+2 -2)
📝 backend/open_webui/config.py (+44 -0)
backend/open_webui/retrieval/vector/dbs/surrealdb.py (+554 -0)
📝 backend/open_webui/retrieval/vector/factory.py (+4 -0)
📝 backend/open_webui/retrieval/vector/type.py (+1 -0)
📝 backend/requirements.txt (+1 -0)

📄 Description

Pull Request Checklist

Before submitting, make sure you've checked the following:

  • Documentation: Add docs in Open WebUI Docs Repository. Document user-facing behavior, environment variables, public APIs/interfaces, or deployment steps.

Changelog Entry

Description

SurrealDB is a mature and AI first DB that offers a lot of great features and is something I use personally and professionally. My organization uses OpenWebUI and I wanted to contribute to get this officially supported as a vector database.

Added

  • Support for SurrealDB as a VectorDB
  • Configuration options for Surreal
    • SURREALDB_URL: URL of server
    • SURREALDB_NAMESPACE: Namespace of database (default openwebui)
    • SURREALDB_DATABASE: Name of database (default openwebui)
    • SURREALDB_USER: Username for authentication
    • SURREALDB_PASSWORD: Password for authentication
    • SURREALDB_TABLE: Customize name of table (default open_webui_chunks)
    • SURREALDB_VECTOR_INDEX_ENABLED: Flag to enable index (default true)
    • SURREALDB_VECTOR_INDEX_DIMENSION: Size of dimensions of embedding model (default 1536)
    • SURREALDB_VECTOR_INDEX_DISTANCE: Choice of 3 different distance metrics (Euclidean, Manhattan, and default Cosine)
    • SURREALDB_VECTOR_INDEX_M: Configurable amount of node(vector) connections in the graph (default 12)
    • SURREALDB_VECTOR_INDEX_EFC: Candidates explored for indexing (default 150)
  • Dependency for surrealdb python package (1.0.8)

Changed

  • Minor docs update around which vectorDBs are supported

Deprecated

  • N/A

Removed

  • N/A

Fixed

  • N/A

Security

  • N/A

Breaking Changes

  • None known

Additional Information

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/22287 **Author:** [@mbrannen](https://github.com/mbrannen) **Created:** 3/6/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/surrealdb-vector-backend` --- ### 📝 Commits (4) - [`8f3cbbb`](https://github.com/open-webui/open-webui/commit/8f3cbbb3197e0db350ad3da817181f54201e6096) feat: Implement SurrealDB client for vector database operations - [`829c4e0`](https://github.com/open-webui/open-webui/commit/829c4e0804c4625fdddc99c7d4c9fede403670bb) Merge remote-tracking branch 'upstream/dev' into feat/surrealdb-vector-backend - [`e109bff`](https://github.com/open-webui/open-webui/commit/e109bffd78de077836e7727aad945bd8eb4f737d) another docs pass - [`ce7feba`](https://github.com/open-webui/open-webui/commit/ce7feba918ab3b9e57305a1ce90f16f2a27d1eb8) Merge remote-tracking branch 'upstream/dev' into feat/surrealdb-vector-backend ### 📊 Changes **6 files changed** (+606 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+2 -2) 📝 `backend/open_webui/config.py` (+44 -0) ➕ `backend/open_webui/retrieval/vector/dbs/surrealdb.py` (+554 -0) 📝 `backend/open_webui/retrieval/vector/factory.py` (+4 -0) 📝 `backend/open_webui/retrieval/vector/type.py` (+1 -0) 📝 `backend/requirements.txt` (+1 -0) </details> ### 📄 Description <!-- ⚠️ CRITICAL CHECKS FOR CONTRIBUTORS (READ, DON'T DELETE) ⚠️ 1. Target the `dev` branch. PRs targeting `main` will be automatically closed. 2. Do NOT delete the CLA section at the bottom. It is required for the bot to accept your PR. --> # Pull Request Checklist **Before submitting, make sure you've checked the following:** - [ ] **Documentation:** Add docs in [Open WebUI Docs Repository](https://github.com/open-webui/docs). Document user-facing behavior, environment variables, public APIs/interfaces, or deployment steps. # Changelog Entry ### Description SurrealDB is a mature and AI first DB that offers a lot of great features and is something I use personally and professionally. My organization uses OpenWebUI and I wanted to contribute to get this officially supported as a vector database. ### Added - Support for SurrealDB as a VectorDB - Configuration options for Surreal - SURREALDB_URL: URL of server - SURREALDB_NAMESPACE: Namespace of database (default openwebui) - SURREALDB_DATABASE: Name of database (default openwebui) - SURREALDB_USER: Username for authentication - SURREALDB_PASSWORD: Password for authentication - SURREALDB_TABLE: Customize name of table (default open_webui_chunks) - SURREALDB_VECTOR_INDEX_ENABLED: Flag to enable index (default true) - SURREALDB_VECTOR_INDEX_DIMENSION: Size of dimensions of embedding model (default 1536) - SURREALDB_VECTOR_INDEX_DISTANCE: Choice of 3 different distance metrics (Euclidean, Manhattan, and default Cosine) - SURREALDB_VECTOR_INDEX_M: Configurable amount of node(vector) connections in the graph (default 12) - SURREALDB_VECTOR_INDEX_EFC: Candidates explored for indexing (default 150) - Dependency for surrealdb python package (1.0.8) ### Changed - Minor docs update around which vectorDBs are supported ### Deprecated - N/A ### Removed - N/A ### Fixed - N/A ### Security - N/A ### Breaking Changes - None known --- ### Additional Information - https://surrealdb.com/ ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 11:16:39 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#65445