mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-05 07:37:50 +00:00
test(proxy): type the unpriceable stream bills as floats
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
9ef0b5569e
commit
68af9f061c
1 changed files with 2 additions and 2 deletions
|
|
@ -65,8 +65,8 @@ def test_a_zero_bill_replaces_the_upstream_cost() -> None:
|
|||
assert billed.usage is not None and billed.usage.cost == 0.0
|
||||
|
||||
|
||||
@pytest.mark.parametrize("bill", [None, -0.001, float("nan"), float("inf"), True])
|
||||
def test_an_unpriceable_stream_keeps_the_upstream_cost(bill: float | bool | None) -> None:
|
||||
@pytest.mark.parametrize("bill", [None, -0.001, float("nan"), float("inf")])
|
||||
def test_an_unpriceable_stream_keeps_the_upstream_cost(bill: float | None) -> None:
|
||||
chunk: Final = _usage_chunk(UPSTREAM_COST)
|
||||
|
||||
assert with_client_stream_usage_cost(chunk, lambda _reply: bill) is chunk
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue