feat(db): add usage tracking schema and types

Add database tables for proxy request logs and model pricing.
Extend Provider and error types to support usage statistics.
This commit is contained in:
YoVinchen
2025-12-03 00:16:40 +08:00
parent d12347d837
commit c0122d717c
22 changed files with 2815 additions and 2 deletions
+11
View File
@@ -0,0 +1,11 @@
//! Proxy Usage Tracking Module
//!
//! 提供 API 请求的使用量跟踪、成本计算和日志记录功能
pub mod calculator;
pub mod logger;
pub mod parser;
pub use calculator::{CostBreakdown, CostCalculator, ModelPricing};
pub use logger::{RequestLog, UsageLogger};
pub use parser::{ApiType, TokenUsage};