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: trim the PROXY_BASE_URL fixture and regression docstrings

mateo-berri9ef6a8826da5
diff --git a/tests/test_litellm/conftest.py b/tests/test_litellm/conftest.py
index 0e561301058..c0644c88291 100644
--- a/tests/test_litellm/conftest.py
+++ b/tests/test_litellm/conftest.py
@@ -102,13 +102,7 @@ def isolate_host_aws_config(monkeypatch, isolated_aws_credentials_dir):
@pytest.fixture(scope="function", autouse=True)
def isolate_host_proxy_base_url(monkeypatch):
- """Prevent a host PROXY_BASE_URL from outranking request-derived URLs during unit tests.
-
- It is the first thing the proxy consults when it resolves its own public origin, so a value
- left in the developer's shell or .env silently replaces the base_url every OAuth discovery,
- redirect_uri, and registration assertion is written against. Tests that exercise a configured
- public origin set it within their own body, which still wins over this.
- """
+ """Prevent a host PROXY_BASE_URL from outranking request-derived URLs during unit tests."""
monkeypatch.delenv("PROXY_BASE_URL", raising=False)
diff --git a/tests/test_litellm/test_conftest.py b/tests/test_litellm/test_conftest.py
index c813f59c7e4..cca4f7c3ef2 100644
--- a/tests/test_litellm/test_conftest.py
+++ b/tests/test_litellm/test_conftest.py
@@ -18,12 +18,6 @@ COVERAGE_SUBPROCESS_VARS: Final = frozenset(
def test_host_proxy_base_url_cannot_reach_request_derived_url_tests():
- """A PROXY_BASE_URL in the host environment must not reach tests that assert on request-derived URLs.
-
- The proxy resolves its public origin from that variable before anything else, so a developer
- who has one set for their own deployment used to watch dozens of OAuth discovery, redirect_uri,
- and client registration cases fail on an origin no test ever asked for.
- """
child_env: Final = {
key: value for key, value in os.environ.items() if key not in COVERAGE_SUBPROCESS_VARS
} | {"PROXY_BASE_URL": "https://leaked-host-origin.example.com"}