Skip to content

Conversation

@lior-ps
Copy link
Contributor

@lior-ps lior-ps commented Nov 7, 2025

Title

Add Prompt Security Guardrail

Relevant issues

Add Prompt Security Guardrail

Pre-Submission checklist

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

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

Type

🆕 New Feature
📖 Documentation
✅ Test

Changes

@vercel
Copy link

vercel bot commented Nov 7, 2025

@lior-ps is attempting to deploy a commit to the CLERKIEAI Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Nov 7, 2025

CLA assistant check
All committers have signed the CLA.

@lior-ps lior-ps closed this Nov 7, 2025
@lior-ps lior-ps reopened this Nov 7, 2025
@krrishdholakia
Copy link
Contributor

@lior-ps can you fix the conflicts? I'm unable to merge this
Screenshot 2025-11-07 at 7 08 09 PM

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.
@lior-ps
Copy link
Contributor Author

lior-ps commented Nov 9, 2025

@lior-ps can you fix the conflicts? I'm unable to merge this Screenshot 2025-11-07 at 7 08 09 PM

@krrishdholakia fixed the tests related to our change. the other failures are not related to our code. can you please have a look?

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.
@tabac-ps
Copy link
Contributor

Hello @krrishdholakia ,
We would really appreciate this to be expedite.
We have several users wishing to try the new guardrails and would like to stay on the main branch as there are new updates regularly.
Is there something we can do in our side to push this forward?
Thank you!

@lior-ps
Copy link
Contributor Author

lior-ps commented Nov 24, 2025

@krrishdholakia how can we get this PR approved? Thanks
Only 2 tests are failing and these are not related to our changes. Just missing presidio env variables

FAILED tests/test_litellm/proxy/guardrails/guardrail_hooks/test_presidio.py::test_presidio_sets_guardrail_information_in_request_data - Exception: Missing `PRESIDIO_ANALYZER_API_BASE` from environment
FAILED tests/test_litellm/proxy/guardrails/guardrail_hooks/test_presidio.py::test_request_data_flows_to_apply_guardrail - Exception: Missing `PRESIDIO_ANALYZER_API_BASE` from environment

@krrishdholakia krrishdholakia merged commit 62b84d6 into BerriAI:main Nov 24, 2025
4 of 6 checks passed
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.

5 participants