From d81d751af0148179019bde294583167f178803ec Mon Sep 17 00:00:00 2001 From: Chesars Date: Wed, 11 Mar 2026 14:50:47 -0300 Subject: [PATCH] fix(tests): update tests to use models still present in pricing JSON Replace removed deprecated models (claude-3-5-sonnet-20241022, claude-3-5-haiku-20241022, claude-3-5-haiku-latest) with current models in web_search and cost calculation tests. --- .../llm_cost_calc/test_llm_cost_calc_utils.py | 4 ++-- tests/test_litellm/test_utils.py | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py b/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py index 91e8da886d3..00c751c6fd0 100644 --- a/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py +++ b/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py @@ -354,7 +354,7 @@ def test_generic_cost_per_token_anthropic_prompt_caching(): def test_generic_cost_per_token_anthropic_prompt_caching_with_cache_creation(): - model = "claude-3-5-haiku-20241022" + model = "claude-haiku-4-5-20251001" usage = Usage( completion_tokens=90, prompt_tokens=28436, @@ -379,7 +379,7 @@ def test_generic_cost_per_token_anthropic_prompt_caching_with_cache_creation(): ) print(f"prompt_cost: {prompt_cost}") - assert round(prompt_cost, 3) == 0.023 + assert round(prompt_cost, 3) == 0.029 def test_string_cost_values(): diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py index 55d5be12f6f..60c218c7f96 100644 --- a/tests/test_litellm/test_utils.py +++ b/tests/test_litellm/test_utils.py @@ -444,9 +444,7 @@ def test_anthropic_web_search_in_model_info(): supported_models = [ "anthropic/claude-4-sonnet-20250514", "anthropic/claude-sonnet-4-5-20250929", - "anthropic/claude-3-5-sonnet-20241022", - "anthropic/claude-3-5-haiku-20241022", - "anthropic/claude-3-5-haiku-latest", + "anthropic/claude-3-7-sonnet-20250219", ] for model in supported_models: from litellm.utils import get_model_info