mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-04 11:43:57 +08:00
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:
@@ -957,10 +957,6 @@ pub fn run() {
|
||||
"Gemini usage initial sync",
|
||||
crate::services::session_usage_gemini::sync_gemini_usage(db),
|
||||
);
|
||||
run_step(
|
||||
"Hermes usage initial sync",
|
||||
crate::services::session_usage_hermes::sync_hermes_usage(db),
|
||||
);
|
||||
|
||||
// 定期同步
|
||||
let mut interval = tokio::time::interval(std::time::Duration::from_secs(
|
||||
@@ -981,10 +977,6 @@ pub fn run() {
|
||||
"Gemini usage periodic sync",
|
||||
crate::services::session_usage_gemini::sync_gemini_usage(db),
|
||||
);
|
||||
run_step(
|
||||
"Hermes usage periodic sync",
|
||||
crate::services::session_usage_hermes::sync_hermes_usage(db),
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user