diff --git a/src/index.ts b/src/index.ts index 5dda5ca..807f844 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,6 +27,7 @@ const app = Fastify({ level: "info", redact: ["req.headers.authorization"], // 永不记录密钥 }, + connectionTimeout: 180_000, // 3 min }); await app.register(aiRoutes); diff --git a/src/llm/client.ts b/src/llm/client.ts index 94a6ab1..293ac11 100644 --- a/src/llm/client.ts +++ b/src/llm/client.ts @@ -24,7 +24,7 @@ export function loadConfig(): LlmConfig { apiUrl: process.env.LLM_API_URL ?? "https://api.siliconflow.cn/v1/chat/completions", apiKey: process.env.LLM_API_KEY ?? "", model: process.env.LLM_MODEL ?? "Qwen/Qwen2.5-32B-Instruct", - timeoutMs: Number(process.env.LLM_TIMEOUT_MS ?? 60000), + timeoutMs: Number(process.env.LLM_TIMEOUT_MS ?? 120000), }; }