refactor: 抽离 AI pipeline 与调度共享能力逻辑

This commit is contained in:
fawney19
2026-04-10 01:46:14 +08:00
parent b901a6ffc7
commit 5014e2f5fd
255 changed files with 15057 additions and 3115 deletions
@@ -149,7 +149,7 @@ fn sample_usage_row(
output_tokens: i32,
total_cost_usd: f64,
actual_total_cost_usd: f64,
created_at_unix_secs: i64,
created_at_unix_ms: i64,
) -> StoredRequestUsageAudit {
StoredRequestUsageAudit::new(
id.to_string(),
@@ -185,9 +185,9 @@ fn sample_usage_row(
Some(120),
status.to_string(),
"settled".to_string(),
created_at_unix_secs,
created_at_unix_secs + 1,
Some(created_at_unix_secs + 2),
created_at_unix_ms,
created_at_unix_ms + 1,
Some(created_at_unix_ms + 2),
)
.expect("usage row should build")
.with_cache_input_tokens(15, 5)