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
This commit is contained in:
Ramez Gaberiel
2026-02-25 10:25:13 -06:00
committed by Gustavo Madeira Santana
parent be82031546
commit 7911e8df71
2 changed files with 2 additions and 6 deletions

1
.gitignore vendored
View File

@@ -111,7 +111,6 @@ Swabble/build/
# Generated protocol schema (produced via pnpm protocol:gen)
dist/protocol.schema.json
.ant-colony/
.ark/
# Eclipse
**/.project

View File

@@ -109,11 +109,6 @@ type ModelFallbackRunResult<T> = {
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<T>(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",
);