hermes-agent/web/src/pages
Teknium f7ad2f1115
feat(dashboard): hide token/cost analytics behind config flag (default off) (#25438)
The Analytics page and the token/cost surfaces on the Models page show
local debug estimates only. They count input+output (and a bar viz adds
cache_read+reasoning, missing cache_write entirely) from successful
main-agent responses that returned a usable usage block.

Excluded silently:
- All auxiliary calls — context compression, title generation, vision,
  session search, web extract, smart approvals, MCP routing, plugin LLM
  access (13 production call sites bypass update_token_counts)
- Provider-side retries, fallback attempts
- Any call whose usage block didn't come back
- cache_write_tokens (column exists in sessions table but not returned
  by /api/analytics/models)

Real-world impact: a user on Kimi K2.6 saw 150K local vs 27M on the
OpenRouter side over the same window. Precise-looking numbers next to
provider billing create false confidence and support load.

This change adds dashboard.show_token_analytics (default False) to gate:
- The Analytics nav item (hidden from sidebar when off)
- The Analytics page (renders an explanation card instead of charts)
- Token bars, totals, cost figures, avg/api_calls on the Models page

The Models page keeps capability metadata (context window, vision,
tools, reasoning), the use-as-main/aux menu, sessions count, and
last-used timestamps when the flag is off.

Set dashboard.show_token_analytics: true in config.yaml to opt back in
to the local debug estimate. Fixing the underlying accounting (issue
#23270) is a separate, larger workstream.

Refs: #23270, #21705
2026-05-13 22:20:25 -07:00
..
AnalyticsPage.tsx feat(dashboard): hide token/cost analytics behind config flag (default off) (#25438) 2026-05-13 22:20:25 -07:00
ChatPage.tsx fix(dashboard): finish resumeId -> resumeParam rename in ChatPage (#21317) 2026-05-07 07:05:03 -07:00
ConfigPage.tsx fix(dashboard): display real config path on Config page 2026-05-12 16:40:10 -07:00
CronPage.tsx fix(dashboard): UI polish — modals, layout, consistency, test fixes 2026-05-12 13:59:22 -04:00
DocsPage.tsx fix(web): force light color-scheme on docs iframe 2026-05-07 04:55:47 -07:00
EnvPage.tsx fix(dashboard): UI polish — modals, layout, consistency, test fixes 2026-05-12 13:59:22 -04:00
LogsPage.tsx fix(dashboard): keep ui imports browser-safe after rebase 2026-04-29 01:47:13 -04:00
ModelsPage.tsx feat(dashboard): hide token/cost analytics behind config flag (default off) (#25438) 2026-05-13 22:20:25 -07:00
PluginsPage.tsx fix(dashboard): UI polish — modals, layout, consistency, test fixes 2026-05-12 13:59:22 -04:00
ProfilesPage.tsx fix(dashboard): UI polish — modals, layout, consistency, test fixes 2026-05-12 13:59:22 -04:00
SessionsPage.tsx fix(dashboard): keep ui imports browser-safe after rebase 2026-04-29 01:47:13 -04:00
SkillsPage.tsx fix(dashboard): keep ui imports browser-safe after rebase 2026-04-29 01:47:13 -04:00