From 8d898d8adc51f6c2ff68f3e0ae3b7c9900ec2505 Mon Sep 17 00:00:00 2001 From: Dayuan Jiang <34411969+DayuanJiang@users.noreply.github.com> Date: Sat, 6 Dec 2025 18:04:23 +0900 Subject: [PATCH] fix: revert maxDuration to static value (Next.js requirement) (#121) --- app/api/chat/route.ts | 2 +- env.example | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts index ea7774d..89cc6ea 100644 --- a/app/api/chat/route.ts +++ b/app/api/chat/route.ts @@ -15,7 +15,7 @@ import { } from "@/lib/langfuse" import { getSystemPrompt } from "@/lib/system-prompts" -export const maxDuration = Number(process.env.MAX_DURATION) || 60 +export const maxDuration = 300 // File upload limits (must match client-side) const MAX_FILE_SIZE = 2 * 1024 * 1024 // 2MB diff --git a/env.example b/env.example index 8bafb9e..7514843 100644 --- a/env.example +++ b/env.example @@ -50,6 +50,3 @@ AI_MODEL=global.anthropic.claude-sonnet-4-5-20250929-v1:0 # Access Control (Optional) # ACCESS_CODE_LIST=your-secret-code,another-code - -# API Route Configuration (Optional) -# MAX_DURATION=60 # Max duration in seconds for API routes (default: 60)