mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-25 05:54:53 +00:00
test(cost): route per-second regression test through generic provider branch
The new test registered an unprefixed synthetic model name with no custom_llm_provider set, so cost_per_token's provider dispatch resolved it to the OpenAI-specific branch (via get_llm_provider's default) instead of the generic input_cost_per_second fallback the test means to exercise. That made the real cost calculator raise inside model_info lookup, which gets caught and turned into None several layers up, rather than hitting either the buggy 0.0 or the fixed 0.02. Passing custom_llm_provider="custom" explicitly keeps it on the generic branch.
This commit is contained in:
parent
e041806ecb
commit
9f768c35ba
1 changed files with 5 additions and 0 deletions
|
|
@ -265,6 +265,11 @@ class TestPerSecondCostUsesActualDuration:
|
|||
model=model,
|
||||
optional_params={},
|
||||
litellm_params={},
|
||||
# Bypass the explicit per-provider branches in cost_per_token (e.g.
|
||||
# the OpenAI one, which unprefixed model names resolve to by
|
||||
# default) so the lookup reaches the generic input_cost_per_second
|
||||
# fallback this test is exercising.
|
||||
custom_llm_provider="custom",
|
||||
)
|
||||
return logging_obj
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue