diff --git a/ui/src/components/account/flow-viz/account-card.tsx b/ui/src/components/account/flow-viz/account-card.tsx index ac86917b..51f6023f 100644 --- a/ui/src/components/account/flow-viz/account-card.tsx +++ b/ui/src/components/account/flow-viz/account-card.tsx @@ -8,6 +8,7 @@ import { formatResetTime, getClaudeResetTime, getMinClaudeQuota, + getModelsWithExhaustedIndicator, } from '@/lib/utils'; import { PRIVACY_BLUR_CLASS } from '@/contexts/privacy-context'; import { GripVertical, Loader2, Clock, Pause, Play } from 'lucide-react'; @@ -219,12 +220,28 @@ export function AccountCard({

Model Quotas:

- {sortModelsByPriority(quota?.models || []).map((m) => ( -
- {m.displayName || m.name} - {m.percentage}% -
- ))} + {sortModelsByPriority(getModelsWithExhaustedIndicator(quota?.models || [])).map( + (m) => ( +
+ + {m.displayName || m.name} + + + {m.percentage}% + +
+ ) + )} {(() => { const resetTime = getClaudeResetTime(quota?.models || []); return resetTime ? ( diff --git a/ui/src/components/cliproxy/provider-editor/account-item.tsx b/ui/src/components/cliproxy/provider-editor/account-item.tsx index 8126989a..b3b478af 100644 --- a/ui/src/components/cliproxy/provider-editor/account-item.tsx +++ b/ui/src/components/cliproxy/provider-editor/account-item.tsx @@ -35,6 +35,7 @@ import { formatResetTime, getClaudeResetTime, getMinClaudeQuota, + getModelsWithExhaustedIndicator, } from '@/lib/utils'; import { PRIVACY_BLUR_CLASS } from '@/contexts/privacy-context'; import { useAccountQuota, useCliproxyStats } from '@/hooks/use-cliproxy-stats'; @@ -349,10 +350,26 @@ export function AccountItem({

Model Quotas:

- {sortModelsByPriority(quota?.models || []).map((m) => ( + {sortModelsByPriority( + getModelsWithExhaustedIndicator(quota?.models || []) + ).map((m) => (
- {m.displayName || m.name} - {m.percentage}% + + {m.displayName || m.name} + + + {m.percentage}% +
))} {nextReset && ( diff --git a/ui/src/lib/utils.ts b/ui/src/lib/utils.ts index 2927ec67..c9f58ad2 100644 --- a/ui/src/lib/utils.ts +++ b/ui/src/lib/utils.ts @@ -184,3 +184,24 @@ export function getClaudeResetTime< null as string | null ); } + +/** + * Augment models list with synthetic "Exhausted" entry when Claude/GPT models are missing. + * Used for tooltip display to show user that primary models are exhausted (0%). + */ +export function getModelsWithExhaustedIndicator< + T extends { name: string; displayName?: string; percentage: number }, +>(models: T[]): (T | { name: string; displayName: string; percentage: number })[] { + if (models.length === 0) return []; + + const primaryModels = filterPrimaryModels(models); + + // If primary models exist, return as-is + if (primaryModels.length > 0) return models; + + // Primary models exhausted - prepend synthetic entry + return [ + { name: 'claude-exhausted', displayName: 'Claude/GPT (Exhausted)', percentage: 0 }, + ...models, + ]; +}