litellm/tests/test_litellm
Ishaan Jaff 104283ae8f
[Feat] Claude Code - Add Websearch support using LiteLLM /search (using web search interception hook) (#19263)
* init WebSearchInterceptionLogger

* test_websearch_interception_real_call

* init async_should_run_agentic_completion

* async_should_run_agentic_loop

* async_run_agentic_loop

* refactor folder

* fix organization

* WebSearchTransformation

* WebSearchInterceptionLogger

* _call_agentic_completion_hooks

* WebSearch Interception Architecture

* test_websearch_interception_real_call

* add streaming

* add transform_request for streaming

* get_llm_provider

* test fix

* fix info

* init from config.yaml

* fixes

* test handler

* fix _is_streaming_response

* async_run_agentic_loop

* mypy fix
2026-01-16 21:10:05 -08:00
..
a2a_protocol
anthropic_interface/exceptions [bug fix] do not fallback to token counter if disable_token_counter is enabled (#19041) 2026-01-13 16:53:38 -08:00
caching
completion_extras Add annotations to completions responses API bridge 2026-01-07 14:30:31 +05:30
containers Make keepalive_timeout parameter work for Gunicorn (#19087) 2026-01-16 03:32:59 +05:30
enterprise Revert "Stabilise mock tests" 2026-01-17 06:26:18 +09:00
experimental_mcp_client
google_genai Fix : test_streaming_multiple_partial_tool_calls 2026-01-16 09:29:54 +05:30
images
integrations [Feat] Claude Code - Add Websearch support using LiteLLM /search (using web search interception hook) (#19263) 2026-01-16 21:10:05 -08:00
interactions fix: test_create_simple_string_input 2026-01-05 17:15:12 +05:30
litellm_core_utils [Fix] - Reliability fix OOMs with image url handling (#19257) 2026-01-16 16:41:44 -08:00
llms Revert "Stabilise mock tests" 2026-01-17 06:26:18 +09:00
passthrough
proxy Merge remote-tracking branch 'origin' into litellm_deleted_keys_endpoint 2026-01-16 19:25:03 -08:00
responses fix: event loop nesting issue in MCP chat completions with streaming 2026-01-15 15:36:56 +09:00
router_strategy feat(tag-routing): support toggling tag matching between ANY and ALL (#18776) 2026-01-08 23:39:03 +05:30
router_utils
secret_managers
types fix: extend case normalization to ALL guardrail types (not just tool_permission) (#18664) 2026-01-05 11:59:00 -08:00
vector_stores
__init__.py
conftest.py
log.txt
readme.md
test_acompletion_session_reuse_e2e.py
test_add_deployment_no_master_key.py
test_aembedding_session_reuse_e2e.py
test_azure_video_router.py
test_claude_haiku_4_5_config.py
test_constants.py
test_container_router.py
test_cost_calculation_log_level.py
test_cost_calculator.py [Feat] New Model - Azure Model Router on LiteLLM AI Gateway (#19054) 2026-01-13 18:31:43 -08:00
test_eager_tiktoken_load.py Add LITELLM_DISABLE_LAZY_LOADING env var to fix VCR cassette creation issue (#18725) 2026-01-06 14:49:11 -08:00
test_exception_header_preservation.py fix: preserve llm_provider-* headers in error responses (#19020) 2026-01-14 22:49:39 +05:30
test_exception_mapping_request_attribute.py
test_filter_out_litellm_params.py
test_gpt_image_cost_calculator.py fix(cost_calculator): correct gpt-image-1 cost calculation using token-based pricing (#17906) 2026-01-02 23:08:52 +05:30
test_groq_streaming_encoding.py
test_lazy_imports.py Fix: test_token_counter_lazy_imports 2026-01-08 16:44:35 +05:30
test_logging.py
test_lowest_latency_zero_tokens.py
test_main.py
test_model_response_normalization.py Normalize OpenAI SDK BaseModel choices/messages to avoid Pydantic serializer warnings (#18972) 2026-01-14 03:40:11 +05:30
test_nested_drop_params.py
test_redis.py
test_responses_id_security.py fix(ui): use non-streaming method for endpoint v1/a2a/message/send in… (#19025) 2026-01-14 03:29:10 +05:30
test_router_google_genai.py
test_router_per_deployment_num_retries.py test: fix missing test 2026-01-16 10:33:53 +09:00
test_router.py Manual revert #19078 2026-01-17 06:54:08 +09:00
test_shared_session_integration.py
test_system_message_format_bug.py
test_utils_custom.py Fix :test_count_tokens_caching 2026-01-10 00:57:11 +05:30
test_utils.py [Feat] New Model - Azure Model Router on LiteLLM AI Gateway (#19054) 2026-01-13 18:31:43 -08:00
test_uuid_helper.py
test_video_generation.py fix: test_video_status_basic 2026-01-08 17:30:58 +05:30

Testing for litellm/

This directory 1:1 maps the the litellm/ directory, and can only contain mocked tests.

The point of this is to:

  1. Increase test coverage of litellm/
  2. Make it easy for contributors to add tests for the litellm/ package and easily run tests without needing LLM API keys.

File name conventions

  • litellm/proxy/test_caching_routes.py maps to litellm/proxy/caching_routes.py
  • test_<filename>.py maps to litellm/<filename>.py