From ec550faa17b8f50c288af0d5c1757db6ea27c6fc Mon Sep 17 00:00:00 2001
From: Eric-2369 <admin@eri.cx>
Date: Wed, 17 Jul 2024 14:14:00 +0800
Subject: [PATCH] config: not enable edge function deployment across all
 regions

---
 app/api/openai/[...path]/route.ts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/app/api/openai/[...path]/route.ts b/app/api/openai/[...path]/route.ts
index 22ec14ffc34..298f6c672b2 100644
--- a/app/api/openai/[...path]/route.ts
+++ b/app/api/openai/[...path]/route.ts
@@ -84,3 +84,22 @@ export const GET = handle;
 export const POST = handle;
 
 export const runtime = "edge";
+export const preferredRegion = [
+  "arn1",
+  "bom1",
+  "cdg1",
+  "cle1",
+  "cpt1",
+  "dub1",
+  "fra1",
+  "gru1",
+  "hnd1",
+  "iad1",
+  "icn1",
+  "kix1",
+  "lhr1",
+  "pdx1",
+  "sfo1",
+  "sin1",
+  "syd1",
+];