litellm/tests/test_litellm
devin-ai-integration[bot] 8ef85a45ce
feat(xai): add native xAI batches and files support (#42812)
* feat(xai): add native xAI batches and files support

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(xai): tighten batch handler typing and avoid Final redeclaration on star import

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor(xai): walk batch result pages iteratively

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(xai): stop paging on empty pagination token and honor litellm.xai_key

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(xai): import NotRequired and TypedDict from typing_extensions for Python 3.10

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* feat(batches): accept image and video endpoints on batch create

* test(xai): lock batch endpoint, auth, and result contracts

The batches test package collided with litellm/batches under pytest prepend, so the All Other Providers shard could not collect the new tests.

* fix(xai): price grok batch usage at xAI's 20 percent batch discount

* fix(xai): map not-found file reads to 404, bill batch reasoning tokens, and add 200k batch tier rates

* refactor(xai): drop routine prose and move tests under tests/unit

* fix(health): hand the resolved provider to list_batches in batch-mode health checks

* test(xai): make tests/unit/llms/xai/batches a package

* fix(xai): walk every page of the files list by pagination_token

---------

Co-authored-by: Mubashir Osmani <mubashir@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: mubashir1osmani <mubashir.osmani777@gmail.com>
Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-09-25 15:35:20 -07:00
..
caching fix(caching): propagate auth cache invalidation over Redis Cluster via a node-level pub/sub client (#43110) 2026-09-25 07:56:46 -07:00
expected_responses_api_request
integrations/zerobus feat(integrations): add Databricks Zerobus trace logging callback (#42013) 2026-09-25 15:29:23 -07:00
interactions test: move tests/test_litellm root and small trees into tests/unit (#43186) 2026-09-25 11:30:43 -07:00
litellm_core_utils feat(xai): add native xAI batches and files support (#42812) 2026-09-25 15:35:20 -07:00
llms test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
ocr test: migrate phase 15 legacy tests to tests/unit 2026-09-20 11:55:43 +00:00
passthrough test: migrate phase 15 legacy tests to tests/unit 2026-09-20 11:55:43 +00:00
proxy feat(integrations): add Databricks Zerobus trace logging callback (#42013) 2026-09-25 15:29:23 -07:00
responses fix(responses): fall back on pre-output stream drops, fail truncated streams, honor request_timeout (#43133) 2026-09-25 14:32:41 -07:00
router_strategy fix(router): count provider budget spend on every API surface (#38172) 2026-09-25 14:06:49 -07:00
router_utils fix(router): match provider-prefixed fallback keys for bare model groups served by wildcard deployments (#43062) 2026-09-24 18:08:56 -07:00
rust_bridge feat(rust): hand upstream response headers to the native Messages stream (#43178) 2026-09-25 10:03:15 -07:00
__init__.py
conftest.py test: move tests/test_litellm root and small trees into tests/unit (#43186) 2026-09-25 11:30:43 -07:00
log.txt
readme.md
test_compression.py test: move tests/test_litellm root and small trees into tests/unit (#43186) 2026-09-25 11:30:43 -07:00
test_conftest.py
test_main.py test: move tests/test_litellm root and small trees into tests/unit (#43186) 2026-09-25 11:30:43 -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