diff --git a/agent/usage_pricing.py b/agent/usage_pricing.py index 81c50026e..cfd0f88c4 100644 --- a/agent/usage_pricing.py +++ b/agent/usage_pricing.py @@ -649,7 +649,8 @@ def format_token_count_compact(value: int) -> str: text = f"{scaled:.1f}" else: text = f"{scaled:.0f}" - text = text.rstrip("0").rstrip(".") + if "." in text: + text = text.rstrip("0").rstrip(".") return f"{sign}{text}{suffix}" return f"{value:,}"