pankajastro commented on code in PR #74277:
URL: https://github.com/apache/airflow/pull/74277#discussion_r4191826111


##########
providers/common/ai/tests/unit/common/ai/utils/test_logging.py:
##########
@@ -281,20 +281,37 @@ def test_cost_set_logs_cost_line_with_plain_decimal(self):
 
 class TestFormatUsageForXcom:
     def test_builds_expected_dict_shape(self):
-        usage = RunUsage(requests=3, tool_calls=1, input_tokens=10, 
output_tokens=5, cost=Decimal("0.25"))
+        usage = RunUsage(
+            requests=3,
+            tool_calls=1,
+            input_tokens=10,
+            output_tokens=5,
+            cache_read_tokens=4,
+            cache_write_tokens=2,
+            cost=Decimal("0.25"),
+        )
 
         assert format_usage_for_xcom(usage) == {
             "requests": 3,
             "input_tokens": 10,
             "output_tokens": 5,
             "total_tokens": 15,
             "tool_calls": 1,
+            "cache_read_tokens": 4,
+            "cache_write_tokens": 2,
             "cost": "0.25",
         }
 
     def test_none_cost_stays_none_not_stringified(self):
         assert format_usage_for_xcom(RunUsage(cost=None))["cost"] is None
 
+    def test_zero_cache_tokens_are_still_pushed(self):

Review Comment:
   Removed test



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to