-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude Hong Kong Region in Vercel Edge Functions for OpenAI Proxy Support #27
Comments
Hi Hu Wan, Thanks so much for reaching out! Just wanted to explain the situation - while your code looks perfect, and you're absolutely right that deployment would go to HK servers for users in the Asia region, we've run into a small snag. The screening feature you're trying to use is actually part of Vercel's Enterprise tier, which is meant for larger organizations (they typically spend around $50k-200k USD per month 😅). Since you're not on an Enterprise account, the deployment would unfortunately fail. You can find it here:
Looking forward to our next chat! Best |
Thank you for the detailed explanation. I added a single |
Hi Hu Wan, Great news! 🎉 I did some testing on your idea and found something interesting - turns out we can actually specify a single region without an Enterprise account! The limitation only kicks in when we try to deploy to multiple regions. Thanks again for bringing this to our attention - it helped us find a better way forward. Best, |
According to Vercel's documentation on configuring regions for functions, the |
When deploying on Vercel and accessing the proxy API from Hong Kong, users encounter the "OpenAI proxy country, region, or territory not supported" error. This issue arises because Vercel's Edge Functions default to executing in the region closest to the incoming request, which is
hkg1
for Hong Kong.To resolve this, the Vercel edge network region
hkg1
should be explicitly excluded by configuring the function to use only supported regions. This can be done by modifying thepages/api/proxy.ts
file in the repository to include a list of supported regions.StakeVladDracula/pages/api/proxy.ts
Lines 3 to 5 in 44295c9
References:
The text was updated successfully, but these errors were encountered: