Repository navigation
fix: clear error for incompatible collections, skip points without document - #212
Merged
Merged
Conversation
AstraBert
reviewed
Nov 24, 2026
AstraBert
left a comment
There was a problem hiding this comment.
a few nitpicks, but overall looks good :)
Contributor
Author
|
Thanks @AstraBert for the review, I applied all four requested changes:
|
AstraBert
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: clear error for incompatible collections, skip points without
documentAddresses section 3 of #188. Related to #10.
Supersedes #210. Credit to @FirdowsRahaman, who opened the first fix for the vector check.
Problem
The server assumes every collection was created by itself: a dense vector named after the embedding model (for example
fast-all-minilm-l6-v2, size 384), and points whose payload has adocumentfield. When a tool targets any other collection, the model gets an error that doesn't explain the cause:qdrant-find/qdrant-storeonmaster400 Bad Request: Not existing vector name error: fast-all-minilm-l6-v2400 Bad Request: Vector dimension error: expected dim: 768, got 384documentqdrant-findcrashes withKeyError, and the model only sees'document'The last case also discards the valid results, so a single foreign point breaks every search that returns it.
Changes
Vector check on every call.
findandstorealready checked whether the collection exists on every call. They now fetch the collection info instead (get_collection, still one request) and compare its vectors with the embedding model's vector name and size. On a mismatch, they raiseIncompatibleCollectionErrorwith a message that names both sides and the setting to change:There is no cache, so a collection that is recreated or changed is always checked against its current config.
Points without
documentare skipped.qdrant-findreturns the valid points and adds a note so the model knows the results are incomplete:The skipped points are also logged as a warning.
QdrantConnector.search()returnsSearchResults, alist[Entry]subclass with askippedcount, so code that uses the connector directly keeps working. If a subclass overridessearch()and returns a plain list,qdrant-findtreats the count as 0.Out of scope
Using existing collections with a different vector name or payload format (#10, #78, #98, #119) is a feature request. We are not adding it, since this server is being sunset. This PR only makes the failure clear.
Testing
tests/test_mcp_server.pythroughfastmcp.Client:masterand pass on this branch. Full suite: 54 passed.pre-commit(ruff, ruff-format, isort, and mypy) passes.🤖 Generated with Claude Code