chore: optimize Vercel costs by removing analytics and configuring functions (#238)

- Create vercel.json with optimized function settings:
  - Chat API: 512MB memory, 120s timeout
  - Other APIs: 256MB memory, 10s timeout
- Remove @vercel/analytics package and imports
- Reduce chat route maxDuration from 300s to 120s

Expected savings: $2-4/month, keeping costs under $20 included credit
This commit is contained in:
Dayuan Jiang
2025-12-12 16:13:06 +09:00
committed by GitHub
parent aa15519fba
commit e321ba7959
5 changed files with 15 additions and 45 deletions

12
vercel.json Normal file
View File

@@ -0,0 +1,12 @@
{
"functions": {
"app/api/chat/route.ts": {
"memory": 512,
"maxDuration": 120
},
"app/api/**/route.ts": {
"memory": 256,
"maxDuration": 10
}
}
}