feat: 完善使用记录端点可观测性与分布统计

将入站、上游与路径三类端点分布统一到使用记录页的一致化卡片交互中,并补齐端点元数据与统计链路,提升排障与流量分析效率。
This commit is contained in:
Ethan0x0000
2026-03-15 11:26:42 +08:00
parent 6da5fa01b9
commit eefab15958
24 changed files with 878 additions and 37 deletions

View File

@@ -962,6 +962,8 @@ export interface UsageLog {
model: string
service_tier?: string | null
reasoning_effort?: string | null
inbound_endpoint?: string | null
upstream_endpoint?: string | null
group_id: number | null
subscription_id: number | null
@@ -1168,6 +1170,14 @@ export interface ModelStat {
actual_cost: number // 实际扣除
}
export interface EndpointStat {
endpoint: string
requests: number
total_tokens: number
cost: number
actual_cost: number
}
export interface GroupStat {
group_id: number
group_name: string
@@ -1362,6 +1372,8 @@ export interface AccountUsageStatsResponse {
history: AccountUsageHistory[]
summary: AccountUsageSummary
models: ModelStat[]
endpoints: EndpointStat[]
upstream_endpoints: EndpointStat[]
}
// ==================== User Attribute Types ====================