Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/web/.sample.env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
AI_GATEWAY_API_KEY=xxx
AI_GATEWAY_API_KEY=xxx
AI_GATEWAY_ENABLED=false
7 changes: 7 additions & 0 deletions apps/web/app/api/prompt-patterns/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down