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 hav
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
Amy Egan Hey Eric, I don't think the docs have automatic language translation. At least I'm not aware of it being a feature, and the docs aren't automatically translated for me when I switch my browser language. Do you have a browser extension or setting that might be automatically translating things for you?
Eric Burel Well my bad if it’s not on Vercel side actually! I’ve noticed that automated translation kicks in more and more in various application so the culprit might be Google Chrome actually. I can’t reproduce systematically, so I’ll try to figure what’s going on more precisely. I wonder if there are ways to prevent these automated localization from the website standpoint though (like forcing to respect the language indicated in the html tags etc. ?), they tend to lead to a terrible user experience in the end. There is this idea that LLMs did solve the problem of automated translation but we are quite
Jacob Paris Hi, it looks like your app isn't importing the javascript bundle You can fix this by adding the import script to your index.html <script type="importmap"> { "imports": { "react": "aistudiocdn.com/react@^19.2.1", "react/": "aistudiocdn.com/react@^19.2.1/", "lucide-react": "aistudiocdn.com/lucide-react@^0.556.0", "@google/genai": "aistudiocdn.com/@google/genai@^1.32.0", "react-dom/": "aistudiocdn.com/react-dom@^19.2.1/", "@vitejs/plugin-react": "aistudiocdn.com/@vitejs/plugin-react@^5.1.2", "vite": "aistudiocdn.com/vite@^7.2.7" } } </script> <script type="module" src="/index.tsx"></script> </hea
2008sebastianvergara 8738 Thank you so much! That was the solution, now it works perfectly
Advlucascavalcante 5287 I was with the same problem, thank you guys! Now solved!!
Anshuman Bhardwaj Hi @drewradcliff, welcome to the Vercel Community! Thanks for taking the initiative and sharing it with the community! I'll also share this with our AI SDK team.
Pauline P. Narvas @drewradcliff Could you give a summary of what the use case could be here for the community? It would be helpful as people go through the community / search on Google :D
Pauline P. Narvas Hey @drewradcliff! Just wanted to check in on your AI SDK model router. Have you had a chance to get any feedback, or do you still need help? Excited to see how it's coming along and what use cases you're thinking about! Thanks for being part of the community!
Pauline P. Narvas For the “stop reason length”, this means your response hit the token limit before completing. Try increasing maxTokens significantly (like 4000+ depending on your model) or switch to a model with a larger context window.
Pauline P. Narvas Hey @tal32123! Just checking in to see if you still need help with your workflow and prompts. Have you found a solution, or is there anything specific you’d like to dive deeper into? Excited to help!
Pauline P. Narvas Thanks for sharing, Steve! This is super useful for everyone building with the AI SDK. Oh, and welcome to the Vercel Community 👋
Stevef24 Thanks Pauline, really appreciate it 😀 I have been a member for quite a while now and posted a few times last year, but I had to take a few months off due to health, but I’m back now and excited to start posting more and being more involved in the community!
system Hi there, sorry that you are facing this issue. You can open a Billing support case from vercel.com/help to get your refund. If you've already opened a case, rest assured our support team will help you as soon as they get to the ticket. Customers on all plan types are welcome to open a new case for any billing issue. Just describe the problem to the AI chat bot and click the “Create Case” button that appears at the bottom of the chat window. The AI will autofill the form based on the info provided. Then, you can review and adjust any info in the form before submitting it to reach our billing e
Amy Egan I don't have any extra credits to give away at the moment 😔 Everyone gets $5 in free credits each month, which you can use for the hackathon or anything else you'd like. You can top up your AI Gateway credits from the dashboard if you'd like too
ashlooz Fixed: Make sure to use the OIDC token rather than the AI Gatway token
Jacob Paris Thanks for sharing your solution!
ashlooz Ok so… that worked for a couple hours and then stopped. Im aware that it expires every 12 hours, but I have not touched any part of the code since changing it and ran into that same error again. If anyone has a solution do let me know.