Vercel AI SDK: How do I make this work with a separate Node JS Backend

Frontend is built using Next JS:

  • I used the older Vercel AI Chatbot template built using AI Vercel SDK (RSC one).
    Link: Next.js AI Chatbot 2.0 - Vercel
  • I am migrating it from RSC to UI SDK.

Backend is multiple services, but frontend is integrating with a Node JS application:

  • This node JS application is using SSE to stream response from the BE to the FE.

The Issue:

  • I want to use the UI capabilities provided by AI SDK, but my AI interactions are happening not directly using things like useAssistant(), but using a Node JS backend.

Question:

  • Does the AI SDK even allow this?
  • Is it worth doing it this way?
  • Are there any similar use-cases that I can refer to resolve my issue?

Please pin point if any extra information is necessary for this.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.