litellm/tests/test_litellm
Krish Dholakia c92b6c175c
Prometheus - fix request increment + add route tracking for streaming requests (#11731)
* fix(prometheus.py): remove request increment from inside the log success event

it's only done on post-call success/failure

* fix(litellm_logging.py): add additional validation step for checking if 'stream' is true

prevent double counting on non-stream requests

* test: add unit testing to ensure stream is not incorrectly set to true

* feat(litellm_logging.py): emit request route in standard logging payload

used by prometheus streaming metrics for route

* fix: fix otel test

* fix: fix linting errors

* test: update test

* fix: fix linting error
2025-06-14 16:26:48 -07:00
..
caching fix(redis_cache.py): support pipeline redis lpop for older redis vers… (#11425) 2025-06-05 00:05:54 -07:00
enterprise/enterprise_callbacks/send_emails Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
experimental_mcp_client Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
integrations Prometheus - fix request increment + add route tracking for streaming requests (#11731) 2025-06-14 16:26:48 -07:00
litellm_core_utils Prometheus - fix request increment + add route tracking for streaming requests (#11731) 2025-06-14 16:26:48 -07:00
llms Revert "Enable System Proxy Support for aiohttp Transport (#11616)" 2025-06-14 08:32:51 -07:00
passthrough build(VLLM-Passthrough-with-loadbalancing-support-(enables-using-model-list-for-VLLM-/classify-endpoint)): Closes #11205 2025-05-31 09:00:04 -07:00
proxy [Fix] JWT - Fix error when team member already part of team (#11735) 2025-06-14 15:50:16 -07:00
responses [Bug Fix] Fix: _transform_responses_api_content_to_chat_completion_content` doesn't support file content type (#11494) 2025-06-06 13:20:46 -07:00
router_strategy Simplify experimental multi-instance rate limiter - more accurate (#11424) 2025-06-07 11:10:55 -07:00
router_utils/pre_call_checks Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -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 Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
conftest.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
log.txt Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
readme.md Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_constants.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_cost_calculator.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_logging.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_main.py fix: tests 2025-05-31 13:14:37 -07:00
test_router.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_utils.py Convert scientific notation str to int + Bubble up azure content filter results (#11655) 2025-06-11 23:07:22 -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