

I find this VERY strange behavior where the streaming for AI works locally, but is being "cut off” in Vercel (production)
- I have tried to use both
edgeruntime andnodejsruntime, both have the same issues - I don’t see any
errorsin the Vercel logs - I remember that this has happened on the past because I forgot to specify the
runtimein myroute.ts, which then I solved it by specifyingedgeruntime- But all sudden this issue re-appeared out of the blue, when I didn’t have any change in the code, nor any deployment since 2 July 2025
- Getting a sense that there’s some change in Vercel platform since that date, which caused this issue
Here’s some more contexts:
- I’m not using AI SDK, I’m using Langchain
- I have enabled the Fluid Compute
- Here’s my
vercel.json
{ "functions": { "app/api/chat/agentic/route.ts": { "maxDuration": 300 }, "app/api/chat/route.ts": { "maxDuration": 60 } }}- Here’s some part of my
route.tswhere I specify the runtime:
export const runtime = 'nodejs'export const maxDuration = 300 // 5 minutes timeout for agent processing- Here’s my
AgentExecutor:
return new AgentExecutor({ agent, tools, returnIntermediateSteps: true, verbose: false, maxIterations: 15, // Reduced from 500 to prevent timeout issues handleParsingErrors: true, earlyStoppingMethod: 'generate', // Stop when the agent generates a final answer });Anyone have experienced similar issue? Any advice on how to solve this? I’m super frustrated, I already asked Vercel Support and they’re useless (I’m on Vercel Pro)



