Merge branch 'Wei-Shaw:main' into main

This commit is contained in:
xueshiji
2026-07-01 14:00:51 +08:00
committed by GitHub
71 changed files with 3620 additions and 1931 deletions
+8 -5
View File
@@ -1303,6 +1303,7 @@ export interface UsageLog {
// User-Agent
user_agent: string | null
ip_address?: string | null
// Cache TTL Override
cache_ttl_overridden: boolean
@@ -1336,9 +1337,6 @@ export interface AdminUsageLog extends UsageLog {
channel_id?: number | null
billing_tier?: string | null
// 用户请求 IP(仅管理员可见)
ip_address?: string | null
// 最小账号信息(仅管理员接口返回)
account?: UsageLogAccountSummary
}
@@ -1481,6 +1479,9 @@ export interface UsageStatsResponse {
total_actual_cost: number // 实际扣除
average_duration_ms: number
models?: Record<string, number>
endpoints?: EndpointStat[]
upstream_endpoints?: EndpointStat[]
endpoint_paths?: EndpointStat[]
}
// ==================== Trend & Chart Types ====================
@@ -1507,7 +1508,7 @@ export interface ModelStat {
total_tokens: number
cost: number // 标准计费
actual_cost: number // 实际扣除
account_cost: number // 账号成本
account_cost?: number // 账号成本(仅管理员接口返回)
}
export interface EndpointStat {
@@ -1525,7 +1526,7 @@ export interface GroupStat {
total_tokens: number
cost: number // 标准计费
actual_cost: number // 实际扣除
account_cost: number // 账号成本
account_cost?: number // 账号成本(仅管理员接口返回)
}
export interface UserBreakdownItem {
@@ -1700,8 +1701,10 @@ export interface UsageQueryParams {
request_type?: UsageRequestType
stream?: boolean
billing_type?: number | null
billing_mode?: string | null
start_date?: string
end_date?: string
timezone?: string
sort_by?: string
sort_order?: 'asc' | 'desc'
}