chore(usage): drop Hermes Agent tracking integration

Hermes aggregates all in-process API calls into a single sessions row
with the `model` field locked to the initial model, so the usage
dashboard cannot cleanly surface per-call billing context. Two rounds
of UI workarounds (raw mapping, then `<model> @ <host>` display) did
not resolve the user-facing confusion, so the whole tracking
integration is dropped for now.

Removes session_usage_hermes service (and its 17 tests), sync wiring
in commands/usage.rs and lib.rs, _hermes_session/hermes_session
entries in usage_stats SQL (provider_name_coalesce CASE and
effective_usage_log_filter IN clause), frontend Tab/banner/dropdown/
icon entries, and four i18n keys per locale.

Hermes app integration outside usage tracking (proxy routing,
session manager, config) is preserved. Pre-existing hermes rows in
proxy_request_logs are left as orphans — filtered out by the
updated SQL and never surfaced in the UI.
This commit is contained in:
Jason
2026-04-30 09:16:18 +08:00
parent 7b667f7a44
commit 518d945eb8
12 changed files with 8 additions and 932 deletions
+1 -2
View File
@@ -169,7 +169,6 @@ fn provider_name_coalesce(log_alias: &str, provider_alias: &str) -> String {
WHEN '_session' THEN 'Claude (Session)' \
WHEN '_codex_session' THEN 'Codex (Session)' \
WHEN '_gemini_session' THEN 'Gemini (Session)' \
WHEN '_hermes_session' THEN 'Hermes (Session)' \
ELSE {log_alias}.provider_id END)"
)
}
@@ -190,7 +189,7 @@ pub(crate) fn effective_usage_log_filter(log_alias: &str) -> String {
let proxy_data_source = data_source_expr("proxy_dedup");
format!(
"NOT (
{data_source} IN ('session_log', 'codex_session', 'gemini_session', 'hermes_session')
{data_source} IN ('session_log', 'codex_session', 'gemini_session')
AND EXISTS (
SELECT 1
FROM proxy_request_logs proxy_dedup