From 14d300ae1691ab3f2164ac71c117c8ef2618931e Mon Sep 17 00:00:00 2001 From: David Long Date: Thu, 9 Apr 2026 15:53:13 -0400 Subject: [PATCH] chore: temp hack to disable ai gateway and avoid charges --- apps/web/.sample.env | 3 ++- apps/web/app/api/prompt-patterns/route.ts | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/web/.sample.env b/apps/web/.sample.env index b91d8d9..b802899 100644 --- a/apps/web/.sample.env +++ b/apps/web/.sample.env @@ -1 +1,2 @@ -AI_GATEWAY_API_KEY=xxx \ No newline at end of file +AI_GATEWAY_API_KEY=xxx +AI_GATEWAY_ENABLED=false \ No newline at end of file diff --git a/apps/web/app/api/prompt-patterns/route.ts b/apps/web/app/api/prompt-patterns/route.ts index 9949e39..b8a488a 100644 --- a/apps/web/app/api/prompt-patterns/route.ts +++ b/apps/web/app/api/prompt-patterns/route.ts @@ -6,6 +6,13 @@ const MODEL_ID = "openai/gpt-5.4-mini"; export const maxDuration = 30; export async function POST(req: Request) { + if (process.env.AI_GATEWAY_ENABLED !== "true") { + return Response.json( + { error: "AI gateway is currently disabled." }, + { status: 503 } + ); + } + const { messages, pattern,