Skip to content

Commit 05c4cc8

Browse files
committed
Configure AI route with edge runtime to fix production buffering timeouts
1 parent 4272697 commit 05c4cc8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

app/api/copilot/route.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
import { NextResponse } from "next/server";
2+
3+
export const runtime = "edge";
4+
export const dynamic = "force-dynamic";
5+
export const maxDuration = 60;
26
import { rateLimit } from "@/lib/rate-limit";
37
import { streamText } from "ai";
48
import { groq } from "@ai-sdk/groq";

0 commit comments

Comments
 (0)