litellm/tests
Cursor Agent 9c71a3ac16
test(vertex): pin Gemini Embedding 2 cost cases to the in-repo cost map
TestProcessEmbedContentResponseUsage checks per-image, per-video-second, and
per-audio-second billing for gemini-embedding-2. Those rates live in this
branch's model_prices_and_context_window.json, but at import time
litellm.model_cost is fetched from main, which has migrated the same model to
per-token pricing. In CI the fetch succeeds and prompt_cost drops to 0 (image
cases) or misses the video component (audio+video), so the class-level assertions
against the checked-in rates fail. Reuse the existing local_model_cost_map
fixture in tests/test_litellm/conftest.py so the class always reads the in-repo
map and clears the get_model_info LRU cache on entry and exit.

Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
2026-09-21 13:22:27 +00:00
..
agent_tests
audio_tests
base_sdk_tests
basic_proxy_startup_tests
batches_tests
benchmarks
code_coverage_tests test(e2e): verify IdP readiness through real HTTP 2026-09-11 17:25:38 -07:00
documentation_tests
e2e docs(e2e): ban unit tests under tests/e2e (#33852) 2026-09-12 21:13:43 -07:00
enterprise fix(projects): persist explicit budget cap clears 2026-09-12 13:43:55 -07:00
guardrails_tests
image_gen_tests
integration
litellm-proxy-extras
litellm_utils_tests
llm_responses_api_testing
llm_translation
load_tests
local_testing
logging_callback_tests Merge origin/litellm_internal_staging into litellm_spend_log_request_id_call_id 2026-09-12 21:04:25 -07:00
mcp_tests
multi_instance_e2e_tests
ocr_tests test(ocr): exempt native parity requests from cassette replay 2026-09-11 22:50:39 -07:00
openai_endpoints_tests test(responses): fix stale Anthropic smoke request 2026-09-11 13:56:27 -07:00
otel_tests
pass_through_tests
pass_through_unit_tests
proxy_admin_ui_tests
proxy_behavior fix(proxy): attribute gate-rejected requests to their endpoint in cache analytics (#40824) 2026-09-12 16:03:38 -07:00
proxy_e2e_anthropic_messages_tests
proxy_migration_tests
proxy_security_tests
proxy_unit_tests perf(proxy): serialize /model/info listing once with orjson 2026-09-14 09:37:00 +00:00
router_unit_tests
rust-python-harness refactor(ocr): complete native lifecycle and preserve Azure auth (#40734) 2026-09-12 11:56:49 -07:00
search_tests
spend_tracking_tests
store_model_in_db_tests test(proxy): expect the sanitized unknown-model message in the spend-log error test 2026-09-11 19:18:10 -07:00
test_gateway
test_litellm test(vertex): pin Gemini Embedding 2 cost cases to the in-repo cost map 2026-09-21 13:22:27 +00:00
test_litellm_rust Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_ocr_custom_pricing 2026-09-12 15:42:59 -07:00
unified_google_tests
vector_store_tests
windows_tests
__init__.py
_fake_openai_endpoint_server.py
_flush_vcr_cache.py
_live_test_helpers.py
_openai_record_replay_proxy.py
_vcr_conftest_common.py
_vcr_redis_persister.py
_wait_helpers.py
_ws_vcr.py
eval_swe_bench.py
fake_openai_endpoint.py
gettysburg.wav
large_text.py
openai_batch_completions.jsonl
pyrightconfig.json
README.MD
test_anthropic_compaction_usage.py
test_budget_management.py
test_callbacks_on_proxy.py
test_debug_warning.py
test_default_encoding_non_root.py
test_end_users.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_new_vector_store_endpoints.py
test_openai_endpoints.py
test_organizations.py
test_otel_thread_leak.py
test_presidio_latency.py
test_proxy_server_non_root.py
test_ratelimit.py
test_resource_cleanup.py
test_rust_python_harness.py
test_service_logger_otel.py
test_spend_logs.py
test_team.py
test_team_logging.py
test_team_members.py
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.