mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-08 03:10:26 +00:00
refactor(billing): call token aggregation directly
This commit is contained in:
parent
67decad7b5
commit
ac07df6a66
1 changed files with 1 additions and 5 deletions
|
|
@ -602,10 +602,6 @@ pub(crate) struct ResolvedAppStateSettings {
|
|||
pub(crate) manifest_run_settings: std::result::Result<RunNamespace, SharedError>,
|
||||
}
|
||||
|
||||
fn accumulate_billed_token_counts(target: &mut BilledTokenCounts, source: &BilledTokenCounts) {
|
||||
target.add_counts(source);
|
||||
}
|
||||
|
||||
fn accumulate_billing_rollup(
|
||||
accumulator: &mut BillingAccumulator,
|
||||
rollup: &fabro_workflow::ProjectionBillingRollup,
|
||||
|
|
@ -618,7 +614,7 @@ fn accumulate_billing_rollup(
|
|||
.entry(model.model.model_id.clone())
|
||||
.or_default();
|
||||
entry.stages += model.stages;
|
||||
accumulate_billed_token_counts(&mut entry.billing, &model.billing);
|
||||
entry.billing.add_counts(&model.billing);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue