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]

test: use main's local_model_cost_map fixture in tests/unit/conftest.py

yuneng30f307501096
diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py
index 73a555e4455..b3bb19a8b8a 100644
--- a/tests/unit/conftest.py
+++ b/tests/unit/conftest.py
@@ -2,7 +2,6 @@ import os
from collections.abc import Iterator
from typing import Final
-import litellm
import pytest
from pytest_socket import enable_socket, socket_allow_hosts
@@ -23,19 +22,6 @@ AMBIENT_AZURE_CREDENTIAL_ENV_VARS: Final = (
)
-def local_model_cost_map(monkeypatch):
- original_model_cost = litellm.model_cost
- monkeypatch.setenv("LITELLM_LOCAL_MODEL_COST_MAP", "True")
- litellm.model_cost = litellm.get_model_cost_map(url="")
- litellm.get_model_info.cache_clear()
- try:
- yield
- finally:
- litellm.model_cost = original_model_cost
- litellm.get_model_info.cache_clear()
-
-
def _allow_loopback_only() -> None:
socket_allow_hosts(LOOPBACK_HOSTS, allow_unix_socket=True)