diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts index 89cc6ea..ea7774d 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 = 300 +export const maxDuration = Number(process.env.MAX_DURATION) || 60 // File upload limits (must match client-side) const MAX_FILE_SIZE = 2 * 1024 * 1024 // 2MB diff --git a/env.example b/env.example index 7514843..8bafb9e 100644 --- a/env.example +++ b/env.example @@ -50,3 +50,6 @@ 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)