Skip to content

undici major upgrade - #123

Closed
generall wants to merge 3 commits into
masterfrom
undici-major-upgrade
Closed

undici major upgrade#123
generall wants to merge 3 commits into
masterfrom
undici-major-upgrade

Conversation

@generall

Copy link
Copy Markdown
Member
  • [AI] version upgrade according to docs/how_to_release.md
  • [AI] add missing timeout parameter for upsert operation
  • [AI] add missing timeout parameter for deletePoints operation
  • audit fix
  • Revert "audit fix"
  • audit fix

giancarloerra pushed a commit to giancarloerra/SocratiCode that referenced this pull request May 12, 2026
Under Node 26+, the very first qdrant request crashes with
`UND_ERR_INVALID_ARG: invalid onError method`. Root cause is a version
mismatch: @qdrant/js-client-rest constructs an undici.Agent from its
pinned undici ^6 and passes it as the dispatcher to Node's built-in
fetch(), which under Node 26 uses a newer undici with stricter
dispatcher-hook validation.

The bug surfaces on the first real codebase_search / codebase_index
call — the MCP handshake succeeds, then everything fails. The error
message gives no hint about Node version, so users on Node 26+ lose
significant time debugging.

This change:
- Adds a runtime pre-flight check at index.ts entry that prints a
  clear actionable error and exits 1. Per ESM the imports below
  evaluate first, but qdrant-js's module init is side-effect-light,
  so exiting at the first top-level statement is enough.
- Tightens engines.node to `>=18.0.0 <26.0.0` so npm/npx warns at
  install time.

Both can be reverted once one of qdrant/qdrant-js#123 (undici major
upgrade) or qdrant/qdrant-js#128 (inject fetch) lands.

Refs: qdrant/qdrant-js#134

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dionlarson pushed a commit to clewbound/SocratiCode that referenced this pull request Jun 26, 2026
Under Node 26+, the very first qdrant request crashes with
`UND_ERR_INVALID_ARG: invalid onError method`. Root cause is a version
mismatch: @qdrant/js-client-rest constructs an undici.Agent from its
pinned undici ^6 and passes it as the dispatcher to Node's built-in
fetch(), which under Node 26 uses a newer undici with stricter
dispatcher-hook validation.

The bug surfaces on the first real codebase_search / codebase_index
call — the MCP handshake succeeds, then everything fails. The error
message gives no hint about Node version, so users on Node 26+ lose
significant time debugging.

This change:
- Adds a runtime pre-flight check at index.ts entry that prints a
  clear actionable error and exits 1. Per ESM the imports below
  evaluate first, but qdrant-js's module init is side-effect-light,
  so exiting at the first top-level statement is enough.
- Tightens engines.node to `>=18.0.0 <26.0.0` so npm/npx warns at
  install time.

Both can be reverted once one of qdrant/qdrant-js#123 (undici major
upgrade) or qdrant/qdrant-js#128 (inject fetch) lands.

Refs: qdrant/qdrant-js#134

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@IvanPleshkov

Copy link
Copy Markdown
Contributor

Done in #159

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.

2 participants