diff --git a/litellm/utils.py b/litellm/utils.py index 75de4f333ac..f685d89d842 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -5219,7 +5219,9 @@ def _get_potential_model_names(model: str, custom_llm_provider: str | None) -> P combined_model_name = f"{cost_map_prefix}/{split_model}" elif cost_map_prefix != custom_llm_provider and model.startswith(cost_map_prefix + "/"): split_model = model.split("/", 1)[1] - combined_model_name = model if model.startswith(cost_map_prefix + "/") else f"{cost_map_prefix}/{split_model}" + combined_model_name = ( + model if model.startswith(cost_map_prefix + "/") else f"{cost_map_prefix}/{split_model}" + ) else: split_model = model combined_model_name = f"{cost_map_prefix}/{model}" diff --git a/tests/test_litellm/test_vertex_claude_sonnet5_cost_parity.py b/tests/test_litellm/test_vertex_claude_sonnet5_cost_parity.py index 6a3eb901745..63826b0df45 100644 --- a/tests/test_litellm/test_vertex_claude_sonnet5_cost_parity.py +++ b/tests/test_litellm/test_vertex_claude_sonnet5_cost_parity.py @@ -10,8 +10,6 @@ suffix ``-5`` as a Vertex publish version and rewrote bare ids to from __future__ import annotations -import os - import pytest import litellm