mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
test_should_have_minimum_models_in_backup
This commit is contained in:
parent
7798de9a85
commit
235fdb35ba
1 changed files with 17 additions and 0 deletions
|
|
@ -216,6 +216,23 @@ class TestGetModelCostMapFallback:
|
|||
assert len(result) > 0
|
||||
|
||||
|
||||
class TestBackupModelCostMapExists:
|
||||
"""Validates the local backup file is always present and valid."""
|
||||
|
||||
def test_should_have_backup_file(self):
|
||||
"""The backup model cost map must exist and be loadable."""
|
||||
backup = GetModelCostMap.load_local_model_cost_map()
|
||||
assert isinstance(backup, dict)
|
||||
assert len(backup) > 0, "Backup model cost map is empty"
|
||||
|
||||
def test_should_have_minimum_models_in_backup(self):
|
||||
"""The backup must contain a reasonable number of models."""
|
||||
backup = GetModelCostMap.load_local_model_cost_map()
|
||||
assert len(backup) > 100, (
|
||||
f"Backup has only {len(backup)} models, expected > 100"
|
||||
)
|
||||
|
||||
|
||||
class TestBadHostedModelCostMap:
|
||||
"""
|
||||
Simulates the hosted model cost map being bad (invalid JSON / corrupted).
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue