fix build and test

This commit is contained in:
Ishaan Jaffer 2025-11-15 10:41:15 -08:00
parent c587aeaf3a
commit 2bc122302f
2 changed files with 9 additions and 1 deletions

View File

@ -1156,6 +1156,7 @@ jobs:
pip install "requests-mock>=1.12.1"
pip install "responses==0.25.7"
pip install "pytest-xdist==3.6.1"
pip install "pytest-forked==1.6.0"
pip install "semantic_router==0.1.10"
pip install "fastapi-offline==1.7.3"
- setup_litellm_enterprise_pip

View File

@ -1,9 +1,16 @@
import importlib
import sys
import pytest
@pytest.mark.forked
def test_model_cost_map_url_from_env(monkeypatch):
"""Ensure `LITELLM_MODEL_COST_MAP_URL` env var is picked up on import and used by get_model_cost_map."""
"""
Ensure `LITELLM_MODEL_COST_MAP_URL` env var is picked up on import and used by get_model_cost_map.
This test reloads the litellm module, so it runs in a forked process to avoid
affecting other tests running in parallel.
"""
test_url = "https://example.com/test_model_cost_map.json"
# A minimal model cost map we expect to be loaded