commercetools / commercetools/mcp-essentials
Migrate ai-sdk example to Vercel AI SDK v6 (bundled upgrade required)
- Dominant language
- TypeScript
- Stars
- 13
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
The ai-sdk example in [\`typescript/examples/ai-sdk\`](https://github.com/commercetools/mcp-essentials/tree/main/typescript/examples/ai-sdk) pins to the 4.x line of the Vercel AI SDK and the 0.0.x line of \`@ai-sdk/openai\`:
\`\`\`json
\"@ai-sdk/openai\": \"^0.0.63\",
\"ai\": \"^4.1.54\"
\`\`\`
Dependabot keeps proposing isolated major bumps (e.g. #61 \`ai\` 4.1.54 → 6.0.190) that can't merge in isolation:
- AI SDK 5.0 was a deliberate breaking redesign of the message format and tool-calling APIs
- AI SDK 5+ requires \`@ai-sdk/openai@^2\` (the example pins ^0.0.63), so bumping only \`ai\` produces an unresolvable peer graph
- The example uses \`generateText({...})\` 6 times — the surface changed (tools shape, prompt ↔ messages, result fields, stopWhen patterns)
## What's needed
A single coordinated PR that:
- [ ] Bumps \`ai\` and \`@ai-sdk/openai\` together (likely \`ai@^6\` + \`@ai-sdk/openai@^3\` — confirm latest peer contract)
- [ ] Rewrites [\`typescript/examples/ai-sdk/index.ts\`](https://github.com/commercetools/mcp-essentials/blob/main/typescript/examples/ai-sdk/index.ts) against the AI SDK 5/6 API (typed tools, messages array, stopWhen, renamed result fields)
- [ ] Verifies the example still runs end-to-end against a commercetools project
## References
- [AI SDK 5.0 migration guide](https://ai-sdk.dev/docs/migration-guides/migration-guide-5-0)
- [AI SDK changelog](https://github.com/vercel/ai/releases)
## 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 \`ai\` + \`@ai-sdk/*\` into a single PR going forward.
Closes #61 once landed.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.