mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
feat(usage): add support for tracking request source in usage records
- Introduced `Source` field to usage-related structs for better origin tracking. - Updated `newUsageReporter` to resolve and populate the `Source` attribute. - Implemented `resolveUsageSource` to determine source from auth metadata or API key.
This commit is contained in:
@@ -14,6 +14,7 @@ type Record struct {
|
||||
Model string
|
||||
APIKey string
|
||||
AuthID string
|
||||
Source string
|
||||
RequestedAt time.Time
|
||||
Detail Detail
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user