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:
1 parent
f729910082
commit
272f604274
8 files changed
+444
-64
No files matched your search
@@ -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)
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user