litellm/tests
user 4b4b4a79b9
fix(proxy): move pricing strip below the litellm_metadata JSON-string parse
The strip ran before the proxy parses ``litellm_metadata`` from a JSON
string into a dict (a path used by multipart/form-data and ``extra_body``
callers), so ``isinstance(metadata, dict)`` was False and ``model_info``
survived the strip. Move the call to the same post-parse position the
``user_api_key_*`` strip already uses for the same reason. Adds a
regression test exercising the JSON-string ``litellm_metadata`` path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 02:04:05 +00:00
..
agent_tests style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
audio_tests style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
basic_proxy_startup_tests
batches_tests test(vertex-batches): set is_redirect=False on mocked retrieve response 2026-04-29 19:01:49 -07:00
benchmarks
code_coverage_tests Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_vcr-cassette-llm-tests-af37 2026-04-30 17:56:02 -07:00
documentation_tests style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
enterprise Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_migration_projects 2026-04-24 12:52:10 -07:00
guardrails_tests fix(proxy): guardrail header dedupe, mypy during_call, test mock kwargs 2026-04-22 23:22:35 +03:00
image_gen_tests style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
litellm fix(azure): forward api_version to aembedding() for Azure AI Foundry v1 endpoints (#24911) 2026-05-01 17:26:46 +05:30
litellm_core_utils Merge branch 'litellm_internal_staging' into litellm_staging_03_22_2026 2026-04-20 19:56:00 +05:30
litellm_utils_tests [Test] Anthropic: Replace Legacy Claude-4-Sonnet Alias With Haiku 4.5 2026-05-01 19:10:27 -07:00
litellm-proxy-extras style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
llm_responses_api_testing Merge branch 'litellm_internal_staging' into litellm_vcr-cassette-llm-tests-af37 2026-05-01 14:37:48 -07:00
llm_translation Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_oss_staging_04_25_2026 2026-05-02 06:04:39 +00:00
load_tests style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
local_testing [Test] Anthropic: Replace Legacy Claude-4-Sonnet Alias With Haiku 4.5 2026-05-01 19:10:27 -07:00
logging_callback_tests fix(callbacks): preserve langfuse secret alias 2026-04-30 14:36:51 -07:00
mcp_tests Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_yj_apr17 2026-04-17 17:36:40 -07:00
multi_instance_e2e_tests
ocr_tests Merge branch 'litellm_internal_staging' into litellm_pages_support_for_ocr 2026-04-17 19:29:45 -07:00
old_proxy_tests/tests
openai_endpoints_tests style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
otel_tests [Test] Proxy E2E: Opt In To Client Mock Response For Model Access Tests 2026-04-30 17:05:31 -07:00
pass_through_tests [Test] Anthropic Passthrough: Bump Thinking Tests Off Legacy Sonnet 4 Alias 2026-05-01 19:33:08 -07:00
pass_through_unit_tests fix: block path traversal SSRF in BitBucket, Arize Phoenix, and AssemblyAI clients (#26943) 2026-05-01 11:45:12 -07:00
proxy_admin_ui_tests [Fix] CI/Tooling: Correct min-release-age value in .npmrc files 2026-04-29 19:49:27 -07:00
proxy_e2e_anthropic_messages_tests style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
proxy_security_tests style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
proxy_unit_tests Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_fix-ag-not-resolved 2026-05-01 17:21:29 -07:00
router_unit_tests fix(router): apply decoded provider for managed container IDs without model_id 2026-04-30 21:29:38 +00:00
scim_tests
search_tests style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
spend_tracking_tests [Fix] Harden spend accuracy test against transient aiohttp connection errors 2026-04-22 17:40:42 -07:00
store_model_in_db_tests style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_litellm fix(proxy): move pricing strip below the litellm_metadata JSON-string parse 2026-05-03 02:04:05 +00:00
unified_google_tests style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
vector_store_tests fix: drop milvus dbName and partitionNames from MILVUS_OPTIONAL_PARAMS 2026-04-30 11:51:32 -07:00
windows_tests style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
__init__.py
_flush_vcr_cache.py tests(vcr): isolate cassette redis to CASSETTE_REDIS_URL 2026-05-01 12:32:59 -07:00
_vcr_redis_persister.py fix(tests): anchor VCR redis cassette key to repo root 2026-05-01 23:27:18 +00:00
eval_swe_bench.py Prompt Compression - add it to the proxy (#25729) 2026-04-20 15:08:00 -07:00
gettysburg.wav
large_text.py
openai_batch_completions.jsonl
README.MD
test_budget_management.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_callbacks_on_proxy.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_config.py
test_debug_warning.py
test_default_encoding_non_root.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_end_users.py
test_entrypoint.py
test_fallbacks.py
test_gpt5_azure_temperature_support.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_health.py
test_keys.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_litellm_proxy_responses_config.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_logging.conf
test_models.py
test_new_vector_store_endpoints.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_openai_endpoints.py
test_organizations.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_otel_thread_leak.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_passthrough_endpoints.py
test_presidio_latency.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_proxy_server_non_root.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_ratelimit.py
test_resource_cleanup.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_service_logger_otel.py
test_spend_logs.py
test_team_logging.py
test_team_members.py
test_team.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_users.py

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.