diff --git a/src/providers/cost-estimate.ts b/src/providers/cost-estimate.ts index 2671991..a14a61e 100644 --- a/src/providers/cost-estimate.ts +++ b/src/providers/cost-estimate.ts @@ -79,6 +79,7 @@ export function summarize(rows: UsageRow[], billing: BillingState = {}, now: Dat if (day >= weekAgo) { add(out.last7, r, usd); out.daily[day] = (out.daily[day] || 0) + (usd ?? 0); } if (day.startsWith(monthPrefix) || day >= weekAgo) add(bm, r, usd); } + for (const [m, b] of Object.entries(out.byModel)) if (b.calls === 0) delete out.byModel[m]; // 이번 달·7일 밖 모델은 표에서 뺀다 // 앤트로픽 잔액 추산: 사용자가 콘솔에서 확인해 입력한 잔액 − 그 시점 이후 claude 호출의 추산 지출 let anthropic: null | { balance_usd: number; as_of: string; spent_since: number; estimated_balance: number; warn_below_usd: number; low: boolean } = null; if (typeof billing.balance_usd === 'number' && billing.as_of) { diff --git a/web-ui/js/app/settings-provider.js b/web-ui/js/app/settings-provider.js index d8e8df5..1aa3da8 100644 --- a/web-ui/js/app/settings-provider.js +++ b/web-ui/js/app/settings-provider.js @@ -1598,7 +1598,7 @@ async function loadCostPanel() { const d = await api('/api/usage/cost'); totals.innerHTML = ['today:오늘', 'last7:최근 7일', 'month:이번 달'] .map(x => { const [k, label] = x.split(':'); return '' + label + ' ' + _fmtUsd(d[k].usd) + ' · ' + d[k].calls + '회'; }).join(''); - const rows = Object.entries(d.byModel).sort((a, b) => b[1].usd - a[1].usd || b[1].calls - a[1].calls).slice(0, 12); + const rows = Object.entries(d.byModel).filter(([, b]) => b.calls > 0).sort((a, b) => b[1].usd - a[1].usd || b[1].calls - a[1].calls).slice(0, 12); table.innerHTML = '