From 6f875f8acf81eaa23d55187cc2f16a1c5e423fe1 Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Fri, 7 Aug 2026 16:42:03 -0300 Subject: [PATCH] fix(combo): replace tab-indented blocks with spaces in #9630 changes The commit for #9630 introduced tab characters instead of 2-space indentation in two blocks (handleComboChat and handleRoundRobinCombo). Tabs in TypeScript cause TS1128 parsing errors because the parser expects consistent space-based indentation. Fix: replace all leading tabs with the proper 2-space indentation level matching the surrounding codebase convention. This restores typecheck:core to a clean state on the release branch. --- open-sse/services/combo.ts | 105 ++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 53 deletions(-) diff --git a/open-sse/services/combo.ts b/open-sse/services/combo.ts index e8fdb613ef..c817296a0e 100644 --- a/open-sse/services/combo.ts +++ b/open-sse/services/combo.ts @@ -2036,35 +2036,34 @@ export async function handleComboChat({ if (setTry < maxSetRetries) continue; // All set retries exhausted — return the final error - if (!lastStatus) { - if (recordedAttempts === 0) { - notifyWebhookEvent("request.failed", { - combo: combo.name, - reason: "ALL_TARGETS_SKIPPED", - latencyMs, - fallbackCount, - }); - return errorResponseWithComboDiagnostics( - 503, - "Service temporarily unavailable: all targets were skipped by pre-dispatch filters", - buildComboDiag("all_targets_skipped"), - { code: "ALL_TARGETS_SKIPPED", type: "service_unavailable" } - ); - } - notifyWebhookEvent("request.failed", { - combo: combo.name, - reason: "ALL_ACCOUNTS_INACTIVE", - latencyMs, - fallbackCount, - }); - recordComboFailure(effectiveSessionId, combo.name); - return errorResponseWithComboDiagnostics( - 503, - "Service temporarily unavailable: all upstream accounts are inactive", - buildComboDiag("all_accounts_inactive"), - { code: "ALL_ACCOUNTS_INACTIVE", type: "service_unavailable" } - ); - } + if (!lastStatus) { + if (recordedAttempts === 0) { + notifyWebhookEvent("request.failed", { + combo: combo.name, + reason: "ALL_TARGETS_SKIPPED", + latencyMs, + fallbackCount, + }); + return errorResponseWithComboDiagnostics( + 503, + "Service temporarily unavailable: all targets were skipped by pre-dispatch filters", + buildComboDiag("all_targets_skipped"), + { code: "ALL_TARGETS_SKIPPED", type: "service_unavailable" } + ); + } + notifyWebhookEvent("request.failed", { + combo: combo.name, + reason: "ALL_ACCOUNTS_INACTIVE", + latencyMs, + fallbackCount, + }); + recordComboFailure(effectiveSessionId, combo.name); + return errorResponseWithComboDiagnostics( + 503, + "Service temporarily unavailable: all upstream accounts are inactive", + buildComboDiag("all_accounts_inactive"), + { code: "ALL_ACCOUNTS_INACTIVE", type: "service_unavailable" } + ); } const status = lastStatus; @@ -3016,30 +3015,30 @@ async function handleRoundRobinCombo({ }); } - if (!lastStatus) { - if (recordedAttempts === 0) { - return new Response( - JSON.stringify({ - error: { - message: "Service temporarily unavailable: all targets were skipped by pre-dispatch filters", - type: "service_unavailable", - code: "ALL_TARGETS_SKIPPED", - }, - }), - { status: 503, headers: { "Content-Type": "application/json" } } - ); - } - return new Response( - JSON.stringify({ - error: { - message: "Service temporarily unavailable: all upstream accounts are inactive", - type: "service_unavailable", - code: "ALL_ACCOUNTS_INACTIVE", - }, - }), - { status: 503, headers: { "Content-Type": "application/json" } } - ); - } + if (!lastStatus) { + if (recordedAttempts === 0) { + return new Response( + JSON.stringify({ + error: { + message: "Service temporarily unavailable: all targets were skipped by pre-dispatch filters", + type: "service_unavailable", + code: "ALL_TARGETS_SKIPPED", + }, + }), + { status: 503, headers: { "Content-Type": "application/json" } } + ); + } + return new Response( + JSON.stringify({ + error: { + message: "Service temporarily unavailable: all upstream accounts are inactive", + type: "service_unavailable", + code: "ALL_ACCOUNTS_INACTIVE", + }, + }), + { status: 503, headers: { "Content-Type": "application/json" } } + ); + } const status = lastStatus; const msg = lastError || "All round-robin combo models unavailable";