diff --git a/tests/e2e/logging/callback_cost_capture.py b/tests/e2e/logging/callback_cost_capture.py index e835b96317f..95cd434f0bb 100644 --- a/tests/e2e/logging/callback_cost_capture.py +++ b/tests/e2e/logging/callback_cost_capture.py @@ -1,11 +1,3 @@ -"""Config-registered CustomLogger that records the cost each success callback is handed. - -Registered on the e2e gateway as ``callbacks: ["tests.e2e.logging.callback_cost_capture.capture"]``. -Every success event appends one JSON line to ``E2E_CALLBACK_COST_CAPTURE_FILE`` with the request id -and ``standard_logging_object.response_cost`` exactly as a customer's Langfuse, Datadog, or custom -CustomLogger would see it. Tests read the file back and compare against the SpendLogs row. -""" - from __future__ import annotations import json diff --git a/tests/e2e/logging/callback_cost_record.py b/tests/e2e/logging/callback_cost_record.py index 35394fe1108..300f235662b 100644 --- a/tests/e2e/logging/callback_cost_record.py +++ b/tests/e2e/logging/callback_cost_record.py @@ -1,5 +1,3 @@ -"""Capture row shared by callback_cost_capture (proxy side) and the test; must stay importable without litellm.""" - from __future__ import annotations from typing import Final diff --git a/tests/e2e/logging/test_custom_callback_responses_cost_e2e.py b/tests/e2e/logging/test_custom_callback_responses_cost_e2e.py index db40db9ff51..e3d3d97416c 100644 --- a/tests/e2e/logging/test_custom_callback_responses_cost_e2e.py +++ b/tests/e2e/logging/test_custom_callback_responses_cost_e2e.py @@ -1,12 +1,3 @@ -"""The response_cost a config-registered CustomLogger receives must be the cost the spend row bills. - -GitHub issue #41976: a successful sync, non-streaming ``/v1/responses`` call reached callbacks with -``kwargs["standard_logging_object"]["response_cost"] == 0`` while ``LiteLLM_SpendLogs.spend`` for the -same request id was positive. The gateway registers ``callback_cost_capture.capture`` from this -directory as a plain ``callbacks:`` entry, so this is the exact payload a Langfuse, Datadog, or -customer CustomLogger is handed. The capture file path comes from ``E2E_CALLBACK_COST_CAPTURE_FILE``. -""" - from __future__ import annotations import json diff --git a/tests/e2e/logging/test_prometheus_responses_cost_e2e.py b/tests/e2e/logging/test_prometheus_responses_cost_e2e.py index 7bb63a02549..8d293d8f112 100644 --- a/tests/e2e/logging/test_prometheus_responses_cost_e2e.py +++ b/tests/e2e/logging/test_prometheus_responses_cost_e2e.py @@ -1,13 +1,3 @@ -"""The cost a logging callback sees must be the cost the spend row bills. - -GitHub issue #41976: a successful sync ``/v1/responses`` call reached callbacks with -``StandardLoggingPayload.response_cost == 0`` while ``LiteLLM_SpendLogs.spend`` for the -same request id was positive. Prometheus is the callback under test here because its -``litellm_spend_metric`` counter is fed straight from ``standard_logging_object.response_cost`` -and is readable from the proxy itself, so no external sink is needed. A fresh key with one -request makes the per-alias counter equal that request's callback-visible cost. -""" - from __future__ import annotations import json diff --git a/tests/test_litellm/litellm_core_utils/test_litellm_logging.py b/tests/test_litellm/litellm_core_utils/test_litellm_logging.py index 2d58f0038d8..13b3775b7ce 100644 --- a/tests/test_litellm/litellm_core_utils/test_litellm_logging.py +++ b/tests/test_litellm/litellm_core_utils/test_litellm_logging.py @@ -3828,7 +3828,6 @@ def test_process_hidden_params_uses_hidden_params_cost_after_failure_handler_zer def test_process_hidden_params_falls_through_on_none_response_cost(): - """A present-but-None hidden response_cost is priced by the calculator, not logged as 0 (issue #41976).""" from datetime import datetime from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj @@ -3863,7 +3862,6 @@ def test_process_hidden_params_falls_through_on_none_response_cost(): def test_process_hidden_params_explicit_zero_cost_overrides_earlier_cost(): - """An explicit hidden response_cost of 0 wins over a cost already on model_call_details; only None falls through.""" from datetime import datetime from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj @@ -3897,7 +3895,6 @@ def test_process_hidden_params_explicit_zero_cost_overrides_earlier_cost(): def test_process_hidden_params_none_cost_on_fal_poll_stays_unbilled(): - """A Fal result poll hands back image URLs with hidden response_cost=None; the fallthrough must not price them.""" from datetime import datetime from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj