Skip to content

chore: update langchain dependencies to v1.0.0#4353

Merged
whysosaket merged 2 commits intomainfrom
fix/langchain-v1-peer-dependency
Mar 16, 2026
Merged

chore: update langchain dependencies to v1.0.0#4353
whysosaket merged 2 commits intomainfrom
fix/langchain-v1-peer-dependency

Conversation

@kartik-mem0
Copy link
Copy Markdown
Contributor

The mem0ai npm package declares @langchain/core: "^0.3.44" as a peer dependency. The semver range ^0.3.44 resolves to >=0.3.44 <0.4.0, which excludes @langchain/core@1.x. Since LangChain JS
officially released v1 (now at v1.1.32), users installing mem0ai alongside @langchain/core@^1.x get npm ERESOLVE errors.

This updates the peer dependency from ^0.3.44 to ^1.0.0.

No source code changes needed — all existing @langchain/core subpath imports (/messages, /embeddings, /vectorstores, /documents, /language_models/base, /memory) were verified to exist in v1.
Python SDK was also verified and requires no changes — all current import paths work with langchain==1.2.12.

Fixes #3793

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Test Script (please provide)

Reproduced original bug with published mem0ai@2.4.0:
npm error ERESOLVE unable to resolve dependency tree
npm error peer @langchain/core@"^0.3.44" from mem0ai@2.4.0

Verified fix:

  • @langchain/core@1.1.5 satisfies ^1.0.0 — PASS
  • @langchain/core@1.1.32 satisfies ^1.0.0 — PASS
  • @langchain/core@2.0.0 rejected by ^1.0.0 — PASS (correctly excluded)
  • tsup build (CJS + ESM + DTS) passes
  • All 6 @langchain/core subpath exports verified to exist in v1.1.32
  • Python SDK tested with langchain==1.2.12 — all imports work, no changes needed

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

Maintainer Checklist

@whysosaket whysosaket merged commit 11a7d83 into main Mar 16, 2026
3 checks passed
jamebobob pushed a commit to jamebobob/mem0-vigil-recall that referenced this pull request Mar 29, 2026
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.

Langchain v1 is not supported with current mem0 version

2 participants