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: remove substring guard test_default_api_base (#43355)

devin-ai-integration[bot]3afcd176b372
diff --git a/tests/local_testing/test_get_llm_provider.py b/tests/local_testing/test_get_llm_provider.py
index 4ac7cecb97a..982e14660b7 100644
--- a/tests/local_testing/test_get_llm_provider.py
+++ b/tests/local_testing/test_get_llm_provider.py
@@ -133,46 +133,6 @@ def test_get_llm_provider_azure_o1():
assert model == "o1-mini"
-def test_default_api_base():
- from litellm.litellm_core_utils.get_llm_provider_logic import (
- _get_openai_compatible_provider_info,
- )
- from litellm.types.utils import LlmProviders
-
- # Patch environment variable to remove API base if it's set
- with patch.dict(os.environ, {}, clear=True):
- for provider in litellm.openai_compatible_providers:
- # Get the API base for the given provider
- if provider == "github_copilot":
- continue
- # Skip chatgpt as it requires OAuth authentication
- if provider == "chatgpt":
- continue
- # Skip ragflow as it requires specific model format: ragflow/chat/{id}/{model} or ragflow/agent/{id}/{model}
- if provider == "ragflow":
- continue
- _, _, _, api_base = _get_openai_compatible_provider_info(
- model=f"{provider}/*", api_base=None, api_key=None, dynamic_api_key=None
- )
- if api_base is None:
- continue
-
- for other_provider in LlmProviders:
- if other_provider.value != provider and provider != "{}_chat".format(
- other_provider.value
- ):
- if provider == "codestral" and other_provider.value == "mistral":
- continue
- elif provider == "github" and other_provider.value == "azure":
- continue
- elif (
- provider in ("qwencloud", "qwen_ai_platform")
- and other_provider.value == "dashscope"
- ):
- continue
- assert other_provider.value not in api_base.replace("/openai", "")
-
-
def test_hosted_vllm_default_api_key():
from litellm.litellm_core_utils.get_llm_provider_logic import (
_get_openai_compatible_provider_info,