mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
fix(billing): avoid double counting cache read in OpenAI cache hit context
This commit is contained in:
@@ -113,10 +113,7 @@ struct ExpectedUsagePricing {
|
||||
|
||||
impl ExpectedUsagePricing {
|
||||
fn total_tokens(self) -> u64 {
|
||||
self.input_tokens
|
||||
.saturating_add(self.output_tokens)
|
||||
.saturating_add(self.cache_creation_tokens)
|
||||
.saturating_add(self.cache_read_tokens)
|
||||
self.input_tokens.saturating_add(self.output_tokens)
|
||||
}
|
||||
|
||||
fn cache_creation_uncategorized_tokens(self) -> u64 {
|
||||
|
||||
Reference in New Issue
Block a user