diff --git a/src/commands/form/_ai.ts b/src/commands/form/_ai.ts index 3cf3e52..111aea9 100644 --- a/src/commands/form/_ai.ts +++ b/src/commands/form/_ai.ts @@ -208,17 +208,12 @@ export async function callAiForm(keyword: string): Promise { return await callSswAiRepair(keyword, 'NCPF 429 retry exhausted') } - // 场景 A: 后端错误 (SYS181 / 截断 / 转换失败) → fallback SSW - // v0.15+ 修复 (2026-07-02 audit FINDING-F1): 删 'json'/'parse' 子串 (过宽, 误判正常错误) - // 保留: 'sys181' (截断特征) / '响应缺' (NCPF 静默截断) / '转换失败' (LLM 输出无法序列化) + // 场景 A: NCPF 错误 → fallback SSW + // v0.15+ (2026-07-03): 所有非 200 都走 SSW, 不再区分截断类型 + // NCPF 配了 AI 会用, 没配就 fail — SSW 自己有 DeepSeek, 不需要 NCPF if (r.code !== 200) { - const m = (r.msg || '').toLowerCase() - const isTruncationErr = ['sys181', '转换失败', '响应缺'].some(s => m.includes(s)) - if (isTruncationErr) { - log.warn(`! jnpf 后端 AI 建表失败 (code=${r.code}): ${r.msg} → fallback SSW 修复`) - return await callSswAiRepair(keyword, 'jnpf 后端错误') - } - throw new Error(`AI 建表失败 (code=${r.code}): ${r.msg}`) + log.warn(`! NCPF AI 建表失败 (code=${r.code}): ${r.msg} → fallback SSW 修复`) + return await callSswAiRepair(keyword, 'NCPF 错误') } // 场景 B: 静默截断 (code=200 但 data 空) → fallback SSW