fix: add .catch() to fire-and-forget stale-flag clear to prevent unhandled rejection

This commit is contained in:
kiranvk2011
2026-04-03 13:42:04 +00:00
committed by Peter Steinberger
parent e8f6ceedd4
commit b36a3a3295

View File

@@ -178,10 +178,12 @@ export function shouldSwitchToLiveModel(params: {
// Current model already matches the persisted selection — the switch has
// effectively been applied. Clear the stale flag so subsequent fallback
// iterations don't re-evaluate it.
void clearLiveModelSwitchPending({
clearLiveModelSwitchPending({
cfg,
sessionKey,
agentId: params.agentId,
}).catch(() => {
/* best-effort — fs/lock errors are non-fatal here */
});
return undefined;
}