fix(cliproxy): show clear message for paused accounts in Live Monitor

- Check isAccountPaused() before readAuthData() in fetchAccountQuota()
- Return "Account is paused" instead of confusing "Auth file not found"
- Improves UX by explaining why quota fetch fails for paused accounts
This commit is contained in:
kaitranntt
2026-01-15 12:57:37 -05:00
parent 4d31128b63
commit a931bc9745
+13
View File
@@ -11,6 +11,7 @@ import { getAuthDir } from './config-generator';
import { CLIProxyProvider } from './types';
import {
getProviderAccounts,
isAccountPaused,
setAccountTier,
type AccountInfo,
type AccountTier,
@@ -553,6 +554,18 @@ export async function fetchAccountQuota(
};
}
// Check if account is paused (token moved to auth-paused/ directory)
if (isAccountPaused(provider, accountId)) {
const error = 'Account is paused';
if (verbose) console.error(`[i] ${error}`);
return {
success: false,
models: [],
lastUpdated: Date.now(),
error,
};
}
// Read auth data from auth file
const authData = readAuthData(provider, accountId);
if (!authData) {