litellm/tests/test_litellm/proxy
Lior Drihem 62b84d6aad
Prompt security litellm (#16365)
* add prompt security guardrails provider

* cosmetic

* small

* add file sanitization and update context window

* add pdf and OOXML files support

* add system prompt support

* add tests and documentation

* remove print

* fix PLR0915 Too many statements (96 > 50)

* cosmetic

* fix mypy error

* Fix failed tests due to naming conflict of responses directory with same-named pip package

* Fix mypy error: use 'aembedding' instead of 'embeddings' for async embedding call type

* Fix: Install enterprise package into Poetry virtualenv for tests

The GitHub Actions workflow was installing litellm-enterprise to system Python
using 'python -m pip install -e .', but tests run in Poetry's virtualenv using
'poetry run pytest'. This caused ImportError for enterprise package types.

Changed to 'poetry run pip install -e .' so the package is available in the
same virtualenv where pytest executes.

Fixes enterprise test collection errors in GitHub Actions CI.

* Move Prompt Security guardrail tests to tests/test_litellm/

Per reviewer feedback, move test_prompt_security_guardrails.py from
tests/guardrails_tests/ to tests/test_litellm/proxy/guardrails/ so
it will be executed by GitHub Actions workflow test-litellm.yml.

This ensures the Prompt Security integration tests run in CI.

---------

Co-authored-by: Ori Tabac <oritabac@prompt.security>
Co-authored-by: Vitaly Neyman <vitaly@prompt.security>
2025-11-24 11:44:20 -08:00
..
_experimental/mcp_server feat: add backend support for OAuth2 auth_type registration via UI (#17006) 2025-11-23 21:52:18 -08:00
anthropic_endpoints
auth Remove expired proxy admin keys from cache (#16894) 2025-11-22 14:23:28 -08:00
client [Feat] AI Gateway Auth - Allow using JWTs for signing in with Proxy CLI (#16756) 2025-11-17 19:47:29 -08:00
common_utils [Fix] Exclude litellm_credential_name from Sensitive Data Masker (Updated) (#16958) 2025-11-21 19:09:48 -08:00
db [Fix] UI - Hide Default Team Settings From Proxy Admin Viewers (#16900) 2025-11-23 22:01:38 -08:00
experimental/mcp_server
google_endpoints test google endpoints 2025-10-31 20:50:31 -07:00
guardrails Prompt security litellm (#16365) 2025-11-24 11:44:20 -08:00
health_endpoints Add Langfuse OTEL and SQS to health check (#16514) 2025-11-12 18:25:30 -08:00
hooks fix: prompt injection not working (#16701) 2025-11-17 20:04:57 -08:00
image_endpoints test fix 2025-10-17 10:46:42 -07:00
management_endpoints feat: add backend support for OAuth2 auth_type registration via UI (#17006) 2025-11-23 21:52:18 -08:00
management_helpers [MCP Gateway] Litellm mcp fixes team control (#15304) 2025-10-07 16:48:00 -07:00
middleware
openai_files_endpoint fix issue from pr review 2025-10-01 11:57:10 +08:00
pass_through_endpoints Milvus - Passthrough API support - adds create + read vector store support via passthrough API's (#16170) 2025-11-02 09:47:58 -08:00
prompts TestPromptVersionsEndpoint 2025-11-21 16:21:13 -08:00
public_endpoints Change provider create fields to JSON (#16985) 2025-11-23 21:57:22 -08:00
response_api_endpoints [Fix] - Responses API - add /openai routes for responses API. (Azure OpenAI SDK Compatibility) (#15988) 2025-10-27 19:12:13 -07:00
spend_tracking fix(spend-logs): trim logged response strings (#16654) 2025-11-18 20:12:49 -08:00
test_configs
ui_crud_endpoints [Infra] Litellm Backend SSO Changes (#16029) 2025-10-30 14:32:08 -07:00
vector_store_endpoints Vector store files Stable Release (#16643) 2025-11-15 13:00:33 -08:00
__init__.py test fix 2025-10-17 10:46:42 -07:00
test_batch_metadata_none_fix.py
test_caching_routes.py
test_common_request_processing.py [Feat] Cost Tracking - specify a global vendor discount for costs. (#15546) 2025-10-14 20:07:04 -07:00
test_custom_proxy.py fix(ui/): fix routing for custom server root path (#15701) 2025-10-23 13:59:29 -07:00
test_fastapi_offline_routes.py
test_health_check_functions.py
test_litellm_pre_call_utils.py Fix key model alias (#16896) 2025-11-20 16:05:49 -08:00
test_proxy_cli.py feature/add max requests env var 2025-09-28 19:18:56 +01:00
test_proxy_server.py [Feat] Prompt Management - Allow storing prompt version in DB (#16848) 2025-11-19 13:19:56 -08:00
test_proxy_types.py
test_proxy_utils.py fix(ui/): fix routing for custom server root path (#15701) 2025-10-23 13:59:29 -07:00
test_route_llm_request.py
test_shared_health_check.py Add shared healthcheck 2025-10-09 22:18:05 +05:30
test_spend_log_cleanup.py
test_swagger_chat_completions.py
test_team_member_update.py