litellm/tests/test_litellm
Cole McIntosh abe364c2bc
Fix: Ensure exception is not None before checking its string representation (#12209)
The test_keys_delete_error_handling test was failing with:
- ConnectionError when the mock wasn't properly applied
- The test was checking str(result.exception) without first verifying exception exists

This fix adds an explicit check that result.exception is not None before
attempting to convert it to string, preventing potential AttributeError
and making the test more robust.
2025-07-01 12:30:31 -07:00
..
caching fix(redis_cache.py): support pipeline redis lpop for older redis vers… (#11425) 2025-06-05 00:05:54 -07:00
completion_extras/litellm_responses_transformation Completion-To-Responses Bridge: Support passing image url's (#11833) 2025-06-18 12:48:17 -07:00
enterprise/enterprise_callbacks [Bug Fix] Invite links email should contain the correct invite id (#12130) 2025-06-28 09:19:32 -07:00
experimental_mcp_client
google_genai [Bug Fix] Allow passing litellm_params when using generateContent API endpoint (#12177) 2025-06-30 15:17:46 -07:00
integrations LiteLLM SDK <-> Proxy improvement (don't transform message client-side) + Bedrock - handle qs:.. in base64 file data + Tag Management - support adding public model names (#11908) 2025-06-19 22:34:18 -07:00
litellm_core_utils Fix allow strings in calculate cost (#12200) 2025-07-01 11:37:15 -07:00
llms Fix - handle empty config.yaml + Fix gemini /models - replace models/ as expected, instead of using 'strip' (#12189) 2025-06-30 21:56:03 -07:00
passthrough Refactor: bedrock passthrough fixes - migrate to Passthrough SDK (#12089) 2025-06-26 22:51:35 -07:00
proxy Fix: Ensure exception is not None before checking its string representation (#12209) 2025-07-01 12:30:31 -07:00
responses Responses API - Add reasoning content support for non-OpenAI providers (#12055) 2025-06-26 14:21:49 -07:00
router_strategy Simplify experimental multi-instance rate limiter - more accurate (#11424) 2025-06-07 11:10:55 -07:00
router_utils Litellm dev 06 25 2025 p2 (#12049) 2025-06-25 21:54:13 -07:00
secret_managers fix(secret-managers): Break AzureCredentialType restriction on AZURE_CREDENTIAL (#11272) 2025-05-31 01:03:08 -07:00
types Convert scientific notation str to int + Bubble up azure content filter results (#11655) 2025-06-11 23:07:22 -07:00
vector_stores [Fix] QA Fixes - Vector Store Object Permissions (#11291) 2025-05-31 09:41:05 -07:00
__init__.py
conftest.py
log.txt
readme.md
test_constants.py
test_cost_calculation_log_level.py fix: change cost calculation logs from INFO to DEBUG level 2025-06-27 11:36:58 -06:00
test_cost_calculator.py VertexAI Anthropic passthrough cost calc fixes + Filter litellm params from request sent to passthrough endpoint (#11992) 2025-06-23 22:24:47 -07:00
test_logging.py
test_main.py fix: tests 2025-05-31 13:14:37 -07:00
test_router.py UI QA Fixes - prevent team model reset on model add + return team-only models on /v2/model/info + render team member budget correctly (#12144) 2025-06-28 22:04:49 -07:00
test_utils.py Fix unpack_defs handling of nested $ref inside anyOf items (#11964) 2025-06-24 09:08:15 -07:00

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