#603·Upsonic

feat(vectordb): Add Valkey Search as a vector database provider

Author: MatthiasHowellYoppCreated May 19, 2026Updated May 19, 2026

Summary

Add Valkey Search as a vector database provider, enabling users to store and search vector embeddings using Valkey 9.1+ with the valkey-search module (v1.2).

Motivation

Valkey Search fills a unique niche among the existing 8 vector providers:

  • Ultra-low-latency in-memory vector search — sub-millisecond KNN with 99%+ recall
  • Operational simplicity — many teams already run Valkey for caching/queues; adding vector search avoids deploying a separate vector DB
  • Native hybrid search — combines vector similarity + full-text + tag filtering in a single query
  • Managed offerings — AWS ElastiCache for Valkey includes vector search built-in
  • No existing overlap — none of the current providers (Qdrant, Chroma, FAISS, Pinecone, Milvus, Weaviate, PgVector, SuperMemory) cover this space

Proposed Implementation

New files

  • src/upsonic/vectordb/providers/valkey.pyValkeyProvider implementing BaseVectorDBProvider
  • tests/smoke_tests/vectordb/test_valkey_provider.py — comprehensive smoke tests

Modified files

  • src/upsonic/vectordb/config.py — add ValkeyConfig class
  • src/upsonic/vectordb/__init__.py — add to exports and lazy-import registry
  • pyproject.toml — add valkey = ["valkey-glide>=2.3.1"] optional group, update vectordb umbrella

Client library

Uses valkey-glide (official Valkey client) which is async-native with typed FT.CREATE / FT.SEARCH API.

Features

  • HNSW and FLAT vector indexes
  • Dense (KNN) vector similarity search
  • Full-text search
  • Hybrid search (RRF fusion)
  • Content-based deduplication via chunk_content_hash
  • TAG field filtering
  • Metadata storage and update
  • Cluster mode support
  • Sync + async parity (async-first, sync via base class)

Requirements

  • Valkey 9.1+ with valkey-search module loaded (v1.2+)
  • valkey-glide>=2.3.1

Breaking Change Note

valkey-glide>=2.3.1 requires protobuf>=6.20. The current core dependency pins protobuf>=5.27.2,<6.0.0. This upper bound appears stale (no source code imports protobuf directly; it's a transitive dep of sentry-sdk/opentelemetry which both support protobuf 6.x+). The PR relaxes this to protobuf>=5.27.2.

Testing

24 smoke tests covering all BaseVectorDBProvider abstract methods, both happy and error paths, sync and async. Tested against Valkey 9.1.0-rc1 with search module v1.2.0.