Align usage dashboard with CCSwitch

Filter request logs to model API calls and add request, provider, model, and settings tabs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Opus 5 committed 2026-10-19 19:33:51 +08:00
1 parent f729910082
commit 272f604274
8 files changed
+444 -64

No files matched your search

+2
View File
@@ -38,6 +38,7 @@ func (s *Server) handleResponses(w http.ResponseWriter, r *http.Request) {
rec := recordFrom(r)
if provider.Protocol == config.ProtocolOpenAIResponses {
rec.update(func(e *LogEntry) {
e.Provider = provider.Name
e.Model = model
e.InputTokens = (len(body) + 3) / 4
})
@@ -57,6 +58,7 @@ func (s *Server) handleResponses(w http.ResponseWriter, r *http.Request) {
}
rec.update(func(e *LogEntry) {
e.Provider = provider.Name
e.Model = model
e.InputTokens = responses.EstimateTokens(chatReq)
})