dify - 💡(How to fix) Fix [Feature]: Add support for Cos Vectors as a new Vector Database provider [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langgenius/dify#35523Fetched 2026-04-24 06:14:12
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
1
Author
Participants
Timeline (top)
labeled ×3
RAW_BUFFERClick to expand / collapse

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

  1. Is your feature request related to a problem? Please describe. Currently, Dify supports various excellent Vector Databases (like Milvus, Qdrant, pgvector). However, for enterprise-level RAG applications with massive document datasets, traditional in-memory or SSD-bound vector databases can become extremely expensive.

There is a growing need for a Serverless, Compute-Storage Decoupled vector database architecture. Users want to leverage Cloud Object Storage (COS/S3) directly for vector storage and retrieval to significantly reduce costs while handling large-scale embeddings, but there is currently no native support for such an object-storage-based VDB in Dify.

  1. Describe the solution you'd like I propose adding support for Cos Vectors as a new built-in Vector Database provider in Dify.

Cos Vectors is a high-performance vector storage engine built directly on top of Object Storage (using concepts similar to S3 Block FileSystem and Iceberg-like manifest indexing) to achieve extreme cost-efficiency and high concurrency without relying on heavy external KV stores.

Expected Integration Path:

Backend Integration: Implement a CosVectors class inheriting from BaseVector in api/core/rag/datasource/vdb/cos_vectors.

Standard Methods: Implement the core lifecycle methods: create, add_texts, search_by_vector, delete, etc.

Configuration: Add required environment variables and configuration models for Object Storage credentials (e.g., Endpoint, Access Key, Secret Key, Bucket Name).

UI/Console: Add the Cos Vectors configuration form to the Dify console (Data Source > Vector Database settings).

3. Describe alternatives you've considered An alternative is using existing supported databases like pgvector or Milvus, but they require provisioning and managing underlying compute/storage instances which do not align with the extreme cost-reduction and pure object-storage architecture that Cos Vectors provides.

  1. Additional context By integrating Cos Vectors, Dify can offer a highly cost-effective RAG storage solution for users managing billions of vector tokens, particularly those who are heavily invested in Cloud Object Storage ecosystems and prefer a decoupled architecture.

  2. Are you willing to submit a PR?

    [x] Yes, I am willing to submit a PR to implement this feature.

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.

extent analysis

TL;DR

Implementing Cos Vectors as a new Vector Database provider in Dify can provide a cost-effective solution for large-scale vector storage and retrieval.

Guidance

  • To integrate Cos Vectors, create a CosVectors class that inherits from BaseVector in api/core/rag/datasource/vdb/cos_vectors and implement standard methods like create, add_texts, search_by_vector, and delete.
  • Add required environment variables and configuration models for Object Storage credentials, such as Endpoint, Access Key, Secret Key, and Bucket Name.
  • Update the Dify console to include a Cos Vectors configuration form in the Data Source > Vector Database settings.
  • Consider the trade-offs between using Cos Vectors and existing supported databases like pgvector or Milvus, which may require more resources but offer alternative benefits.

Example

No code example is provided due to the lack of specific implementation details in the issue.

Notes

The implementation of Cos Vectors as a new Vector Database provider in Dify requires careful consideration of the trade-offs between cost, performance, and complexity. The proposed solution aims to provide a cost-effective solution for large-scale vector storage and retrieval, but may introduce additional complexity in terms of configuration and management.

Recommendation

Apply workaround by implementing Cos Vectors as a new Vector Database provider, as it offers a highly cost-effective RAG storage solution for users managing billions of vector tokens.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING