mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-21 00:21:49 +00:00
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:
parent
60784c9d8e
commit
8f613511cf
1 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue