mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-08 06:54:24 +00:00
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:
committed by
Gustavo Madeira Santana
parent
be82031546
commit
7911e8df71
1
.gitignore
vendored
1
.gitignore
vendored
@@ -111,7 +111,6 @@ Swabble/build/
|
||||
# Generated protocol schema (produced via pnpm protocol:gen)
|
||||
dist/protocol.schema.json
|
||||
.ant-colony/
|
||||
.ark/
|
||||
|
||||
# Eclipse
|
||||
**/.project
|
||||
|
||||
@@ -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",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user