chore: Update Langchain to latest version and TypeScript to v5#2253
Merged
caneppelevitor merged 5 commits intostagefrom Feb 25, 2026
Merged
chore: Update Langchain to latest version and TypeScript to v5#2253caneppelevitor merged 5 commits intostagefrom
caneppelevitor merged 5 commits intostagefrom
Conversation
This was referenced Feb 23, 2026
caneppelevitor
approved these changes
Feb 25, 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.
Description
*This PR upgrades the LangChain ecosystem to the latest 1.x versions and adapts the current implementation to align with the new architecture. The following packages were updated:
@langchain/communityto 1.1.16,@langchain/coreto 1.1.26,@langchain/openaito 1.2.8, andlangchainto 1.2.25.TypeScriptwas also updated to 5.3.0, and@langchain/langgraph1.1.5 was added to support the updated ecosystem and future graph-based agent capabilities.Due to structural changes introduced in LangChain v1, several imports were migrated to the
@langchain/classicentrypoints, includingAgentExecutor,createToolCallingAgent,WebBrowser,loadSummarizationChain, andStuffDocumentsChain. This aligns the project with the new modular package organization introduced in the latest versions.Additionally, the agent implementation was updated by replacing
createOpenAIFunctionsAgentwithcreateToolCallingAgent. This change reflects the migration from the legacy OpenAI functions API to the modern tool-calling abstraction used in LangChain v1, ensuring better forward compatibility and adherence to the current recommended architecture.Finally, a temporary
as anycast was introduced when instantiating DynamicStructuredTool. This was necessary to avoid TypeScript deep type instantiation errors (TS2589) caused by complex generic inference in LangChain 1.x.The
@langchain/core@1.1.26upgrade introduced a dependency onansi-styles@6.x, which is ESM-only. Since Jest does not transformnode_modulesby default, this caused aSyntaxErrorin all test suites that imported any@langchainmodule. To fix this, a Yarnresolutionsentry was added to force@langchain/coreto useansi-styles@5.2.0, a CJS-compatible version already present in the project, resolving the conflict without impacting other dependencies.*Related Ticket #2247 #2248 #2249
Type of change
Testing
Provide relevant testing instructions. What scenarios are impacted? What build may be necessary to test this change?
Developer Checklist
General
console.logor related logging is added.Tests
Test IDs
Merge Request Review Checklist