diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index fa03af1c7..7c4e9688b 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -1961,11 +1961,6 @@ class Coder: f" ${format_cost(self.total_cost)} session." ) - if self.add_cache_headers and self.stream: - warning = " Use --no-stream for accurate caching costs." - self.usage_report = tokens_report + "\n" + cost_report + warning - return - if cache_hit_tokens and cache_write_tokens: sep = "\n" else: diff --git a/aider/main.py b/aider/main.py index 91b4807a1..9119e4cf7 100644 --- a/aider/main.py +++ b/aider/main.py @@ -568,6 +568,9 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F io = get_io(False) io.tool_warning("Terminal does not support pretty output (UnicodeDecodeError)") + if args.stream and args.cache_prompts: + io.tool_warning("Caching costs may be inaccurate when using --stream.") + # Process any environment variables set via --set-env if args.set_env: for env_setting in args.set_env: