[GH-ISSUE #6550] Memory creation fails when using Milvus Vector DB #14402

Closed
opened 2026-04-19 20:46:30 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @jasonpnnl on GitHub (Oct 29, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/6550


Installation Method

git clone

Environment

  • Open WebUI Version: v0.3.35

  • Operating System: Windows 10, Debian Bookworm

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

Memory is created by creating a collection when using both Chroma and Milvus

Actual Behavior:

Memory is not added. Silently fails.
Receive error from backend:
pymilvus.exceptions.MilvusException: <MilvusException: (code=1100, message=Invalid collection open_webui_user-memory-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. , collection name can only contain numbers, letters and underscores: invalid parameter)>

Description

Bug Summary:
Memories.py creates collections using names that contain dashes. Milvus does not allow dashes so this fails.

Reproduction Details

Steps to Reproduce:

  1. Configure OpenWebUI to use Milvus instead of Chroma for vector db
  2. Add a Memory

Logs and Screenshots

pymilvus.exceptions.MilvusException: <MilvusException: (code=1100, message=Invalid collection open_webui_user-memory-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. , collection name can only contain numbers, letters and underscores: invalid parameter)>
image

Additional Information

I have a proposal for how to fix this and can submit a PR. Instead of setting the collection name with dashes in it multiple times in memories.py, create a function, get_collection_name that returns collection_name but with dashes replaced with underscores if the VECTOR_DB_CLIENT is MilvusClient, otherwise return collection_name as currently implemented to keep backward compatibility.

Originally created by @jasonpnnl on GitHub (Oct 29, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/6550 --- ## Installation Method git clone ## Environment - **Open WebUI Version:** v0.3.35 - **Operating System:** Windows 10, Debian Bookworm **Confirmation:** - [X] I have read and followed all the instructions provided in the README.md. - [X] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [ ] I have included the Docker container logs. - [X] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: Memory is created by creating a collection when using both Chroma and Milvus ## Actual Behavior: Memory is not added. Silently fails. Receive error from backend: pymilvus.exceptions.MilvusException: <MilvusException: (code=1100, message=Invalid collection open_webui_user-memory-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. , collection name can only contain numbers, letters and underscores: invalid parameter)> ## Description **Bug Summary:** Memories.py creates collections using names that contain dashes. Milvus does not allow dashes so this fails. ## Reproduction Details **Steps to Reproduce:** 1. Configure OpenWebUI to use Milvus instead of Chroma for vector db 2. Add a Memory ## Logs and Screenshots pymilvus.exceptions.MilvusException: <MilvusException: (code=1100, message=Invalid collection open_webui_user-memory-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. , collection name can only contain numbers, letters and underscores: invalid parameter)> ![image](https://github.com/user-attachments/assets/5d59e5dd-ba3c-4aa4-8a97-24766f94a1e3) ## Additional Information I have a proposal for how to fix this and can submit a PR. Instead of setting the collection name with dashes in it multiple times in memories.py, create a function, get_collection_name that returns collection_name but with dashes replaced with underscores if the VECTOR_DB_CLIENT is MilvusClient, otherwise return collection_name as currently implemented to keep backward compatibility.
Author
Owner

@jasonpnnl commented on GitHub (Oct 29, 2024):

I had tested this on a previous version and then saw it was still present in the latest version in memories.py. However, upon further review I can see that there was code added to apps/retrieval/vector/dbs/milvus.py to perform the replacements at that level. Sorry about the false report. I will be more careful checking in the future. This can be closed as it's actually fixed in the latest version.

<!-- gh-comment-id:2445382183 --> @jasonpnnl commented on GitHub (Oct 29, 2024): I had tested this on a previous version and then saw it was still present in the latest version in memories.py. However, upon further review I can see that there was code added to apps/retrieval/vector/dbs/milvus.py to perform the replacements at that level. Sorry about the false report. I will be more careful checking in the future. This can be closed as it's actually fixed in the latest version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#14402