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]

fix(tests): add missing assertions for alias conflict warning and aliases key removal

Chesars18a48d0a0b44
diff --git a/tests/test_litellm/test_model_cost_aliases.py b/tests/test_litellm/test_model_cost_aliases.py
index c6702ab13e4..5e10dd43607 100644
--- a/tests/test_litellm/test_model_cost_aliases.py
+++ b/tests/test_litellm/test_model_cost_aliases.py
@@ -118,6 +118,7 @@ class TestExpandModelAliases:
assert len(result) == 1
assert "model-a" in result
+ assert "aliases" not in result["model-a"]
# ---------------------------------------------------------------------------
@@ -172,6 +173,7 @@ class TestAliasConflicts:
# "shared-alias" should point to model-a (first one wins)
assert "shared-alias" in result
assert result["shared-alias"]["input_cost_per_token"] == 1e-06
+ assert "alias conflict" in caplog.text.lower()
def test_canonical_entry_not_overwritten_by_alias(self):
"""An alias must never overwrite an existing canonical entry's data."""