litellm/tests
stuxf 7066c895f6
chore: harden npm supply chain — pin overrides, enforce npm ci, add ignore-scripts (#24838)
* chore: harden npm supply chain — pin overrides, enforce npm ci, add ignore-scripts

Replace open-ended >= version overrides with exact pins matching lockfile
versions across all 6 package.json files. Remove dead overrides for packages
not present in lockfiles. Switch CI and devcontainer from npm install to
npm ci for deterministic lockfile-based installs.

Add .npmrc to all 7 JS project directories with ignore-scripts=true (blocks
postinstall RAT vectors like the axios@1.14.1 supply chain attack) and
min-release-age=3d (refuses packages published <3 days ago, requires npm
>=11.10). Remove Yarn-only resolutions field from docs/my-website.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: bump sharp to 0.33.5 in docs, add docs .npmrc

sharp 0.32.x uses postinstall to download native binaries, which breaks
with ignore-scripts=true. sharp 0.33+ distributes via optionalDependencies
instead, making it compatible with the new .npmrc hardening.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: remove docs .npmrc to fix Vercel deploy

Vercel's build for docs/my-website uses npm install which needs
sharp 0.32.6's postinstall script. Since we don't control Vercel's
build process, remove the .npmrc from docs rather than fight it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: Dockerfile npm ci + nvm checksum verification

- Replace npm install with npm ci in Dockerfile.non_root,
  Dockerfile.custom_ui, and spend-logs/Dockerfile for deterministic
  lockfile-based installs
- Replace curl-pipe-bash nvm install with download-then-verify pattern
  in build_admin_ui.sh, build_ui.sh, and build_ui_custom_path.sh
- Update nvm from v0.38.0 (2021) to v0.40.4 (Jan 2026) with SHA256
  checksum verification before execution

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: macOS sha256sum compat + clarify min-release-age scope

- Use shasum -a 256 fallback on macOS where sha256sum is unavailable
- Clarify in .npmrc comments that min-release-age only protects local
  npm install, not npm ci (used in CI)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 13:41:37 -07:00
..
agent_tests refactor: make unit test 2026-03-28 21:44:46 -07:00
audio_tests test: cleanup test impacted by deployment name change 2026-03-30 18:07:50 -07:00
basic_proxy_startup_tests
batches_tests test_create_vertex_fine_tune_jobs_mocked 2026-03-30 18:01:23 -07:00
benchmarks
code_coverage_tests
documentation_tests [Fix] Scope documentation workflow to match CircleCI and add missing router settings 2026-03-28 11:23:53 -07:00
enterprise test fix 2026-03-30 18:08:57 -07:00
guardrails_tests
image_gen_tests fix: cleanup tests 2026-03-30 16:24:35 -07:00
litellm fix(gemini-embeddings): convert task_type to camelCase taskType for Gemini API (#24191) 2026-03-20 22:32:22 +05:30
litellm_core_utils
litellm_utils_tests test: make tests smarter 2026-03-30 18:14:44 -07:00
litellm-proxy-extras [Infra] Mirror litellm_table_patch source changes (no binaries) 2026-03-27 16:45:12 -07:00
llm_responses_api_testing test: remove bad e2e tests - e2e failing due to low rate limits on ci/cd 2026-03-30 19:18:10 -07:00
llm_translation test_completion_azure 2026-03-30 21:54:27 -07:00
load_tests test: update to new vertex ai keys 2026-03-28 20:19:05 -07:00
local_testing fix 2026-03-30 21:33:47 -07:00
logging_callback_tests test_basic_s3_v2_logging 2026-03-30 18:17:52 -07:00
mcp_tests
multi_instance_e2e_tests
ocr_tests test: update to new vertex ai keys 2026-03-28 20:19:05 -07:00
old_proxy_tests/tests fix: cleanup tests 2026-03-30 16:24:35 -07:00
openai_endpoints_tests
otel_tests
pass_through_tests use mock tests for assembly AI 2026-03-30 19:59:32 -07:00
pass_through_unit_tests test_get_credentials_from_env 2026-03-30 16:02:14 -07:00
proxy_admin_ui_tests chore: harden npm supply chain — pin overrides, enforce npm ci, add ignore-scripts (#24838) 2026-03-31 13:41:37 -07:00
proxy_e2e_anthropic_messages_tests
proxy_e2e_azure_batches_tests
proxy_security_tests
proxy_unit_tests chore: fix test 2026-03-30 19:14:01 -07:00
router_unit_tests fix(router): address remaining Greptile review comments 2026-03-27 20:11:28 +05:30
scim_tests
search_tests
spend_tracking_tests
store_model_in_db_tests test: fix assemblyai passthrough transcription request format 2026-03-30 18:49:04 -07:00
test_litellm fix: mock encrypt_value_helper in lifecycle test 2026-03-30 21:36:40 -07:00
unified_google_tests test: update to new vertex ai keys 2026-03-28 20:19:05 -07:00
vector_store_tests test: update test apis 2026-03-28 18:57:27 -07:00
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: replace test_add_and_delete_models integration test with mock 2026-03-30 21:30:57 -07:00
test_new_vector_store_endpoints.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: cleanup dead tests 2026-03-28 20:49:02 -07:00
test_team_members.py
test_team.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.