litellm/tests
Jugal D. Bhatt b8fe5f7b17
[MCP Gateway] LiteLLM Fix MCP gateway key auth (#13630)
* Fix - add safe divide by 0 for most places to prevent crash

* Enhance MCPRequestHandler to support permission inheritance and intersection logic for access groups. Added integration tests to verify behavior when keys have no permissions and when both keys and teams have overlapping permissions.

* Remove redundant assertions for permission checks in test_user_api_key_auth_mcp.py to streamline test logic.

* Refactor integration tests for MCPRequestHandler to simplify mocking. Replace complex database mocks with direct function mocks for permission inheritance and intersection scenarios, improving test clarity and maintainability.

* Revert "Fix - add safe divide by 0 for most places to prevent crash"

This reverts commit 265d40e39051e148996b9fb7f354730c57ff23ac.
2025-08-14 16:32:18 -07:00
..
basic_proxy_startup_tests
batches_tests openai.ConflictError 2025-07-12 17:07:21 -07:00
code_coverage_tests [Bug Fix] Mistral Tool Calling - Grammar error: at 3(11): failed to compile JSON schema (#13389) 2025-08-07 13:50:22 -07:00
documentation_tests
enterprise [Proxy] Litellm fix mapped tests (#13634) 2025-08-14 14:19:36 -07:00
guardrails_tests feat: Add Pillar Security guardrail integration (#12791) 2025-07-22 23:17:33 -07:00
image_gen_tests [Feat] New provider - Azure AI Flux Image Generation (#13592) 2025-08-13 17:20:30 -07:00
litellm/llms/gradient_ai/chat Add digitalocean provider (#12169) 2025-08-09 16:26:33 -07:00
litellm_utils_tests test: update test 2025-07-29 21:08:36 -07:00
litellm-proxy-extras
llm_responses_api_testing [Bug Fix] - Allow using reasoning_effort for gpt-5 model family and reasoning for Responses API (#13475) 2025-08-10 09:55:36 -07:00
llm_translation [LLM Translation] Fix Realtime API endpoint for no intent (#13476) 2025-08-14 16:24:14 -07:00
load_tests
local_testing [LLM Translation] Fix Realtime API endpoint for no intent (#13476) 2025-08-14 16:24:14 -07:00
logging_callback_tests [Feat] Responses API Session Handling - Multi media support (#13347) 2025-08-07 10:59:53 -07:00
mcp_tests [MCP Gateway] LiteLLM Fix MCP gateway key auth (#13630) 2025-08-14 16:32:18 -07:00
multi_instance_e2e_tests
old_proxy_tests/tests
openai_endpoints_tests Batches - support batch retrieve with target model Query Param + Anthropic - completion bridge, yield content_block_stop chunk (#12228) 2025-07-01 22:13:48 -07:00
otel_tests test_bedrock_guardrail_triggered 2025-07-09 17:05:06 -07:00
pass_through_tests test_anthropic_basic_completion_with_headers ci/cd fix 2025-07-12 11:08:03 -07:00
pass_through_unit_tests Azure api_version="preview" support + Bedrock cost tracking via Anthropic /v1/messages (#13072) 2025-07-29 08:13:55 -07:00
proxy_admin_ui_tests Fix e2e test (#12549) 2025-07-12 10:42:57 -07:00
proxy_security_tests
proxy_unit_tests [Feat] GEMINI CLI - Add Token Counter for VertexAI Models (#13558) 2025-08-12 20:53:47 -07:00
router_unit_tests [LLM Translation] Fix Realtime API endpoint for no intent (#13476) 2025-08-14 16:24:14 -07:00
scim_tests
spend_tracking_tests
store_model_in_db_tests [MCP Gateway] fix auth on ui for bearer servers (#13312) 2025-08-06 09:46:10 -07:00
test_litellm [MCP Gateway] LiteLLM Fix MCP gateway key auth (#13630) 2025-08-14 16:32:18 -07:00
unified_google_tests test fix: gcp deprecated gemini-1.5-flash 2025-08-06 08:43:45 -07:00
vector_store_tests [Feat] UI Vector Stores - Allow adding Vertex RAG Engine, OpenAI, Azure (#12752) 2025-07-18 18:25:26 -07:00
windows_tests
__init__.py [Feat] Add github co-pilot as a new LLM API provider (#12325) 2025-07-04 13:12:16 -07:00
gettysburg.wav
large_text.py
openai_batch_completions.jsonl
README.MD
test_budget_management.py
test_callbacks_on_proxy.py
test_config.py
test_debug_warning.py
test_end_users.py
test_entrypoint.py
test_fallbacks.py
test_health.py
test_keys.py
test_logging.conf
test_models.py
test_openai_endpoints.py test_chat_completion_ratelimit 2025-07-30 23:12:11 -07:00
test_organizations.py
test_passthrough_endpoints.py
test_ratelimit.py
test_resource_cleanup.py Fix: Properly close aiohttp client sessions to prevent resource leaks (#12251) 2025-07-09 09:25:17 -07:00
test_spend_logs.py
test_team_logging.py
test_team_members.py
test_team.py
test_users.py

In total litellm runs 1000+ tests

[02/20/2025] Update:

To make it easier to contribute and map what behavior is tested,

we've started mapping the litellm directory in tests/litellm

This folder can only run mock tests.