test(cost): isolate custom rerank pricing from the main map

This commit is contained in:
Joshua Valluru 2026-10-20 16:56:29 -07:00
parent 226afc620a
commit b5a30fcbfa

View file

@ -1022,9 +1022,9 @@ def test_per_query_priced_rerank_deployment_completion_cost_is_nonzero():
router: Final = Router(
model_list=[
{
"model_name": "semantic-ranker-default-004",
"model_name": "semantic-ranker-custom-test",
"litellm_params": {
"model": "vertex_ai/semantic-ranker-default-004",
"model": "vertex_ai/semantic-ranker-custom-test",
"vertex_project": "test-project",
"vertex_location": "us-east5",
},
@ -1033,7 +1033,7 @@ def test_per_query_priced_rerank_deployment_completion_cost_is_nonzero():
]
)
router_model_id: Final = router.model_list[0]["model_info"]["id"]
assert litellm.model_cost["vertex_ai/semantic-ranker-default-004"].get("input_cost_per_query") is None
assert litellm.model_cost["vertex_ai/semantic-ranker-custom-test"].get("input_cost_per_query") is None
response: Final = RerankResponse(
id="vertex_ai_rerank_test",
@ -1043,7 +1043,7 @@ def test_per_query_priced_rerank_deployment_completion_cost_is_nonzero():
cost: Final = completion_cost(
completion_response=response,
model="vertex_ai/semantic-ranker-default-004",
model="vertex_ai/semantic-ranker-custom-test",
custom_llm_provider="vertex_ai",
call_type="arerank",
custom_pricing=True,