mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
test(cost): type the cost map fixture parameter on the new tests
This commit is contained in:
parent
001b531ae9
commit
5a7e938f37
2 changed files with 3 additions and 3 deletions
|
|
@ -4725,7 +4725,7 @@ def test_route_image_generation_cost_falls_back_to_requested_size(monkeypatch, r
|
|||
assert cost == expected_cost
|
||||
|
||||
|
||||
def test_generic_cost_per_token_bills_reasoning_nested_in_text_tokens_once(_local_model_cost_map):
|
||||
def test_generic_cost_per_token_bills_reasoning_nested_in_text_tokens_once(_local_model_cost_map: None) -> None:
|
||||
"""
|
||||
Realtime usage (OpenAI and Azure) reports output_tokens == text_tokens + audio_tokens with
|
||||
reasoning_tokens already counted inside text_tokens, so reasoning must not be billed on top.
|
||||
|
|
@ -4757,7 +4757,7 @@ def test_generic_cost_per_token_bills_reasoning_nested_in_text_tokens_once(_loca
|
|||
)
|
||||
|
||||
|
||||
def test_generic_cost_per_token_keeps_billing_reasoning_reported_beside_text_tokens(_local_model_cost_map):
|
||||
def test_generic_cost_per_token_keeps_billing_reasoning_reported_beside_text_tokens(_local_model_cost_map: None) -> None:
|
||||
"""Providers whose text_tokens exclude reasoning (text + reasoning == completion) stay billed in full."""
|
||||
|
||||
model = "gpt-realtime-2.1-mini"
|
||||
|
|
|
|||
|
|
@ -4494,7 +4494,7 @@ def test_batch_cost_calculator_gpt_6_astra_bills_half_the_standard_rate(_local_m
|
|||
assert completion_cost == pytest.approx(500 * 2.5e-5)
|
||||
|
||||
|
||||
def test_handle_realtime_stream_cost_calculation_bills_nested_reasoning_tokens_once(_local_model_cost_map):
|
||||
def test_handle_realtime_stream_cost_calculation_bills_nested_reasoning_tokens_once(_local_model_cost_map: None) -> None:
|
||||
"""Realtime response.done nests reasoning_tokens inside text_tokens, so they are billed once."""
|
||||
results: OpenAIRealtimeStreamList = [
|
||||
{"type": "session.created", "session": {"model": "gpt-realtime-2.1-mini"}},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue