litellm/tests/test_litellm
Krish Dholakia f7af8902b0
/v1/messages - Remove hardcoded model name on streaming + Tags - enable setting custom header tags (#12131)
* fix(anthropic/experimental_pass_through): use given model name when returning streaming chunks

don't harcode model name on streaming

confusing for user

* fix(anthropic/streaming_iterator.py): remove scope of import

* feat(litellm_logging.py): allow admin to specify additional headers for using as spend tags

Closes https://github.com/BerriAI/litellm/issues/12129

* test(test_litellm_logging.py): add unit tests

* feat(openweb_ui.md): add custom tag tutorial to docs

* docs(cost_tracking.md): add tag based usage UI screenshot

* test: update test

* fix: fix import
2025-06-28 21:49:35 -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 Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
google_genai [Feat] Add Bridge from generateContent <> /chat/completions (#12081) 2025-06-27 11:08:55 -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 /v1/messages - Remove hardcoded model name on streaming + Tags - enable setting custom header tags (#12131) 2025-06-28 21:49:35 -07:00
llms /v1/messages - Remove hardcoded model name on streaming + Tags - enable setting custom header tags (#12131) 2025-06-28 21:49:35 -07:00
passthrough Refactor: bedrock passthrough fixes - migrate to Passthrough SDK (#12089) 2025-06-26 22:51:35 -07:00
proxy Fix user-team association issues in LiteLLM proxy (#12082) 2025-06-27 21:29:49 -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 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_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 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 Store batch output file id in DB + Store batch file status in DB + (experimental) BATCH API COST TRACKING 2025-06-25 22:41:22 -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