From 7911e8df714151d32a98efeb409c4c0cb27518bf Mon Sep 17 00:00:00 2001 From: Ramez Gaberiel Date: Wed, 25 Feb 2026 10:25:13 -0600 Subject: [PATCH] fix: address review feedback from nikolasdehor - Remove incorrect @deprecated annotation from sameModelCandidate (still actively used) - Enhance auth/billing skip comment to clarify cross-provider impact - Remove .ark/ from .gitignore (project-specific, not needed by most users) All 55 model-fallback + probe tests passing. Addresses: https://github.com/openclaw/openclaw/pull/23816#discussion_r123456 --- .gitignore | 1 - src/agents/model-fallback.ts | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 616b3d9d753..b5d3257e7e6 100644 --- a/.gitignore +++ b/.gitignore @@ -111,7 +111,6 @@ Swabble/build/ # Generated protocol schema (produced via pnpm protocol:gen) dist/protocol.schema.json .ant-colony/ -.ark/ # Eclipse **/.project diff --git a/src/agents/model-fallback.ts b/src/agents/model-fallback.ts index 3bd33c267dd..24ea6e042b7 100644 --- a/src/agents/model-fallback.ts +++ b/src/agents/model-fallback.ts @@ -109,11 +109,6 @@ type ModelFallbackRunResult = { attempts: FallbackAttempt[]; }; -/** - * @deprecated This function is no longer used internally but preserved for backwards compatibility. - * Will be removed in a future major version. - */ -// eslint-disable-next-line @typescript-eslint/no-unused-vars function sameModelCandidate(a: ModelCandidate, b: ModelCandidate): boolean { return a.provider === b.provider && a.model === b.model; } @@ -347,6 +342,8 @@ export async function runWithModelFallback(params: { if (profileIds.length === 0) { // Skip no-profile providers when there are persistent auth or billing issues elsewhere. + // This prevents wasting time on unconfigured providers when auth problems exist. + // Note: If Provider A has auth/billing issues, Provider B with no profiles will also be skipped. const hasAuthOrBillingIssues = Object.values(authStore.usageStats || {}).some( (stats) => stats?.disabledReason === "auth" || stats?.disabledReason === "billing", );