Z
Zerops4mo ago
minsomai

streaming in zerops

So I'm trying to host the vercel's aisdk demo chat. And after many hours, the issue seems to be zerops side. I've put these two solutions. I need confirmation on what the correct solution is and if there are any other solution other than this. Could be helpful for other devs too.
// nextjs route POST method return value
return createDataStreamResponse({
headers: {
'x-vercel-ai-data-stream': 'v1',
'Transfer-Encoding': 'chunked',
Connection: 'keep-alive',
'X-Accel-Buffering': 'no',
'Content-Type': 'text/plain; charset=utf-8',
},
// nextjs route POST method return value
return createDataStreamResponse({
headers: {
'x-vercel-ai-data-stream': 'v1',
'Transfer-Encoding': 'chunked',
Connection: 'keep-alive',
'X-Accel-Buffering': 'no',
'Content-Type': 'text/plain; charset=utf-8',
},
in zerops.yml
ports:
- port: 3000
httpSupport: true
disableCompression: true
ports:
- port: 3000
httpSupport: true
disableCompression: true
4 Replies
wocis
wocis4mo ago
cc @Jan Saidl
Jan Saidl
Jan Saidl4mo ago
Hi @minsomai , do you have this setup deployed somewhere where I can debug the problem?
minsomai
minsomaiOP4mo ago
yes it is deployed and working for now. kai-personal-trainer-dev service is nodejs
Jan Saidl
Jan Saidl4mo ago
Part of the problem is using shared zerops.app domain, there are restrictions. Did you try using direct access throu domain? If you are using your own domain then you are using project dedicated l7balancer. Where you can change configuration.

Did you find this page helpful?