Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test(utils): use a synthetic snapshot date in the dated-to-undated fallback test

Devin AI8f613511cf55
diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py
index b0d3aa951b9..be4e2b6006c 100644
--- a/tests/test_litellm/test_utils.py
+++ b/tests/test_litellm/test_utils.py
@@ -186,14 +186,15 @@ def test_get_model_info_strips_openai_finetune_ids_without_a_custom_suffix(local
@pytest.mark.parametrize(
("model", "custom_llm_provider", "expected_key"),
[
- ("gpt-5.6-luna-2026-07-09", "openai", "gpt-5.6-luna"),
- ("gpt-5.6-luna-2026-07-09", "azure", "azure/gpt-5.6-luna"),
+ ("gpt-5.6-luna", "openai", "gpt-5.6-luna"),
+ ("gpt-5.6-luna", "azure", "azure/gpt-5.6-luna"),
],
)
def test_get_model_info_falls_back_from_dated_snapshot_to_undated_entry(
local_model_cost_map, model, custom_llm_provider, expected_key
):
- info = litellm.get_model_info(model=model, custom_llm_provider=custom_llm_provider)
+ """Uses a far-future snapshot date so the map never grows an exact dated key for it"""
+ info = litellm.get_model_info(model=f"{model}-2099-12-31", custom_llm_provider=custom_llm_provider)
assert info["key"] == expected_key