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: run the 30 test files stranded in the second mirror (#37595)

yuneng-jiang3357ec8d345d
diff --git a/.github/ci-coverage-allowlist.yml b/.github/ci-coverage-allowlist.yml
index 9f98d60d857..4432c19bac6 100644
--- a/.github/ci-coverage-allowlist.yml
+++ b/.github/ci-coverage-allowlist.yml
@@ -49,43 +49,18 @@ test_paths:
paths:
- tests/code_coverage_tests/test_aio_http_image_conversion.py
- reason: >-
- A second mirror of the package tree living beside tests/test_litellm, which is the mirror the
- repo convention names; only test_no_hardcoded_secrets.py is invoked, from the linting
- workflow, and whether this directory should exist at all is unresolved
+ What is left of a second mirror that sat beside tests/test_litellm and ran nowhere. Its
+ other 30 files moved into the real mirror on 2026-08-20 and now run; these four cannot,
+ because each shares a filename with a live test whose contents are disjoint from it, so
+ landing them means merging test bodies rather than moving a file. Measured on the same
+ date: test_common_utils.py holds 15 tests the live file does not, test_oci_chat_transformation
+ 13, test_deepseek_chat_transformation 12, and test_discoverable_endpoints 5. Revisit by
+ merging each into its twin, which is a content review, not a move
paths:
- - tests/litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_headers.py
- - tests/litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_transformation.py
- - tests/litellm/integrations/helicone/test_helicone_gemini.py
- - tests/litellm/litellm_core_utils/test_json_schema_validation.py
- - tests/litellm/llms/anthropic/test_anthropic_reasoning_effort.py
- - tests/litellm/llms/anthropic/test_anthropic_schema_filter.py
- - tests/litellm/llms/azure/test_azure_embedding.py
- - tests/litellm/llms/bedrock/embed/test_embedding.py
- - tests/litellm/llms/bedrock/test_nova_imported_models.py
- tests/litellm/llms/deepseek/chat/test_deepseek_chat_transformation.py
- - tests/litellm/llms/gradient_ai/chat/test_gradient_ai_chat_transformation.py
- tests/litellm/llms/oci/chat/test_oci_chat_transformation.py
- - tests/litellm/llms/openai_like/test_abliteration_provider.py
- - tests/litellm/llms/openai_like/test_assemblyai_provider.py
- - tests/litellm/llms/openai_like/test_empiriolabs_provider.py
- - tests/litellm/llms/vertex_ai/agent_engine/test_transformation.py
- - tests/litellm/llms/vertex_ai/gemini/test_transformation.py
- - tests/litellm/llms/vertex_ai/text_to_speech/test_transformation.py
- tests/litellm/proxy/_experimental/mcp_server/test_discoverable_endpoints.py
- - tests/litellm/proxy/agent_endpoints/test_agent_rbac.py
- - tests/litellm/proxy/common_utils/test_rbac_utils.py
- tests/litellm/proxy/management_endpoints/test_common_utils.py
- - tests/litellm/proxy/management_endpoints/test_cost_estimate_endpoint.py
- - tests/litellm/proxy/test_claude_code_marketplace.py
- - tests/litellm/proxy/test_init_litellm_callbacks.py
- - tests/litellm/proxy/test_prisma_engine_watchdog.py
- - tests/litellm/proxy/vector_store_endpoints/test_vector_store_rbac.py
- - tests/litellm/test_bedrock_extended_beta_models.py
- - tests/litellm/test_bedrock_nemotron_super.py
- - tests/litellm/test_proxy_auth.py
- - tests/litellm/test_router_retry_backoff_headers.py
- - tests/litellm/test_sambanova_model_metadata.py
- - tests/litellm/test_stream_chunk_builder_images.py
- reason: >-
No job invokes this suite and its files mix pure transformation tests with ones driving live
vendor vector stores, so assigning them needs a per-file decision
diff --git a/.github/workflows/test-linting.yml b/.github/workflows/test-linting.yml
index af2759cf642..5a180c13c53 100644
--- a/.github/workflows/test-linting.yml
+++ b/.github/workflows/test-linting.yml
@@ -228,7 +228,7 @@ jobs:
- name: Run secret scan test
run: |
- uv run --no-project --with 'pytest==9.0.2' pytest tests/litellm/test_no_hardcoded_secrets.py -v
+ uv run --no-project --with 'pytest==9.0.2' pytest tests/code_coverage_tests/test_no_hardcoded_secrets.py -v
- name: Run ggshield secret scan
env:
diff --git a/tests/litellm/test_no_hardcoded_secrets.py b/tests/code_coverage_tests/test_no_hardcoded_secrets.py
similarity index 100%
rename from tests/litellm/test_no_hardcoded_secrets.py
rename to tests/code_coverage_tests/test_no_hardcoded_secrets.py
diff --git a/tests/litellm/llms/azure/__init__.py b/tests/test_litellm/a2a_protocol/providers/pydantic_ai_agents/__init__.py
similarity index 100%
rename from tests/litellm/llms/azure/__init__.py
rename to tests/test_litellm/a2a_protocol/providers/pydantic_ai_agents/__init__.py
diff --git a/tests/litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_headers.py b/tests/test_litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_headers.py
similarity index 100%
rename from tests/litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_headers.py
rename to tests/test_litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_headers.py
diff --git a/tests/litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_transformation.py b/tests/test_litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_transformation.py
similarity index 100%
rename from tests/litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_transformation.py
rename to tests/test_litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_transformation.py
diff --git a/tests/litellm/integrations/helicone/test_helicone_gemini.py b/tests/test_litellm/integrations/helicone/test_helicone_gemini.py
similarity index 100%
rename from tests/litellm/integrations/helicone/test_helicone_gemini.py
rename to tests/test_litellm/integrations/helicone/test_helicone_gemini.py
diff --git a/tests/litellm/litellm_core_utils/test_json_schema_validation.py b/tests/test_litellm/litellm_core_utils/test_json_schema_validation.py
similarity index 100%
rename from tests/litellm/litellm_core_utils/test_json_schema_validation.py
rename to tests/test_litellm/litellm_core_utils/test_json_schema_validation.py
diff --git a/tests/litellm/llms/anthropic/test_anthropic_reasoning_effort.py b/tests/test_litellm/llms/anthropic/test_anthropic_reasoning_effort.py
similarity index 100%
rename from tests/litellm/llms/anthropic/test_anthropic_reasoning_effort.py
rename to tests/test_litellm/llms/anthropic/test_anthropic_reasoning_effort.py
diff --git a/tests/litellm/llms/anthropic/test_anthropic_schema_filter.py b/tests/test_litellm/llms/anthropic/test_anthropic_schema_filter.py
similarity index 100%
rename from tests/litellm/llms/anthropic/test_anthropic_schema_filter.py
rename to tests/test_litellm/llms/anthropic/test_anthropic_schema_filter.py
diff --git a/tests/litellm/llms/azure/test_azure_embedding.py b/tests/test_litellm/llms/azure/test_azure_embedding.py
similarity index 100%
rename from tests/litellm/llms/azure/test_azure_embedding.py
rename to tests/test_litellm/llms/azure/test_azure_embedding.py
diff --git a/tests/litellm/llms/bedrock/embed/test_embedding.py b/tests/test_litellm/llms/bedrock/embed/test_embedding.py
similarity index 100%
rename from tests/litellm/llms/bedrock/embed/test_embedding.py
rename to tests/test_litellm/llms/bedrock/embed/test_embedding.py
diff --git a/tests/litellm/llms/bedrock/test_nova_imported_models.py b/tests/test_litellm/llms/bedrock/test_nova_imported_models.py
similarity index 100%
rename from tests/litellm/llms/bedrock/test_nova_imported_models.py
rename to tests/test_litellm/llms/bedrock/test_nova_imported_models.py
diff --git a/tests/test_litellm/llms/gradient_ai/__init__.py b/tests/test_litellm/llms/gradient_ai/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/tests/test_litellm/llms/gradient_ai/chat/__init__.py b/tests/test_litellm/llms/gradient_ai/chat/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/tests/litellm/llms/gradient_ai/chat/test_gradient_ai_chat_transformation.py b/tests/test_litellm/llms/gradient_ai/chat/test_gradient_ai_chat_transformation.py
similarity index 100%
rename from tests/litellm/llms/gradient_ai/chat/test_gradient_ai_chat_transformation.py
rename to tests/test_litellm/llms/gradient_ai/chat/test_gradient_ai_chat_transformation.py
diff --git a/tests/litellm/llms/openai_like/test_abliteration_provider.py b/tests/test_litellm/llms/openai_like/test_abliteration_provider.py
similarity index 100%
rename from tests/litellm/llms/openai_like/test_abliteration_provider.py
rename to tests/test_litellm/llms/openai_like/test_abliteration_provider.py
diff --git a/tests/litellm/llms/openai_like/test_assemblyai_provider.py b/tests/test_litellm/llms/openai_like/test_assemblyai_provider.py
similarity index 100%
rename from tests/litellm/llms/openai_like/test_assemblyai_provider.py
rename to tests/test_litellm/llms/openai_like/test_assemblyai_provider.py
diff --git a/tests/litellm/llms/openai_like/test_empiriolabs_provider.py b/tests/test_litellm/llms/openai_like/test_empiriolabs_provider.py
similarity index 100%
rename from tests/litellm/llms/openai_like/test_empiriolabs_provider.py
rename to tests/test_litellm/llms/openai_like/test_empiriolabs_provider.py
diff --git a/tests/test_litellm/llms/vertex_ai/agent_engine/__init__.py b/tests/test_litellm/llms/vertex_ai/agent_engine/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/tests/litellm/llms/vertex_ai/agent_engine/test_transformation.py b/tests/test_litellm/llms/vertex_ai/agent_engine/test_transformation.py
similarity index 100%
rename from tests/litellm/llms/vertex_ai/agent_engine/test_transformation.py
rename to tests/test_litellm/llms/vertex_ai/agent_engine/test_transformation.py
diff --git a/tests/test_litellm/llms/vertex_ai/gemini/__init__.py b/tests/test_litellm/llms/vertex_ai/gemini/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/tests/litellm/llms/vertex_ai/gemini/test_transformation.py b/tests/test_litellm/llms/vertex_ai/gemini/test_transformation.py
similarity index 100%
rename from tests/litellm/llms/vertex_ai/gemini/test_transformation.py
rename to tests/test_litellm/llms/vertex_ai/gemini/test_transformation.py
diff --git a/tests/test_litellm/llms/vertex_ai/text_to_speech/__init__.py b/tests/test_litellm/llms/vertex_ai/text_to_speech/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/tests/litellm/llms/vertex_ai/text_to_speech/test_transformation.py b/tests/test_litellm/llms/vertex_ai/text_to_speech/test_transformation.py
similarity index 98%
rename from tests/litellm/llms/vertex_ai/text_to_speech/test_transformation.py
rename to tests/test_litellm/llms/vertex_ai/text_to_speech/test_transformation.py
index 70399967334..1e5ae05aa25 100644
--- a/tests/litellm/llms/vertex_ai/text_to_speech/test_transformation.py
+++ b/tests/test_litellm/llms/vertex_ai/text_to_speech/test_transformation.py
@@ -1,4 +1,3 @@
-import json
import os
import sys
from unittest.mock import MagicMock, Mock, patch
@@ -171,8 +170,8 @@ def test_litellm_speech_vertex_ai_chirp(mock_get_token, mock_ensure_token, mock_
)
# Verify request body structure
- assert "data" in call_kwargs
- request_body = json.loads(call_kwargs["data"])
+ assert "json" in call_kwargs
+ request_body = call_kwargs["json"]
# Verify input
assert "input" in request_body
diff --git a/tests/litellm/proxy/agent_endpoints/test_agent_rbac.py b/tests/test_litellm/proxy/agent_endpoints/test_agent_rbac.py
similarity index 100%
rename from tests/litellm/proxy/agent_endpoints/test_agent_rbac.py
rename to tests/test_litellm/proxy/agent_endpoints/test_agent_rbac.py
diff --git a/tests/litellm/proxy/common_utils/test_rbac_utils.py b/tests/test_litellm/proxy/common_utils/test_rbac_utils.py
similarity index 100%
rename from tests/litellm/proxy/common_utils/test_rbac_utils.py
rename to tests/test_litellm/proxy/common_utils/test_rbac_utils.py
diff --git a/tests/litellm/proxy/management_endpoints/test_cost_estimate_endpoint.py b/tests/test_litellm/proxy/management_endpoints/test_cost_estimate_endpoint.py
similarity index 100%
rename from tests/litellm/proxy/management_endpoints/test_cost_estimate_endpoint.py
rename to tests/test_litellm/proxy/management_endpoints/test_cost_estimate_endpoint.py
diff --git a/tests/litellm/proxy/test_claude_code_marketplace.py b/tests/test_litellm/proxy/test_claude_code_marketplace.py
similarity index 100%
rename from tests/litellm/proxy/test_claude_code_marketplace.py
rename to tests/test_litellm/proxy/test_claude_code_marketplace.py
diff --git a/tests/litellm/proxy/test_init_litellm_callbacks.py b/tests/test_litellm/proxy/test_init_litellm_callbacks.py
similarity index 100%
rename from tests/litellm/proxy/test_init_litellm_callbacks.py
rename to tests/test_litellm/proxy/test_init_litellm_callbacks.py
diff --git a/tests/litellm/proxy/test_prisma_engine_watchdog.py b/tests/test_litellm/proxy/test_prisma_engine_watchdog.py
similarity index 100%
rename from tests/litellm/proxy/test_prisma_engine_watchdog.py
rename to tests/test_litellm/proxy/test_prisma_engine_watchdog.py
diff --git a/tests/litellm/proxy/vector_store_endpoints/test_vector_store_rbac.py b/tests/test_litellm/proxy/vector_store_endpoints/test_vector_store_rbac.py
similarity index 100%
rename from tests/litellm/proxy/vector_store_endpoints/test_vector_store_rbac.py
rename to tests/test_litellm/proxy/vector_store_endpoints/test_vector_store_rbac.py
diff --git a/tests/litellm/test_bedrock_extended_beta_models.py b/tests/test_litellm/test_bedrock_extended_beta_models.py
similarity index 100%
rename from tests/litellm/test_bedrock_extended_beta_models.py
rename to tests/test_litellm/test_bedrock_extended_beta_models.py
diff --git a/tests/litellm/test_bedrock_nemotron_super.py b/tests/test_litellm/test_bedrock_nemotron_super.py
similarity index 93%
rename from tests/litellm/test_bedrock_nemotron_super.py
rename to tests/test_litellm/test_bedrock_nemotron_super.py
index 8b081f10d1d..969db890e84 100644
--- a/tests/litellm/test_bedrock_nemotron_super.py
+++ b/tests/test_litellm/test_bedrock_nemotron_super.py
@@ -24,7 +24,7 @@ class TestNemotronSuper3120B:
assert model_info is not None, f"Model {MODEL_NAME} not found"
assert model_info["max_input_tokens"] == 256000
- assert model_info["max_output_tokens"] == 32000
+ assert model_info["max_output_tokens"] == 32768
assert model_info["litellm_provider"] == "bedrock_converse"
assert model_info["mode"] == "chat"
assert model_info["supports_function_calling"] is True
@@ -41,7 +41,7 @@ class TestNemotronSuper3120B:
model_info = get_model_info(f"bedrock/us-east-1/{MODEL_NAME}")
assert model_info["max_input_tokens"] == 256000
- assert model_info["max_output_tokens"] == 32000
+ assert model_info["max_output_tokens"] == 32768
def test_resolves_without_region(self):
"""Test model resolves with just bedrock/ prefix"""
diff --git a/tests/litellm/test_proxy_auth.py b/tests/test_litellm/test_proxy_auth.py
similarity index 100%
rename from tests/litellm/test_proxy_auth.py
rename to tests/test_litellm/test_proxy_auth.py
diff --git a/tests/litellm/test_router_retry_backoff_headers.py b/tests/test_litellm/test_router_retry_backoff_headers.py
similarity index 100%
rename from tests/litellm/test_router_retry_backoff_headers.py
rename to tests/test_litellm/test_router_retry_backoff_headers.py
diff --git a/tests/litellm/test_sambanova_model_metadata.py b/tests/test_litellm/test_sambanova_model_metadata.py
similarity index 95%
rename from tests/litellm/test_sambanova_model_metadata.py
rename to tests/test_litellm/test_sambanova_model_metadata.py
index bc31bfb0af2..972ddb4deef 100644
--- a/tests/litellm/test_sambanova_model_metadata.py
+++ b/tests/test_litellm/test_sambanova_model_metadata.py
@@ -18,7 +18,7 @@ def test_sambanova_minimax_m27_model_info():
assert info["mode"] == "chat"
assert info["input_cost_per_token"] > 0
assert info["output_cost_per_token"] > 0
- assert info["max_input_tokens"] == 204800
+ assert info["max_input_tokens"] == 196608
assert info["max_output_tokens"] == 131072
assert info["supports_function_calling"] is True
assert info["supports_reasoning"] is True
diff --git a/tests/litellm/test_stream_chunk_builder_images.py b/tests/test_litellm/test_stream_chunk_builder_images.py
similarity index 100%
rename from tests/litellm/test_stream_chunk_builder_images.py
rename to tests/test_litellm/test_stream_chunk_builder_images.py