fix(wechat): fallback manage LLM providers when chat balance is exhausted
Memind CI / Test, build, and release guards (push) Failing after 4m34s
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user