Skip to content

chore(deps): upgrade langchain dependencies to v1.x#18

Open
sf-sahil-jassal wants to merge 8 commits intomainfrom
GH-17
Open

chore(deps): upgrade langchain dependencies to v1.x#18
sf-sahil-jassal wants to merge 8 commits intomainfrom
GH-17

Conversation

@sf-sahil-jassal
Copy link
Copy Markdown
Contributor

Summary

  • Upgrade 13 langchain packages from 0.3.x/0.4.x to latest 1.x versions (@langchain/core, @langchain/community, @langchain/langgraph, langchain, all provider packages, @langfuse)
  • Fix breaking API changes: MemoryVectorStore moved to @langchain/classic, trimMessages tokenCounter signature, message type narrowing, and Messages type
  • Export LangGraphRunnableConfig from graphs/types.ts for downstream consumers
  • All 190 tests passing, lint clean

Consuming services impact

  • reporting-service and resource-management-service in biz-book-api also need their langchain deps upgraded to matching 1.x versions to avoid duplicate @langchain/core resolution

@sf-sahil-jassal sf-sahil-jassal force-pushed the GH-17 branch 2 times, most recently from a1d2c2a to 1f50ff2 Compare April 13, 2026 15:39
…lity

Upgrade 13 langchain packages from 0.3.x/0.4.x to latest 1.x versions:
- @langchain/core, @langchain/community, @langchain/langgraph, langchain
- All provider packages (@langchain/openai, @Anthropic, @aws, etc)
- @langfuse packages to v5.x

Fix type compatibility in chat graph nodes:
- Change MemoryVectorStore import path to @langchain/classic/vectorstores/memory
- Update message type handling to use SavedMessage union instead of BaseMessage
- Adjust trimMessages tokenCounter signature
- Export LangGraphRunnableConfig from graphs/types.ts
- Fix run-tool.node optional chaining for tool_calls check

Co-authored-by: opencode <opencode-agent[bot]@users.noreply.github.com>
@sf-sahil-jassal
Copy link
Copy Markdown
Contributor Author

This PR is built on top of #15

- Create OpenRouter provider with static createInstance() factory
- Add env vars: OPENROUTER_MODEL, OPENROUTER_API_KEY, OPENROUTER_TEMPERATURE, OPENROUTER_BASE_URL
- Update LLMProviderType union to include ChatOpenRouter
- Add package.json exports and typesVersions entries

Co-authored-by: opencode <opencode-agent[bot]@users.noreply.github.com>
Comment thread package.json Outdated
Comment thread package.json Outdated
Comment thread package.json Outdated
"tar": "7.5.12",
"minimatch": "10.2.4",
"undici": "6.24.1",
"@loopback/context": {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these overrides are needed ?

Comment thread package.json
"node-forge": "1.4.0",
"validator": "13.15.22",
"axios": "1.13.6",
"axios": "1.15.0",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

caret missing

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is inside overrides

Comment thread package.json Outdated
"@types/node": "^25.6.0",
"commitizen": "^4.3.1",
"cz-format-extension": "1.5.0",
"cz-format-extension": "1.6.0",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

caret is missing here as well

Comment thread package.json Outdated
"commitizen": "^4.3.1",
"cz-format-extension": "1.5.0",
"cz-format-extension": "1.6.0",
"db-migrate": "^1.0.0-beta.21",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these are not upgraded...

@vinaygupta-sourcefuse vinaygupta-sourcefuse force-pushed the GH-17 branch 4 times, most recently from cd20d1a to 6fb556c Compare April 17, 2026 11:01
@sonarqubecloud
Copy link
Copy Markdown

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.

3 participants