commercetools / commercetools/mcp-essentials
Migrate langchain example to LangChain v1.x (bundled upgrade required)
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
The langchain example in [\`typescript/examples/langchain\`](https://github.com/commercetools/mcp-essentials/tree/main/typescript/examples/langchain) pins to the 0.3.x line:
\`\`\`json
\"@langchain/core\": \"^0.3.6\",
\"@langchain/openai\": \"^0.3.5\",
\"langchain\": \"^0.3.2\"
\`\`\`
Dependabot keeps proposing individual major bumps (e.g. #57 \`@langchain/openai\` 0.3.5 → 1.4.7) that can't merge in isolation — the 1.x packages share a peer-dep contract on \`@langchain/core@^1\` and the 0.x \`langchain\` umbrella isn't compatible.
## What's needed
A single coordinated PR that:
- [ ] Bumps \`@langchain/core\`, \`@langchain/openai\`, and \`langchain\` together to their 1.x lines
- [ ] Updates [\`typescript/examples/langchain/index.ts\`](https://github.com/commercetools/mcp-essentials/blob/main/typescript/examples/langchain/index.ts) to the 1.x APIs (the \`ChatOpenAI\` constructor is mostly compatible; agent + prompt imports moved between subpackages)
- [ ] Verifies the example still runs end-to-end against a commercetools project
## Notes
- The example dir isn't in \`pnpm-workspace.yaml\` and isn't built/tested in CI, so there's no automated signal — needs manual verification.
- After this lands, Dependabot will be configured to group \`langchain\` + \`@langchain/*\` into a single PR going forward (see the follow-up to \`.github/dependabot.yml\`), so we won't re-hit this fragmentation.
Closes #57 once landed.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in typescript/examples/langchain/index.ts and the example's dependency declarations, then review the LangChain v1.x migration requirements for the agent and prompt imports. Coordinate the @langchain/core, @langchain/openai, and langchain upgrades, update the example, and manually verify it runs end-to-end against a commercetools project.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, api
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100