refactor: centralize failover error parsing

This commit is contained in:
Peter Steinberger
2026-01-10 01:25:01 +01:00
parent 82ffcfb181
commit 53ec8e36cb
7 changed files with 98 additions and 58 deletions

View File

@@ -1533,9 +1533,7 @@ export async function runEmbeddedPiAgent(params: {
: false;
// Treat timeout as potential rate limit (Antigravity hangs on rate limit)
const shouldRotate =
(!aborted && (failoverFailure || cloudCodeAssistFormatError)) ||
timedOut;
const shouldRotate = (!aborted && failoverFailure) || timedOut;
if (shouldRotate) {
// Mark current profile for cooldown before rotating