litellm/tests/unit/proxy/guardrails/guardrail_hooks
yucheng-berri c3ca8a5140
feat(guardrails): add Wingback guardrail integration (#46136)
* feat(guardrails): add Wingback guardrail integration

Mirrored from #38685 at d73b66544d (net diff against its merge base, applied on main)

* fix(guardrails): dispatch Wingback through the unified guardrail

The proxy only runs a unified guardrail when apply_guardrail is defined on
the guardrail's own class, so WingbackGuardrail now binds the parent's
decorated method in its class body. Chat, messages and responses pre, post
and during call checks reach Wingback again, and each check logs once.

Also types the initializer and config model for the lint gates and uses
monkeypatch.setenv in the unit test

* chore(guardrails): drop the Wingback dispatch comment

The unit and integration hook tests already fail when the apply_guardrail binding is removed, so the comment is redundant under the repo comment rule

---------

Co-authored-by: bsk-wb <bharath@wingback.ai>
Co-authored-by: yucheng-berri <293926326+yucheng-berri@users.noreply.github.com>
2026-10-12 22:18:10 -07:00
..
akto feat(guardrails): support logging_only mode for the Akto guardrail (#45461) 2026-10-08 17:28:08 -07:00
aporia_ai refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
azure fix(guardrails): restore Azure guardrail get_user_prompt dispatch and allow logging (#44067) 2026-10-01 23:30:32 -07:00
content_filter refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
dynamoai test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
guardrails_ai test: move routing, caching and callback tests out of local_testing (#45761) 2026-10-10 09:33:09 -07:00
javelin test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
litellm_content_filter test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
noma refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
openai test: move offline proxy auth, hook, spend and pass-through tests to tests/unit (#45568) 2026-10-09 09:49:13 -07:00
semantic_guard test: migrate SDK and proxy-booting legacy CircleCI tests to their tiers (#45758) 2026-10-11 00:17:21 -07:00
unified_guardrails fix(guardrails): scan or refuse attachments in the bedrock guardrail (#43383) 2026-10-10 16:48:37 -07:00
zscaler_ai_guard feat(zscaler_ai_guard): send the request user to AI Guard (#46094) 2026-10-12 16:13:22 -07:00
__init__.py
_cisco_ai_defense_test_utils.py
code_execution_compliance_dataset.json
test_agent_365.py feat(mcp): hand listed-tool description and input schema to pre-call hooks per caller (#41162) 2026-10-04 00:53:58 -07:00
test_aim.py test: move routing, caching and callback tests out of local_testing (#45761) 2026-10-10 09:33:09 -07:00
test_alice.py
test_bedrock_guardrails.py fix(guardrails): scan or refuse attachments in the bedrock guardrail (#43383) 2026-10-10 16:48:37 -07:00
test_bedrock_invoke_guardrail_checks.py
test_block_code_execution.py
test_block_code_execution_compliance.py
test_cato_networks.py
test_cisco_ai_defense_chat.py
test_cisco_ai_defense_mcp.py
test_compresr.py
test_conduct.py
test_crowdstrike_aidr.py
test_custom_code_bounded_execution.py
test_decision_model.py fix(guardrails): honor decision model streaming buffering (#46086) 2026-10-12 16:28:22 -07:00
test_deepkeep.py test: migrate SDK and proxy-booting legacy CircleCI tests to their tiers (#45758) 2026-10-11 00:17:21 -07:00
test_dynamoai.py
test_enkryptai.py
test_generic_guardrail_api.py feat(policy-engine): stream detect-only post_call pipeline steps live when buffering is off (#45516) 2026-10-09 15:46:51 -07:00
test_grayswan.py
test_headroom.py test(headroom): pin that SDK-echoed null tool_calls never reach /v1/compress (#39667) 2026-10-10 17:29:46 -07:00
test_hiddenlayer.py fix(guardrails): avoid blocking the event loop during HiddenLayer JWT refresh (#45437) 2026-10-09 22:29:24 -07:00
test_javelin.py
test_lakera_ai_v2.py test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
test_lasso.py test: migrate SDK and proxy-booting legacy CircleCI tests to their tiers (#45758) 2026-10-11 00:17:21 -07:00
test_llm_shield_proxy.py refactor: remove fresh tech debt from the 2026-10-05 window (#44821) 2026-10-06 08:33:39 +00:00
test_mcp_end_user_permission.py
test_mcp_security.py fix(mcp): keep worker MCP configurations consistent via a catalog revision (#42568) 2026-10-06 18:21:29 -07:00
test_microsoft_purview.py
test_model_armor.py
test_noma.py
test_noma_v2.py
test_onyx.py
test_ovalix.py
test_pangea.py
test_panw_prisma_airs.py fix(security): remove the publicly known master key from the repo (#44718) 2026-10-06 10:55:24 -07:00
test_presidio.py test: move 76 live top-level tests to offline unit and integration coverage (#45352) 2026-10-08 10:33:35 -07:00
test_presidio_union_fix.py
test_promptguard.py
test_qualifire.py
test_repelloai.py
test_response_rejection_guardrail_code.py
test_singulr.py
test_straiker.py fix(security): remove the publicly known master key from the repo (#44718) 2026-10-06 10:55:24 -07:00
test_structured_messages_writeback.py
test_tool_permission.py
test_tool_policy_guardrail.py
test_typesafe.py
test_vigil_guard.py
test_wingback.py feat(guardrails): add Wingback guardrail integration (#46136) 2026-10-12 22:18:10 -07:00
test_xecguard.py