BestCodes I'm curious, what's the abstraction for? Like, why would I use this rather than the AI SDK's built-in tool approval?
NikitaKharya Great question! The AI SDK's built-in tool approval handles the core approve/reject flow really well. agenttrace-ui builds on top of that with two additional layers: 1. **Transparency alongside approval**: The AI SDK provides a clear yes/no approval step. agenttrace-ui adds a more detailed view around that, with a collapsible timeline showing each step the agent took, the reasoning behind it, and the underlying data across multiple visualization modes. The approval step becomes one part of a broader, inspectable workflow. 2. **LLM-driven vs. predefined approval rules:** With the AI SDK, `needsApproval` is typically defined ahead of time for specific tools. agenttrace-ui introduces a more flexible pattern via a universal `confirmAction` tool, where the LLM can decide when to pause based on context. The same mechanism can surface different levels of risk (e.g., low, medium, high) depending on the situation. If your use case is straightforward approval for specific tools, the AI SDK's built-in approach is a great fit. agenttrace-ui is designed for cases where you also want deeper visibility into agent behavior and more context-aware approval decisions.
Pauline P. Narvas Are you talking about the AI SDK? Currently, the `@ai-sdk/azure` provider is specifically designed for Azure OpenAI deployments. While Azure does host models from Anthropic and others, these aren’t accessible through our Azure provider yet. I recommend checking out AI Gateway: https://vercel.com/ai-gateway/models
Kejvi Dema @pawlean - I believe there is confusion. Yes, I am referring to AI Gateway, and yes, I am well aware that Azure is not a provider for the cited models, and that’s the reason I am writing this and requesting/recommending Vercel to add this in their offering.
Pauline P. Narvas I was confused by your initial post, I’ve changed your post to Feedback and will share with our product team. Thank you!
ADALIGO Honestly same here 😅 I’ve been waiting for MCP Apps support too. It feels like a big missing piece, especially now that MCP is getting more powerful. From what I’ve seen 👀 Vercel usually ships fast once things are stable, so maybe this is still being worked on internally for the AI SDK 🤔 Also, this isn’t just a one-off request — I’ve seen multiple discussions about it across GitHub and the community (like the issues opened in January and even on Jan). So there’s clearly real demand building up. What would really help: * native support in the Chat UI * smoother app-to-tool chaining * clearer docs and real examples Right now it feels like the MCP ecosystem is ready, but the SDK isn’t fully catching up yet. Are there any updates from the team on whether MCP Apps support is planned soon, or if there’s an experimental way to start using it already?
BestCodes Since this has been inactive for over a month, I'm sending this message to hopefully bump it back up to the top!
Pauline P. Narvas Sharing with the team again ![]()
Anush Hey @yusuf-eren. I’m from the Qdrant team (anush.shetty@qdrant.com). We’d be happy to help build/maintain this integration for the community. Looking forward to hearing from the Vercel AI SDK team.
Gregor @anush a community plugin would be great, we will be happy to add it to the list of AI SDK community providers: https://ai-sdk.dev/providers/community-providers. The AI SDK does support reranking and embedding, but we do not have a store abstraction built into the AI SDK, that’s currently out of scope. Maybe you can add a guide on how to use Qdrant with AI SDK using your community provider and vector store?
Anush Hey @gr2m I’m a fan of your work on Octokit.js and Semantic Release. Thank you. > but we do not have a store abstraction built into the AI SDK, that’s currently out of scope. I see. Building a plugin without a common abstraction means users won’t have the ability to swap the vector store providers. Like with other components. How about we have examples/guides on how to use the AI SDK with the Qdrant client instead?
Pauline P. Narvas The `NS_BASE_STREAM_CLOSED` error typically occurs when the MCP client connection is closed prematurely. When you're using MCP tools with streaming, the client needs to stay open until the entire response completes, if it closes early, you'll hit this error. Here's what I'd recommend checking: - Make sure your MCP client isn't timing out or disconnecting before the stream finishes - Verify that your connection handling code keeps the client alive throughout the entire streaming response - Check if there are any timeout settings that might be causing the connection to close early Let me know if you have any other questions!
phanithlim Thanks Pauline P. Narvas for the response! I’ve been stuck on this for about 3 days now and still can't resolve it. I was previously using `experimental_createMCPClient`, and it worked perfectly. However, since I updated my code to use the standard `createMCPClient`, I began facing the `NS_BASE_STREAM_CLOSED` issue mentioned above. The connection seems to drop the moment the LLM starts streaming the tool output back to the UI. Since I am using `streamText` with `toUIMessageStreamResponse()`, I suspect the new `createMCPClient` handles transport lifecycles differently, causing it to be garbage collected or closed because the main function scope finishes while the stream is still active. Could you provide an example of the recommended pattern for keeping the `createMCPClient` alive during an asynchronous stream in a Next.js Route Handler? Is there a specific way to bind the client's lifetime to the `toUIMessageStreamResponse` so the transport doesn't close prematurely?