fix: Remove double-counting of cached tokens in token calculation

This commit is contained in:
Paul Gauthier (aider) 2024-11-11 17:19:11 -08:00
parent 550c8322c4
commit 2e97fcc47f

View file

@ -1603,7 +1603,6 @@ class Coder:
completion.usage, "cache_creation_input_tokens"
):
self.message_tokens_sent += prompt_tokens
self.message_tokens_sent += cache_hit_tokens
self.message_tokens_sent += cache_write_tokens
else:
self.message_tokens_sent += prompt_tokens