From 71f0f2d0d6c97272c9210566b008fa4bbf44aa33 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Wed, 4 Mar 2026 15:07:33 -0800 Subject: [PATCH] address greptile review feedback (greploop iteration 1) --- litellm/litellm_core_utils/litellm_logging.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index 6e5c17ff30a..2cb49a09c5b 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -5221,7 +5221,7 @@ def _enrich_cost_breakdown_with_cache_costs( cost_breakdown = logging_obj.cost_breakdown if cost_breakdown is None: return None - if "cache_read_input_cost" in cost_breakdown: + if "cache_read_input_cost" in cost_breakdown or "cache_write_input_cost" in cost_breakdown: return cost_breakdown try: @@ -5277,7 +5277,9 @@ def _enrich_cost_breakdown_with_cache_costs( cache_creation_cost=cache_creation_rate, ) except Exception: - pass + verbose_logger.debug( + "Failed to enrich cost_breakdown with cache costs", exc_info=True + ) return cost_breakdown