fix(story-summary): stabilize L0 extraction on upstream main

This commit is contained in:
2026-04-02 17:00:00 +08:00
parent 69864d97b5
commit 6601471aac
3 changed files with 31 additions and 25 deletions

View File

@@ -184,7 +184,7 @@ export async function incrementalExtractAtoms(chatId, chat, onProgress, options
// ★ 限流检测:连续失败 N 次后暂停并降速
let consecutiveFailures = 0;
let rateLimited = false;
const RATE_LIMIT_THRESHOLD = 3; // 连续失败多少次触发限流保护
const RATE_LIMIT_THRESHOLD = 6; // 连续失败多少次触发限流保护
const RATE_LIMIT_WAIT_MS = 60000; // 限流后等待时间60 秒)
const RETRY_INTERVAL_MS = 1000; // 降速模式下每次请求间隔1 秒)
const RETRY_CONCURRENCY = 1; // ★ 降速模式下的并发数默认1建议不要超过5
@@ -201,7 +201,7 @@ export async function incrementalExtractAtoms(chatId, chat, onProgress, options
}
try {
const atoms = await extractAtomsForRound(pair.userMsg, pair.aiMsg, floor, { timeout: 20000 });
const atoms = await extractAtomsForRound(pair.userMsg, pair.aiMsg, floor, { timeout: 40000 });
if (extractionCancelled) return;