mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-18 09:45:23 +00:00
test(logging): drop docstrings that restate the test names
Co-authored-by: onatozmenn <onatozmen44@gmail.com> Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
a11fdf7728
commit
8dd883c827
5 changed files with 0 additions and 32 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue