mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-06-09 07:42:42 +08:00
feat(usage): add support for detailed token breakdown in usage tracking
- Introduced `CacheReadTokens` and `CacheCreationTokens` to enhance token breakdown. - Refactored `parseClaudeUsageNode` for cleaner and reusable logic. - Adjusted helpers and updated token calculations to align with the new fields.
This commit is contained in:
@@ -34,11 +34,13 @@ type Failure struct {
|
||||
|
||||
// Detail holds the token usage breakdown.
|
||||
type Detail struct {
|
||||
InputTokens int64
|
||||
OutputTokens int64
|
||||
ReasoningTokens int64
|
||||
CachedTokens int64
|
||||
TotalTokens int64
|
||||
InputTokens int64
|
||||
OutputTokens int64
|
||||
ReasoningTokens int64
|
||||
CachedTokens int64
|
||||
CacheReadTokens int64
|
||||
CacheCreationTokens int64
|
||||
TotalTokens int64
|
||||
}
|
||||
|
||||
type requestedModelAliasContextKey struct{}
|
||||
|
||||
Reference in New Issue
Block a user