mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
feat: Improve streaming cost warning display
This commit is contained in:
parent
e559bc8694
commit
f37b814570
2 changed files with 3 additions and 5 deletions
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue