diff --git a/lib/crewai/src/crewai/types/usage_metrics.py b/lib/crewai/src/crewai/types/usage_metrics.py index 56e56666f..7d58a47b3 100644 --- a/lib/crewai/src/crewai/types/usage_metrics.py +++ b/lib/crewai/src/crewai/types/usage_metrics.py @@ -120,12 +120,9 @@ class UsageMetrics(BaseModel): reconciling here, ``prompt_tokens`` and ``total_tokens`` undercount billed usage on cached Anthropic workloads. """ - return ( - "input_tokens" in usage_data - and ( - "cache_read_input_tokens" in usage_data - or "cache_creation_input_tokens" in usage_data - ) + return "input_tokens" in usage_data and ( + "cache_read_input_tokens" in usage_data + or "cache_creation_input_tokens" in usage_data ) @staticmethod