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

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Devin AI 2026-09-19 16:03:42 +00:00
parent 60784c9d8e
commit 8f613511cf

View file

@ -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