Skip to main content

Module accounting_fix

Module accounting_fix 

Source
Expand description

Honest token accounting after all delivery-time additions.

Structs§

PostDeliveryAccounting
Honest token accounting that includes all additions and subtractions.
SavingsValidation
Validation of a savings claim against actual delivery data.

Functions§

account_proxy_request
Bridge: compute honest accounting from proxy request data.
compute_honest_accounting
Computes token accounting after kernel and server additions are included.
detect_negative_savings
Returns whether post-compression additions make delivery exceed the input.
format_honest_summary
Formats a privacy-safe summary containing only token counts and ratios.
format_proxy_accounting
Formats a one-line accounting summary suitable for logging.
has_negative_savings
Returns true if the accounting shows negative net savings (kernel adds more tokens than compression removes).
validate_savings
Validates claimed savings against the tokens actually sent to the LLM.