Skip to content

Add Zscaler AI Guard hook - #15691

Merged
18 commits merged into
BerriAI:mainfrom
jwang-gif:litellm_zscaler_ai_guard_hook
Nov 11, 2025
Merged

18 commits merged into
BerriAI:mainfrom
jwang-gif:litellm_zscaler_ai_guard_hook

Conversation

@jwang-gif

Copy link
Copy Markdown
Contributor

Title

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • [ Y] I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • [ Y] I have added a screenshot of my new test passing locally
  • [ Y] My PR passes all unit tests on make test-unit
  • [ Y] My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature

Changes

-Add guard hook for Zscaler AI Guard (code, test, doc)
-Support moderation hooks(during-call, pre-call) and post-call

image image

Co-authored-by: Angela Tao <atao@zscaler.com>
@vercel

vercel Bot commented Oct 18, 2025

Copy link
Copy Markdown

@jwang-gif is attempting to deploy a commit to the CLERKIEAI Team on Vercel.

A member of the Team first needs to authorize it.

@ghost

ghost commented Oct 18, 2025

Copy link
Copy Markdown

Hi @jwang-gif can you fix your linting checks -

Screenshot 2025-10-17 at 7 35 22 PM

@jwang-gif

jwang-gif commented Oct 22, 2025 •

Copy link
Copy Markdown
Contributor Author

hi @krrishdholakia & team
For the latest commit(9), the lint test pass ,
see unit test got canceled, attached the local run results for all guardrail related unit test.
the failed cases are from existing code, and they all failed on main branch, also look at the error message, they are not caused by the code change.
Screenshot for run on my branch.
image
Screenshot for run on main branch

image

[Vercel] failure not related to new change

Comment thread litellm/proxy/guardrails/guardrail_initializers.py
Comment thread litellm/proxy/guardrails/guardrail_registry.py
Comment thread litellm/proxy/guardrails/guardrail_hooks/zscaler_ai_guard/zscaler_ai_guard.py Outdated
@jwang-gif

Copy link
Copy Markdown
Contributor Author

The failure on commit(14) is not related to this PR change

@ghost

ghost commented Nov 5, 2025

Copy link
Copy Markdown

@jwang-gif can you please implement the apply_guardrail function?

@ghost
ghost merged commit 443bada into BerriAI:main Nov 11, 2025
4 of 6 checks passed
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
* Add Zscaler AI Guard hook

Co-authored-by: Angela Tao <atao@zscaler.com>

* Fix lint error, update document

* Fix lint error, update document

* update document

* fix mypy type error

* fix mypy issue

* fix test

* fix test

* improve document

* remove unuseful code

* use litellm httphandler

* update test cases

* revover guardrail_initializers.py and guardrail_registry.py

* remove unuse import

* app apply_guardrail

* remove functions repleased by apply_guardrail, update test and doc

* remove functions repleased by apply_guardrail, update test and doc

---------

Co-authored-by: Angela Tao <atao@zscaler.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant