litellm/tests/local_testing/test_get_model_file.py
2026-09-24 14:10:51 +05:30

22 lines
526 B
Python

import os, sys, traceback
import importlib.resources
import json
import litellm
import pytest
def test_get_model_cost_map():
try:
print(litellm.get_model_cost_map(url="fake-url"))
except Exception as e:
pytest.fail(f"An exception occurred: {e}")
def test_get_backup_model_cost_map():
with importlib.resources.open_text(
"litellm", "model_prices_and_context_window_backup.json"
) as f:
print("inside backup")
content = json.load(f)
print("content", content)