MCPcopy
hub / github.com/Aider-AI/aider / show_usage_report

Method show_usage_report

aider/coders/base_coder.py:2102–2126  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2100 return cost
2101
2102 def show_usage_report(self):
2103 if not self.usage_report:
2104 return
2105
2106 self.total_tokens_sent += self.message_tokens_sent
2107 self.total_tokens_received += self.message_tokens_received
2108
2109 self.io.tool_output(self.usage_report)
2110
2111 prompt_tokens = self.message_tokens_sent
2112 completion_tokens = self.message_tokens_received
2113 self.event(
2114 "message_send",
2115 main_model=self.main_model,
2116 edit_format=self.edit_format,
2117 prompt_tokens=prompt_tokens,
2118 completion_tokens=completion_tokens,
2119 total_tokens=prompt_tokens + completion_tokens,
2120 cost=self.message_cost,
2121 total_cost=self.total_cost,
2122 )
2123
2124 self.message_cost = 0.0
2125 self.message_tokens_sent = 0
2126 self.message_tokens_received = 0
2127
2128 def get_multi_response_content_in_progress(self, final=False):
2129 cur = self.multi_response_content or ""

Callers 1

send_messageMethod · 0.95

Calls 2

tool_outputMethod · 0.45
eventMethod · 0.45

Tested by

no test coverage detected