fix(wechat): fallback manage LLM providers when chat balance is exhausted
Memind CI / Test, build, and release guards (push) Failing after 4m34s

When DeepSeek returns 402, try other chat providers before giving up, and cancel the sole active task only during LLM outages so user 123 can cancel without Goose.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-29 14:02:48 +08:00
parent 5de58af9ed
commit 6db460eb89
4 changed files with 218 additions and 29 deletions
+14
View File
@@ -91,6 +91,20 @@ export async function handleWechatScheduledTaskIntent({
if (decision.action === 'clarify') {
return decision.message;
}
if (decision.llmUnavailable) {
if (tasks.length === 1) {
logger.warn?.(
'[wechat-scheduled-task] outage fallback cancel for single active task',
{ userId: user.userId, taskId: tasks[0].id },
);
const cancelled = await scheduledTaskService.cancelTask({
userId: user.userId,
taskId: tasks[0].id,
});
return formatScheduledTaskCancelReply(cancelled);
}
return '暂时无法连接模型来识别要取消的任务,请稍后再试,或明确说出任务名称。';
}
}
return null;