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 committed 2026-01-15 12:57:37 -05:00
1 parent 4d31128b63
commit a931bc9745
1 file changed
+13
+13
View File
@@ -11,6 +11,7 @@ import { getAuthDir } from './config-generator';
import { CLIProxyProvider } from './types'; import { CLIProxyProvider } from './types';
import { import {
getProviderAccounts, getProviderAccounts,
isAccountPaused,
setAccountTier, setAccountTier,
type AccountInfo, type AccountInfo,
type AccountTier, 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 // Read auth data from auth file
const authData = readAuthData(provider, accountId); const authData = readAuthData(provider, accountId);
if (!authData) { if (!authData) {