You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context of your question
Hi all,
I am having problems with deploying my NextJS app, which is using an API endpoint for chat completions from OpenRouter AI or OpenAI SDK. The API endpoint below worked well on my local, but when I wanted to deploy my app on Cloudflare Pages, the Internal Server Error 500 keeps showing up.
I am suspecting some problems with the Edge runtime compatibility between Cloudflare and NextJS. But I still struggle a lot and can't still figure it out.
I have tried to deploy just a bare simple app which only has the UI and the API on Vercel, but the error Internal Server Error 500 is still there.
Questions & Answers
Context of your question
Hi all,
I am having problems with deploying my NextJS app, which is using an API endpoint for chat completions from OpenRouter AI or OpenAI SDK. The API endpoint below worked well on my local, but when I wanted to deploy my app on Cloudflare Pages, the Internal Server Error 500 keeps showing up.
and the client call is just basic:
I am suspecting some problems with the Edge runtime compatibility between Cloudflare and NextJS. But I still struggle a lot and can't still figure it out.
I have tried to deploy just a bare simple app which only has the UI and the API on Vercel, but the error Internal Server Error 500 is still there.
I also tried to make the API call's base URL through AI gateway of Cloudflare (https://developers.cloudflare.com/ai-gateway/providers/openrouter/), but it is not helping.
Please can someone have a look. Thanks a lot!
The text was updated successfully, but these errors were encountered: