feat: tag Valkey vector store connections with a CLIENT SETINFO lib-name (client_info_tag)
Before Submitting
- I searched open and closed issues and discussions for an existing request.
- I checked whether this already exists on the
devbranch or latest source. - I understand that maintainers want a well-written issue or discussion before any code pull request.
- This request is not a security vulnerability.
Problem
Since the Valkey vector backend landed in #24769, Open WebUI talks to Valkey through two valkey-glide-sync clients built in ValkeyClient.__init__ (backend/open_webui/retrieval/vector/dbs/valkey.py): the query client and the batch-write client.
On the server side those connections announce themselves only as lib-name=GlidePySync, which is what every other GLIDE Python (sync) application sharing that Valkey also sends. The client_name values added after #25090 help in CLIENT LIST, but that is CLIENT SETNAME, a separate field that managed services such as ElastiCache don't record in their logs. So an operator of a shared Valkey or ElastiCache deployment has no reliable way to tell which traffic came from Open WebUI.
Desired Behavior
GLIDE 2.5.2 added a client_info_tag option that appends a tag to the library name it already sends via CLIENT SETINFO LIB-NAME. I'd like Open WebUI to set it:
- add
client_info_tag='open-webui'to bothGlideClientConfigurations inValkeyClient.__init__, next to the existingclient_name, so the server seeslib-name=GlidePySync(open-webui); - move the recommended optional pin from
valkey-glide-sync==2.3.1tovalkey-glide-sync>=2.5.2, since older releases don't have the parameter. It appears in three places: the commented line inpyproject.toml, the commented line inbackend/requirements.txt, and the ImportError hint invalkey.py. The package is not inuv.lock, so the lockfile doesn't change.
client_name stays exactly as it is.
Why This Matters
Anyone running Open WebUI against a shared or managed Valkey, especially ElastiCache, gets connections that are attributable in server-side tooling, without any configuration from them. It's metadata only: no new setting, no new dependency beyond the version floor, and nothing changes for deployments that don't use VECTOR_DB=valkey.
Examples or References
Tested locally against Valkey 9.1.1 (standalone) with the real ValkeyClient from a branch off dev:
$ valkey-cli CLIENT LIST LIB-NAME 'GlidePySync(open-webui)'
id=150 name=open_webui_vector_store_client lib-name=GlidePySync(open-webui)
id=151 name=open_webui_vector_store_batch_client lib-name=GlidePySync(open-webui)The whole change is small; here it is as a reference patch:
--- a/backend/open_webui/retrieval/vector/dbs/valkey.py
+++ b/backend/open_webui/retrieval/vector/dbs/valkey.py
@@ -56,7 +56,7 @@ def _import_glide():
- 'valkey-glide-sync is required when VECTOR_DB=valkey. Install it with: pip install valkey-glide-sync==2.3.1'
+ 'valkey-glide-sync is required when VECTOR_DB=valkey. Install it with: pip install "valkey-glide-sync>=2.5.2"'
@@ -193,6 +193,7 @@ class ValkeyClient(VectorDBBase):
client_name='open_webui_vector_store_client',
+ client_info_tag='open-webui',
@@ -206,6 +207,7 @@ class ValkeyClient(VectorDBBase):
client_name='open_webui_vector_store_batch_client',
+ client_info_tag='open-webui',(plus the two commented pin lines in pyproject.toml and backend/requirements.txt). The option shipped in GLIDE v2.5.2: https://github.com/valkey-io/valkey-glide/releases/tag/v2.5.2
If this looks acceptable, I'm happy to open the PR against dev.
Alternatives or Workarounds
Keep relying on client_name. It's visible in CLIENT LIST, but it isn't captured in ElastiCache logs, which is the gap here. Overriding lib_name entirely would also be possible, but it would drop the GlidePySync base name that identifies the client library, so a tag appended to it is the better fit.
Source: open-webui/open-webui