Files
litellm/tests/test_litellm
Sameer Kankute 021540b2e2 fix: prevent double prompt management in async path, preserve optional params
- aresponses() now pops prompt_id from kwargs after the async hook runs
  and passes merged_optional_params via _async_prompt_merged_params.
  responses() checks for this internal kwarg first and skips the sync
  hook entirely when present — eliminating double-merge of template
  messages.
- merged_optional_params from async_get_chat_completion_prompt is no
  longer discarded (_); it flows through to local_vars in responses().
- Async tests now assert get_chat_completion_prompt.assert_not_called()
  to directly detect any double-execution regression.

Made-with: Cursor
2026-03-18 17:09:28 +05:30
..
2026-02-27 13:33:34 +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