Skip to content

feat: Adds Qdrant Vector Search#683

Open
Anush008 wants to merge 3 commits into
plastic-labs:mainfrom
Anush008:main
Open

feat: Adds Qdrant Vector Search#683
Anush008 wants to merge 3 commits into
plastic-labs:mainfrom
Anush008:main

Conversation

@Anush008
Copy link
Copy Markdown

@Anush008 Anush008 commented May 14, 2026

Description

This PR adds support for using Qdrant as a vector search provider in Honcho.

Qdrant is an open-source vector search engine built for high-performance and massive-scale.

Testing

I've unit tested this integration against a local Qdrant instance.

Setup

You can run Qdrant with

docker run -p 6333:6333 qdrant/qdrant

Then set,

VECTOR_STORE_TYPE=qdrant
VECTOR_STORE_QDRANT_URL=http://localhost:6333

The dashboard is accessible at http://localhost:6333/dashboard

Summary by CodeRabbit

  • New Features
    • Qdrant is now supported as a vector store backend with configurable connection URL, API key, protocol preferences (gRPC/HTTPS), port, prefix, and request timeout.
  • Documentation
    • Updated docs, examples, and changelog to list Qdrant alongside other supported vector stores and document its configuration.
  • Chores
    • Added the Qdrant client dependency.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b33f1a9c-8527-4ed1-9c40-7ce60b6a9d75

📥 Commits

Reviewing files that changed from the base of the PR and between d369e77 and 06eb3d8.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • CHANGELOG.md
  • README.md
  • docs/changelog/introduction.mdx
  • pyproject.toml
  • src/config.py
✅ Files skipped from review due to trivial changes (4)
  • README.md
  • pyproject.toml
  • docs/changelog/introduction.mdx
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/config.py

Walkthrough

Adds Qdrant as a supported vector store: updates config model and dependency, documents Qdrant options in templates/examples/docs, implements async QdrantVectorStore (upsert/query/delete/close), and wires it into the store factory.

Changes

Qdrant Vector Store Integration

Layer / File(s) Summary
Configuration model and dependency
src/config.py, pyproject.toml
VectorStoreSettings.TYPE includes "qdrant"; adds Qdrant fields (QDRANT_URL, QDRANT_API_KEY, QDRANT_PREFER_GRPC, QDRANT_GRPC_PORT, QDRANT_HTTPS, QDRANT_PREFIX, QDRANT_TIMEOUT). Adds qdrant-client>=1.18.0.
Configuration templates and examples
.env.template, config.toml.example
Updates VECTOR_STORE_TYPE comments to include qdrant and adds commented Qdrant configuration placeholders (URL, API key, gRPC/HTTPS options, prefix, timeout).
QdrantVectorStore implementation
src/vector_store/qdrant.py
New async QdrantVectorStore with deterministic UUIDv5 point IDs, collection provisioning, upsert_many (stores original _id in payload), query (filter support, converts Qdrant score→distance, optional max_distance), delete_many, delete_namespace, and close.
Factory integration
src/vector_store/__init__.py
_create_store_by_type now returns QdrantVectorStore() when configured store type is qdrant.
Documentation and release notes
README.md, CHANGELOG.md, docs/changelog/introduction.mdx, docs/v3/contributing/configuration.mdx
Docs and changelog updated to list qdrant among supported vector stores and document new Qdrant-specific environment variables.

Sequence Diagram(s)

sequenceDiagram
  participant App
  participant QdrantVectorStore
  participant QdrantClient
  App->>QdrantVectorStore: upsert_many(namespace, vectors)
  QdrantVectorStore->>QdrantClient: ensure_collection / upsert Points
  QdrantClient-->>QdrantVectorStore: upsert result / errors
  App->>QdrantVectorStore: query(namespace, embedding, top_k, filters)
  QdrantVectorStore->>QdrantClient: search nearest with filter
  QdrantClient-->>QdrantVectorStore: hits with scores
  QdrantVectorStore-->>App: VectorQueryResult list (score→distance, metadata)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • Rajat-Ahuja1997

Poem

🐇 I nibble on configs, neat and spry,

Qdrant seeds the vectors high,
UUIDs hop in tidy rows,
Nearest neighbors strike a pose,
Hooray — the search field brightly grows!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change—adding Qdrant vector search support—which aligns with all the file modifications across configuration, documentation, dependencies, and core implementation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/vector_store/qdrant.py (1)

20-21: 💤 Low value

Consider documenting the UUID namespace choice.

The function uses uuid.NAMESPACE_DNS to generate deterministic UUIDs. While this works correctly, a brief comment explaining why NAMESPACE_DNS was chosen (or noting that any fixed namespace would work) would help future maintainers understand this is an arbitrary but consistent choice.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/vector_store/qdrant.py` around lines 20 - 21, The helper _point_id uses
uuid.uuid5 with uuid.NAMESPACE_DNS to produce deterministic IDs but lacks
explanation; add a short comment above the _point_id function (or inline)
stating that NAMESPACE_DNS is chosen only as a fixed, arbitrary namespace for
deterministic UUIDv5 generation and that any constant namespace would work, so
maintainers understand the choice (reference: function _point_id).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/vector_store/qdrant.py`:
- Around line 66-138: Add Google-style docstrings to each public method
upsert_many, query, delete_many, delete_namespace, and close in the Qdrant
vector store class: for each method document Args (types and description for
namespace, vectors, embedding, top_k, filters, max_distance, ids), Returns
(e.g., list[VectorQueryResult] or None), and Raises (e.g., VectorStoreError on
failures or any exceptions propagated), and include brief summary line and any
notes about side effects (creates collection in upsert_many, filters applied in
query). Ensure docstrings follow Google style (one-line summary, blank line,
Args/Returns/Raises sections) and reference types used in the file such as
VectorRecord and VectorQueryResult.

---

Nitpick comments:
In `@src/vector_store/qdrant.py`:
- Around line 20-21: The helper _point_id uses uuid.uuid5 with
uuid.NAMESPACE_DNS to produce deterministic IDs but lacks explanation; add a
short comment above the _point_id function (or inline) stating that
NAMESPACE_DNS is chosen only as a fixed, arbitrary namespace for deterministic
UUIDv5 generation and that any constant namespace would work, so maintainers
understand the choice (reference: function _point_id).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6f79ae20-91f2-4cab-a8c9-74563de256f5

📥 Commits

Reviewing files that changed from the base of the PR and between a420264 and 256ed8c.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • .env.template
  • CHANGELOG.md
  • README.md
  • config.toml.example
  • docs/changelog/introduction.mdx
  • docs/v3/contributing/configuration.mdx
  • pyproject.toml
  • src/config.py
  • src/vector_store/__init__.py
  • src/vector_store/qdrant.py

Comment thread src/vector_store/qdrant.py
@Anush008
Copy link
Copy Markdown
Author

Hi @Rajat-Ahuja1997

Just bumping this PR. Please take a look when possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant