chore: bump @qdrant/js-client-rest to latest (pinned) and validate against a current Qdrant image
Context
@qdrant/js-client-rest 1.19.0 removed client.search() and raised its Node engine floor to >=22. Because the desktop bundler installs the merged server deps without a lockfile, ^1.9.0 floated to 1.19.0 and broke every Qdrant retrieval with TypeError: e.search is not a function (#6270). Docker and dev installs stayed on 1.9.0 via yarn.lock.
The immediate fix pins the client to exact 1.18.0, the last release that still ships search() and supports Node 18 (branch fix/pin-qdrant-client). That is a stopgap. Qdrant has removed the search family from the client and will eventually drop the legacy REST endpoints server-side.
Task
Bump @qdrant/js-client-rest to the latest release, keep it pinned to an exact version (no caret range), and validate the provider end to end against a current Qdrant server image.
Code changes
- Migrate
similarityResponseinserver/utils/vectorDbProviders/qdrant/index.jsfromclient.search(ns, { vector, ... })toclient.query(ns, { query, ... })and unwrap{ points }. #6287 has a working version of this change and a mocked regression test that can be reused. - Audit the rest of the provider for anything else the new client removed or renamed. Methods currently used:
api,count,createCollection,delete,deleteCollection,getCollection,getCollections,upsert. All exist in 1.19.0, but re-check against whatever version is chosen. - Add a test that requires the real
@qdrant/js-client-restand assertstypeof QdrantClient.prototype.query === "function", so a lockfile/code mismatch fails CI instead of surfacing at runtime. - Pin the version exactly in
server/package.jsonand regenerateserver/yarn.lock.
Blockers to resolve first
- Node floor. 1.19.0 declares
engines.node >= 22and depends onundici@7. The Docker image installs Node 18.x, and Dockeryarn installwill refuse without an engines override. - Check the client's compatibility warning against the target server version. It warns when the minor version differs by more than 1. The warning is intentional and should stay; just make sure the pinned client and the Qdrant image we test against are within range.
Validation
Run against a current qdrant/qdrant Docker image, and ideally a Qdrant Cloud instance:
- Create workspace, embed a document, confirm the collection and vector count appear in the workspace Vector Database tab.
- Chat, Query, and Agent mode each return chunks. Check the Qdrant server log shows
POST /collections/<ns>/points/query. - Delete a document and confirm the vectors are removed.
- Reset the vector DB and confirm collections are dropped.
- Confirm the desktop bundle (
combineModules.mjs) resolves the pinned version and does not float.
References
- #6270 (bug report)
- #6287 (contributor PR with the
query()migration, superseded by the pin) - Qdrant JS client 1.19.0 changelog: REST client dropped
search,searchBatch,searchPointGroups,recommend*,discover*in favor ofquery,queryBatch,queryGroups.
Source: Mintplex-Labs/anything-llm