[Admin][UI] Usage & Spending dashboard (+ platform-AI kill switch)
Why
The visual home of the spend concern: make platform-paid AI cost unmissable and let the operator cut it off.
Scope
- Headline: 30-day platform-paid spend $ with trend.
- Breakdown tables/charts: by provider, by model, by
kind (embedding/summary/translation/chat), by user (top spenders), by agent/instance. Window selector (1/7/30/90 days).
- Clear platform-paid vs BYOK visual split (the platform only pays the platform-paid slice).
- Platform-AI kill switch: a toggle bound to
GET/PUT /v1/admin/settings/platform-ai, with an explicit warning that turning it off makes embeddings/summaries/translation no-op (RAG goes dark) — requires confirm; writes audit.
Acceptance criteria
Relevant code
store/admin/ Usage page; consumes Usage/Spending API + platform-ai settings.
References
- PAS
PlatformAnalyticsPanel.tsx (SVG charts, window selector).
Part of the PAGS Admin Portal epic. Depends on UI scaffold + Usage & Spending API. Directly addresses the "platform should not pay for AI" concern.
[Admin][UI] Usage & Spending dashboard (+ platform-AI kill switch)
Why
The visual home of the spend concern: make platform-paid AI cost unmissable and let the operator cut it off.
Scope
kind(embedding/summary/translation/chat), by user (top spenders), by agent/instance. Window selector (1/7/30/90 days).GET/PUT /v1/admin/settings/platform-ai, with an explicit warning that turning it off makes embeddings/summaries/translation no-op (RAG goes dark) — requires confirm; writes audit.Acceptance criteria
/v1/admin/usage+/v1/admin/spending.Relevant code
store/admin/Usage page; consumes Usage/Spending API + platform-ai settings.References
PlatformAnalyticsPanel.tsx(SVG charts, window selector).Part of the PAGS Admin Portal epic. Depends on UI scaffold + Usage & Spending API. Directly addresses the "platform should not pay for AI" concern.