From 399781aaca3c3babff93732c4d1d165d3724efc9 Mon Sep 17 00:00:00 2001 From: adhitShet <131381638+adhitShet@users.noreply.github.com> Date: Fri, 20 Feb 2026 04:46:51 +0400 Subject: [PATCH] fix: remove duplicate comment in orderProfilesByMode (#21409) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 04271651d4fc0eb40f654b2bcb9ac919fbd7b8ab Co-authored-by: adhitShet <131381638+adhitShet@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras --- src/agents/auth-profiles/order.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/agents/auth-profiles/order.ts b/src/agents/auth-profiles/order.ts index 1f7e1439907..405ca081bbb 100644 --- a/src/agents/auth-profiles/order.ts +++ b/src/agents/auth-profiles/order.ts @@ -144,8 +144,7 @@ function orderProfilesByMode(order: string[], store: AuthProfileStore): string[] } } - // Sort available profiles by lastUsed (oldest first = round-robin) - // Then by lastUsed (oldest first = round-robin within type) + // Sort available profiles by type preference, then by lastUsed (oldest first = round-robin within type) const scored = available.map((profileId) => { const type = store.profiles[profileId]?.type; const typeScore = type === "oauth" ? 0 : type === "token" ? 1 : type === "api_key" ? 2 : 3;