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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
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.ymlindex 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 movepaths:- - 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 livevendor vector stores, so assigning them needs a per-file decisiondiff --git a/.github/workflows/test-linting.yml b/.github/workflows/test-linting.ymlindex af2759cf642..5a180c13c53 100644--- a/.github/workflows/test-linting.yml+++ b/.github/workflows/test-linting.yml@@ -228,7 +228,7 @@ jobs:- name: Run secret scan testrun: |- 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 scanenv:diff --git a/tests/litellm/test_no_hardcoded_secrets.py b/tests/code_coverage_tests/test_no_hardcoded_secrets.pysimilarity index 100%rename from tests/litellm/test_no_hardcoded_secrets.pyrename to tests/code_coverage_tests/test_no_hardcoded_secrets.pydiff --git a/tests/litellm/llms/azure/__init__.py b/tests/test_litellm/a2a_protocol/providers/pydantic_ai_agents/__init__.pysimilarity index 100%rename from tests/litellm/llms/azure/__init__.pyrename to tests/test_litellm/a2a_protocol/providers/pydantic_ai_agents/__init__.pydiff --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.pysimilarity index 100%rename from tests/litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_headers.pyrename to tests/test_litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_headers.pydiff --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.pysimilarity index 100%rename from tests/litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_transformation.pyrename to tests/test_litellm/a2a_protocol/providers/pydantic_ai_agents/test_pydantic_ai_agent_transformation.pydiff --git a/tests/litellm/integrations/helicone/test_helicone_gemini.py b/tests/test_litellm/integrations/helicone/test_helicone_gemini.pysimilarity index 100%rename from tests/litellm/integrations/helicone/test_helicone_gemini.pyrename to tests/test_litellm/integrations/helicone/test_helicone_gemini.pydiff --git a/tests/litellm/litellm_core_utils/test_json_schema_validation.py b/tests/test_litellm/litellm_core_utils/test_json_schema_validation.pysimilarity index 100%rename from tests/litellm/litellm_core_utils/test_json_schema_validation.pyrename to tests/test_litellm/litellm_core_utils/test_json_schema_validation.pydiff --git a/tests/litellm/llms/anthropic/test_anthropic_reasoning_effort.py b/tests/test_litellm/llms/anthropic/test_anthropic_reasoning_effort.pysimilarity index 100%rename from tests/litellm/llms/anthropic/test_anthropic_reasoning_effort.pyrename to tests/test_litellm/llms/anthropic/test_anthropic_reasoning_effort.pydiff --git a/tests/litellm/llms/anthropic/test_anthropic_schema_filter.py b/tests/test_litellm/llms/anthropic/test_anthropic_schema_filter.pysimilarity index 100%rename from tests/litellm/llms/anthropic/test_anthropic_schema_filter.pyrename to tests/test_litellm/llms/anthropic/test_anthropic_schema_filter.pydiff --git a/tests/litellm/llms/azure/test_azure_embedding.py b/tests/test_litellm/llms/azure/test_azure_embedding.pysimilarity index 100%rename from tests/litellm/llms/azure/test_azure_embedding.pyrename to tests/test_litellm/llms/azure/test_azure_embedding.pydiff --git a/tests/litellm/llms/bedrock/embed/test_embedding.py b/tests/test_litellm/llms/bedrock/embed/test_embedding.pysimilarity index 100%rename from tests/litellm/llms/bedrock/embed/test_embedding.pyrename to tests/test_litellm/llms/bedrock/embed/test_embedding.pydiff --git a/tests/litellm/llms/bedrock/test_nova_imported_models.py b/tests/test_litellm/llms/bedrock/test_nova_imported_models.pysimilarity index 100%rename from tests/litellm/llms/bedrock/test_nova_imported_models.pyrename to tests/test_litellm/llms/bedrock/test_nova_imported_models.pydiff --git a/tests/test_litellm/llms/gradient_ai/__init__.py b/tests/test_litellm/llms/gradient_ai/__init__.pynew file mode 100644index 00000000000..e69de29bb2ddiff --git a/tests/test_litellm/llms/gradient_ai/chat/__init__.py b/tests/test_litellm/llms/gradient_ai/chat/__init__.pynew file mode 100644index 00000000000..e69de29bb2ddiff --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.pysimilarity index 100%rename from tests/litellm/llms/gradient_ai/chat/test_gradient_ai_chat_transformation.pyrename to tests/test_litellm/llms/gradient_ai/chat/test_gradient_ai_chat_transformation.pydiff --git a/tests/litellm/llms/openai_like/test_abliteration_provider.py b/tests/test_litellm/llms/openai_like/test_abliteration_provider.pysimilarity index 100%rename from tests/litellm/llms/openai_like/test_abliteration_provider.pyrename to tests/test_litellm/llms/openai_like/test_abliteration_provider.pydiff --git a/tests/litellm/llms/openai_like/test_assemblyai_provider.py b/tests/test_litellm/llms/openai_like/test_assemblyai_provider.pysimilarity index 100%rename from tests/litellm/llms/openai_like/test_assemblyai_provider.pyrename to tests/test_litellm/llms/openai_like/test_assemblyai_provider.pydiff --git a/tests/litellm/llms/openai_like/test_empiriolabs_provider.py b/tests/test_litellm/llms/openai_like/test_empiriolabs_provider.pysimilarity index 100%rename from tests/litellm/llms/openai_like/test_empiriolabs_provider.pyrename to tests/test_litellm/llms/openai_like/test_empiriolabs_provider.pydiff --git a/tests/test_litellm/llms/vertex_ai/agent_engine/__init__.py b/tests/test_litellm/llms/vertex_ai/agent_engine/__init__.pynew file mode 100644index 00000000000..e69de29bb2ddiff --git a/tests/litellm/llms/vertex_ai/agent_engine/test_transformation.py b/tests/test_litellm/llms/vertex_ai/agent_engine/test_transformation.pysimilarity index 100%rename from tests/litellm/llms/vertex_ai/agent_engine/test_transformation.pyrename to tests/test_litellm/llms/vertex_ai/agent_engine/test_transformation.pydiff --git a/tests/test_litellm/llms/vertex_ai/gemini/__init__.py b/tests/test_litellm/llms/vertex_ai/gemini/__init__.pynew file mode 100644index 00000000000..e69de29bb2ddiff --git a/tests/litellm/llms/vertex_ai/gemini/test_transformation.py b/tests/test_litellm/llms/vertex_ai/gemini/test_transformation.pysimilarity index 100%rename from tests/litellm/llms/vertex_ai/gemini/test_transformation.pyrename to tests/test_litellm/llms/vertex_ai/gemini/test_transformation.pydiff --git a/tests/test_litellm/llms/vertex_ai/text_to_speech/__init__.py b/tests/test_litellm/llms/vertex_ai/text_to_speech/__init__.pynew file mode 100644index 00000000000..e69de29bb2ddiff --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.pysimilarity index 98%rename from tests/litellm/llms/vertex_ai/text_to_speech/test_transformation.pyrename to tests/test_litellm/llms/vertex_ai/text_to_speech/test_transformation.pyindex 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 jsonimport osimport sysfrom 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 inputassert "input" in request_bodydiff --git a/tests/litellm/proxy/agent_endpoints/test_agent_rbac.py b/tests/test_litellm/proxy/agent_endpoints/test_agent_rbac.pysimilarity index 100%rename from tests/litellm/proxy/agent_endpoints/test_agent_rbac.pyrename to tests/test_litellm/proxy/agent_endpoints/test_agent_rbac.pydiff --git a/tests/litellm/proxy/common_utils/test_rbac_utils.py b/tests/test_litellm/proxy/common_utils/test_rbac_utils.pysimilarity index 100%rename from tests/litellm/proxy/common_utils/test_rbac_utils.pyrename to tests/test_litellm/proxy/common_utils/test_rbac_utils.pydiff --git a/tests/litellm/proxy/management_endpoints/test_cost_estimate_endpoint.py b/tests/test_litellm/proxy/management_endpoints/test_cost_estimate_endpoint.pysimilarity index 100%rename from tests/litellm/proxy/management_endpoints/test_cost_estimate_endpoint.pyrename to tests/test_litellm/proxy/management_endpoints/test_cost_estimate_endpoint.pydiff --git a/tests/litellm/proxy/test_claude_code_marketplace.py b/tests/test_litellm/proxy/test_claude_code_marketplace.pysimilarity index 100%rename from tests/litellm/proxy/test_claude_code_marketplace.pyrename to tests/test_litellm/proxy/test_claude_code_marketplace.pydiff --git a/tests/litellm/proxy/test_init_litellm_callbacks.py b/tests/test_litellm/proxy/test_init_litellm_callbacks.pysimilarity index 100%rename from tests/litellm/proxy/test_init_litellm_callbacks.pyrename to tests/test_litellm/proxy/test_init_litellm_callbacks.pydiff --git a/tests/litellm/proxy/test_prisma_engine_watchdog.py b/tests/test_litellm/proxy/test_prisma_engine_watchdog.pysimilarity index 100%rename from tests/litellm/proxy/test_prisma_engine_watchdog.pyrename to tests/test_litellm/proxy/test_prisma_engine_watchdog.pydiff --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.pysimilarity index 100%rename from tests/litellm/proxy/vector_store_endpoints/test_vector_store_rbac.pyrename to tests/test_litellm/proxy/vector_store_endpoints/test_vector_store_rbac.pydiff --git a/tests/litellm/test_bedrock_extended_beta_models.py b/tests/test_litellm/test_bedrock_extended_beta_models.pysimilarity index 100%rename from tests/litellm/test_bedrock_extended_beta_models.pyrename to tests/test_litellm/test_bedrock_extended_beta_models.pydiff --git a/tests/litellm/test_bedrock_nemotron_super.py b/tests/test_litellm/test_bedrock_nemotron_super.pysimilarity index 93%rename from tests/litellm/test_bedrock_nemotron_super.pyrename to tests/test_litellm/test_bedrock_nemotron_super.pyindex 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"] == 32768assert 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"] == 32768def 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.pysimilarity index 100%rename from tests/litellm/test_proxy_auth.pyrename to tests/test_litellm/test_proxy_auth.pydiff --git a/tests/litellm/test_router_retry_backoff_headers.py b/tests/test_litellm/test_router_retry_backoff_headers.pysimilarity index 100%rename from tests/litellm/test_router_retry_backoff_headers.pyrename to tests/test_litellm/test_router_retry_backoff_headers.pydiff --git a/tests/litellm/test_sambanova_model_metadata.py b/tests/test_litellm/test_sambanova_model_metadata.pysimilarity index 95%rename from tests/litellm/test_sambanova_model_metadata.pyrename to tests/test_litellm/test_sambanova_model_metadata.pyindex 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"] > 0assert info["output_cost_per_token"] > 0- assert info["max_input_tokens"] == 204800+ assert info["max_input_tokens"] == 196608assert info["max_output_tokens"] == 131072assert info["supports_function_calling"] is Trueassert info["supports_reasoning"] is Truediff --git a/tests/litellm/test_stream_chunk_builder_images.py b/tests/test_litellm/test_stream_chunk_builder_images.pysimilarity index 100%rename from tests/litellm/test_stream_chunk_builder_images.pyrename to tests/test_litellm/test_stream_chunk_builder_images.py