fix the same rate_limit default in pi-embedded-runner probe gate

Two more sites in run.ts used "rate_limit" as the null-coalesce
default from resolveProfilesUnavailableReason. Update both to
"unknown" and add "unknown" to the transient cooldown probe
eligibility check so single-provider setups can still recover.
This commit is contained in:
VibhorGautam
2026-03-11 12:26:25 +05:30
committed by Altay
parent 8b8be59532
commit e033dd59a3

View File

@@ -553,7 +553,7 @@ export async function runEmbeddedPiAgent(
resolveProfilesUnavailableReason({
store: authStore,
profileIds,
}) ?? "rate_limit"
}) ?? "unknown"
);
}
const classified = classifyFailoverReason(params.message);
@@ -669,14 +669,15 @@ export async function runEmbeddedPiAgent(
? (resolveProfilesUnavailableReason({
store: authStore,
profileIds: autoProfileCandidates,
}) ?? "rate_limit")
}) ?? "unknown")
: null;
const allowTransientCooldownProbe =
params.allowTransientCooldownProbe === true &&
allAutoProfilesInCooldown &&
(unavailableReason === "rate_limit" ||
unavailableReason === "overloaded" ||
unavailableReason === "billing");
unavailableReason === "billing" ||
unavailableReason === "unknown");
let didTransientCooldownProbe = false;
while (profileIndex < profileCandidates.length) {