-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix: migrate from LangChain v0.3 to @langchain/textsplitters v1.0 #6152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
|
Claude finished @0xbbjoker's task —— View job PR Review Complete ✅Todo List:
Review Findings✅ APPROVED - Clean LangChain v1 MigrationThis is a well-executed migration with excellent test coverage. All critical requirements are met: Strengths:
Technical Details:
Bundle Size Impact: ✅ Positive - @langchain/textsplitters is smaller than full langchain package Breaking Changes: ✅ None - This is a drop-in replacement maintaining full API compatibility |
|
Claude finished @0xbbjoker's task —— View job Claude Code is reviewing this PR... Todo List:
Review Complete ✅APPROVED - Clean LangChain v1 Migration This is a well-executed migration with excellent test coverage. All critical requirements are met: Strengths: Technical Details:
Bundle Size Impact: ✅ Positive - @langchain/textsplitters is smaller than full langchain package Breaking Changes: ✅ None - This is a drop-in replacement maintaining full API compatibility |
|
Claude finished @0xbbjoker's task —— View job Claude Code is reviewing this PR... Todo List:
Review Complete ✅APPROVED - Clean LangChain v1 Migration This is a well-executed migration with excellent test coverage. All critical requirements are met: Strengths: Technical Details:
Bundle Size Impact: ✅ Positive - @langchain/textsplitters is smaller than full langchain package Breaking Changes: ✅ None - This is a drop-in replacement maintaining full API compatibility
|

This addresses the deprecation of LangChain v0.3 by migrating to the
modular @langchain/textsplitters package which is part of the LangChain v1
ecosystem. The migration maintains full backward compatibility while
reducing bundle size and future-proofing the codebase.
Fixes #6145
#6145 (comment)
Note
Replaces
langchaintext splitter with@langchain/textsplittersv1 in core, updates imports, adds robustsplitChunkstests, and removes old LangChain resolutions from plugin templates.langchainwith@langchain/textsplittersv1; add deps@langchain/coreand@langchain/textsplittersinpackages/core/package.json.packages/core/src/utils.tsto@langchain/textsplittersand adjustsplitChunksimplementation.packages/core/src/__tests__/utils.test.tswith new and edge-case tests forsplitChunks(empty input, large sizes, overlap), validatingRecursiveCharacterTextSplitterusage.langchainresolutions/overrides inpackages/plugin-quick-starter/package.jsonandpackages/plugin-starter/package.json(keepzodresolution).Written by Cursor Bugbot for commit d942536. This will update automatically on new commits. Configure here.