Relax V4 scan timeout and trim output

This commit is contained in:
2569718930@qq.com
2026-04-25 02:58:06 +08:00
parent 2b9e10384e
commit b614778f13
3 changed files with 39 additions and 10 deletions
+4 -3
View File
@@ -5,12 +5,13 @@ import {
} from "@/lib/backend-auth";
const API_BASE = process.env.POLYWEATHER_API_BASE_URL;
const SCAN_AI_PROXY_TIMEOUT_MS = Number(
process.env.POLYWEATHER_SCAN_AI_PROXY_TIMEOUT_MS || "18000",
const SCAN_AI_PROXY_TIMEOUT_MS = Math.max(
35_000,
Number(process.env.POLYWEATHER_SCAN_AI_PROXY_TIMEOUT_MS || "45000") || 45_000,
);
export const dynamic = "force-dynamic";
export const maxDuration = 20;
export const maxDuration = 60;
export async function POST(req: NextRequest) {
if (!API_BASE) {