litellm/tests/test_litellm/proxy
Kenan Yildirim b8befb3403
Add CrowdStrike AIDR guardrail hook (#17876)
* Add CrowdStrike AIDR guardrail hook

* fixup! use apply_guardrail event hook

* fixup! update imports

* fix(guardrails): include AI response in CrowdStrike AIDR output events

Issue:
_build_guard_input_for_response() was:
- Sending only the original user input (messages).
- Not sending the AI provider response.

This fix will:
  - Extract response.choices from the ModelResponse object and include them in guard_input payload.
  - Thus, ensure AIDR output rules receive the AI-generated content for analysis.
  - Fix and update tests.

* fix(guardrails): prevent duplicate input events in CrowdStrike AIDR guardrail

Issue:
The CrowdStrike AIDR guardrail was running on during_call hooks wihtout event_hook configured.

This fix will:
- Set event_hook to ["pre_call", "post_call"] (AIDR admins will control what policy is applied)

This change will:
- Require default_on parameter
- Prevent duplicate API calls to AIDR for the same input
- Avoid unchecked AI provider API calls on during_call hook

* docs: add CrowdStrike AIDR to the list of Guardrails under Integrations

* docs: update CrowdStrike AIDR documentation page

---------

Co-authored-by: Konstantin Lapine <konstantin.lapine@crowdstrike.com>
2026-03-02 17:26:54 -08:00
..
_experimental/mcp_server fix: include mcp_tool_permissions server ids in allowed mcp servers (#22311) 2026-03-02 19:21:11 +05:30
agent_endpoints [Feat] Agent RBAC Permission Fix - Ensure Internal Users cannot create agents (#22329) 2026-02-27 18:32:39 -08:00
anthropic_endpoints
auth fix(types): filter null fields from reasoning output items (#22370) 2026-03-02 19:21:25 +05:30
client
common_utils fix req change 2026-02-28 16:34:23 +05:30
db merge: resolve conflict with origin/main in test_db_spend_update_writer.py 2026-02-25 12:15:53 -08:00
discovery_endpoints
experimental/mcp_server
google_endpoints fix: Metadata / Trace ID Missing in S3 Streaming Callbacks 2026-02-25 14:16:42 +05:30
guardrails Add CrowdStrike AIDR guardrail hook (#17876) 2026-03-02 17:26:54 -08:00
health_endpoints [Release Fix] (#22411) 2026-02-28 09:46:35 -08:00
hooks Litellm stability fix v2 (#22452) 2026-02-28 15:29:45 -08:00
image_endpoints
management_endpoints Merge pull request #22384 from BerriAI/litellm_aws_edge_case 2026-02-28 19:52:55 +05:30
management_helpers
middleware feat: add in_flight_requests metric to /health/backlog + prometheus (#22319) 2026-02-27 18:00:50 -08:00
openai_files_endpoint Litellm stability fix v2 (#22452) 2026-02-28 15:29:45 -08:00
pass_through_endpoints Development environment setup (#22432) 2026-02-28 14:50:06 -08:00
policy_engine
prompts
public_endpoints [Feature] Add /public/endpoints endpoint for provider endpoint support 2026-02-26 18:17:37 -08:00
rag_endpoints
response_api_endpoints
spend_tracking [Release Fix] (#22411) 2026-02-28 09:46:35 -08:00
test_configs
ui_crud_endpoints
vector_store_endpoints
__init__.py
conftest.py
test_aiohttp_cleanup_closed.py
test_api_key_masking_in_errors.py
test_audio_speech_prometheus_hooks.py fix req changes 2026-02-28 21:32:57 +05:30
test_batch_metadata_none_fix.py
test_caching_routes.py
test_chat_completion_metadata.py
test_common_request_processing.py _add_dd_apm_tags_for_litellm_call_id (#22219) 2026-02-26 16:42:23 -08:00
test_custom_proxy.py
test_empty_model_list.py [Release Fix] (#22411) 2026-02-28 09:46:35 -08:00
test_enforce_user_param.py
test_fallback_management_endpoints.py
test_fastapi_offline_routes.py
test_health_check_functions.py Fix_mapped tests part 2 2026-02-26 12:43:39 +05:30
test_health_check_max_tokens.py add docs and formatting 2026-02-28 14:08:09 +05:30
test_litellm_pre_call_utils.py Fix plaintext JWTs leaking in debug logs (#22424) 2026-02-28 15:44:38 -08:00
test_model_dump_with_preserved_fields.py Fix_mapped tests part 2 2026-02-26 12:43:39 +05:30
test_model_id_header_propagation.py
test_prometheus_cleanup.py Add Prometheus child_exit cleanup for gunicorn workers 2026-02-27 16:11:15 -08:00
test_proxy_cli.py [Release Fix] (#22411) 2026-02-28 09:46:35 -08:00
test_proxy_server.py Fix inflight mypy 2026-03-02 19:41:32 +05:30
test_proxy_types.py fix: Add PROXY_ADMIN role to system user for key rotation (#21896) 2026-02-27 19:11:29 -08:00
test_proxy_utils.py
test_pyroscope.py
test_response_model_sanitization.py
test_route_a2a_models.py
test_route_llm_request.py
test_shared_health_check.py Fix_mapped tests part 2 2026-02-26 12:43:39 +05:30
test_spend_log_cleanup.py
test_swagger_chat_completions.py [Release Fix] (#22411) 2026-02-28 09:46:35 -08:00
test_team_member_update.py
test_update_llm_router_resilience.py fix(proxy): isolate get_config failures from model loading in sync loop 2026-02-26 17:49:44 -03:00