Skip to content

feat: add Models dashboard tab with rich per-model analytics#17733

Closed
yatesjalex wants to merge 1 commit into
NousResearch:mainfrom
yatesjalex:feat/models-dashboard-tab
Closed

feat: add Models dashboard tab with rich per-model analytics#17733
yatesjalex wants to merge 1 commit into
NousResearch:mainfrom
yatesjalex:feat/models-dashboard-tab

Conversation

@yatesjalex

Copy link
Copy Markdown
Contributor

Adds a Models tab to the left nav with rich per-model analytics cards including token distribution bars, capability badges, cost tracking, and models.dev metadata. New /api/analytics/models endpoint.

- New /models page in left nav (after Analytics)
- New /api/analytics/models endpoint with per-model token/cost/session
  breakdown, cache read/reasoning tokens, tool calls, avg tokens/session,
  and capabilities from models.dev (vision/tools/reasoning/context window)
- Model cards with stacked token distribution bar, capability badges,
  provider badges, cost info, and relative time
- Summary stats bar (models used, total tokens, est. cost, sessions)
- Period selector (7d/30d/90d) with refresh
- i18n support (en + zh)
@yatesjalex yatesjalex force-pushed the feat/models-dashboard-tab branch from 0881a9c to 864a41e Compare April 30, 2026 03:39
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Apr 30, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Merged via #17745 — your commit was cherry-picked onto current main with authorship preserved (e6b05eaf6 on main is still yours). Two small follow-ups on top:

  1. Added AND model != '' to both queries in /api/analytics/models so pre-existing sessions with empty-string model (found ~100+ rows in a production DB) no longer render as blank-header cards.
  2. Dropped the slashIdx < 20 length gate in shortModelName / modelProvider — strip on first / unconditionally so longer vendor prefixes (deepseek-ai/...) also work correctly. Renamed modelProvidermodelVendor to avoid collision with the billing-provider column already on ModelCard.

Live-tested against a real hermes_state.db: 23→22 models, 3374→3267 sessions, 0 blank cards. Capability badges + models.dev metadata resolve correctly.

Thanks for the nice contribution — the card layout + token distribution bar is a real UX improvement over the existing per-model table on the Analytics page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants