litellm/tests
Chesars c4458c09fe fix(count_tokens): include system and tools in token counting API requests
The /v1/messages/count_tokens proxy endpoint was only passing `messages`
to provider token counting APIs, discarding `system` and `tools`. This
caused clients like Claude Code to receive artificially low token counts
(e.g. 10 instead of 531), preventing proper context window management
and leading to context overflow errors.

Pass system and tools through the full chain:
- TokenCountRequest → proxy_server → provider counters → API handlers
- Bedrock: transform tools to toolConfig format, system to text blocks
- Anthropic/Azure AI: pass through directly (same API format)
2026-02-27 15:39:35 -03:00
..
agent_tests
audio_tests
basic_proxy_startup_tests
batches_tests fix(tests): fix flaky test_create_vertex_fine_tune_jobs_mocked - handle background Datadog flush (#21838) 2026-02-21 14:44:01 -08:00
code_coverage_tests fix(ci): resolve mypy and check_code_and_doc_quality CI failures (#21812) 2026-02-21 13:08:47 -08:00
documentation_tests fix failing tests 2026-02-21 15:48:26 -08:00
enterprise
guardrails_tests fix(ollama): thread api_base to get_model_info + graceful fallback (#21970) 2026-02-23 21:00:37 -08:00
image_gen_tests
litellm fix Unauthenticated RCE and Sandbox Escape in Custom Code Guardrail 2026-02-25 17:57:32 +05:30
litellm_core_utils
litellm_utils_tests Merge upstream/main - resolve health check conflicts 2026-02-24 17:09:05 -08:00
litellm-proxy-extras
llm_responses_api_testing
llm_translation Merge remote-tracking branch 'origin/main' into litellm_perf_skip_throwaway_usage 2026-02-24 14:51:57 -08:00
load_tests
local_testing fix(ollama): thread api_base to get_model_info + graceful fallback (#21970) 2026-02-23 21:00:37 -08:00
logging_callback_tests Merge origin/main into litellm_perf_skip_usage_roundtrip 2026-02-21 12:55:55 -08:00
mcp_tests
multi_instance_e2e_tests
ocr_tests
old_proxy_tests/tests
openai_endpoints_tests
otel_tests
pass_through_tests
pass_through_unit_tests
proxy_admin_ui_tests security: fix critical/high CVEs in OS-level libs and NPM transitive 2026-02-24 19:40:09 +05:30
proxy_e2e_anthropic_messages_tests
proxy_security_tests
proxy_unit_tests Add support for forwarding provider's auth headers 2026-02-25 12:08:25 +05:30
router_unit_tests
scim_tests
search_tests
spend_tracking_tests
store_model_in_db_tests
test_litellm fix(count_tokens): include system and tools in token counting API requests 2026-02-27 15:39:35 -03:00
unified_google_tests
vector_store_tests
windows_tests
__init__.py
gettysburg.wav
large_text.py
openai_batch_completions.jsonl
README.MD
test_budget_management.py
test_callbacks_on_proxy.py
test_config.py
test_debug_warning.py
test_default_encoding_non_root.py
test_end_users.py
test_entrypoint.py
test_fallbacks.py
test_gpt5_azure_temperature_support.py
test_health.py
test_keys.py
test_litellm_proxy_responses_config.py
test_logging.conf
test_models.py
test_openai_endpoints.py
test_organizations.py
test_otel_thread_leak.py
test_passthrough_endpoints.py
test_presidio_latency.py
test_proxy_server_non_root.py
test_ratelimit.py
test_resource_cleanup.py
test_service_logger_otel.py
test_spend_logs.py
test_team_logging.py
test_team_members.py
test_team.py
test_users.py fix(tests): update deprecated Anthropic model in test_user_model_access (#21826) 2026-02-21 14:18:24 -08:00

In total litellm runs 1000+ tests

[02/20/2025] Update:

To make it easier to contribute and map what behavior is tested,

we've started mapping the litellm directory in tests/test_litellm

This folder can only run mock tests.