litellm - 💡(How to fix) Fix [Feature]: generic_guardrail_api blocked requests not logged in Guardrails Monitor [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#27584Fetched 2026-05-11 03:13:58
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

The Feature

Hi,

I'm using a custom guardrail via generic_guardrail_api that correctly blocks requests and returns action: BLOCKED, the API call itself works fine. However, blocked requests never appear in the Guardrails Monitor UI (/ui/?page=guardrails-monitor).

Setup:

LiteLLM main-latest — version 1.82.6 (pulled May 9, 2026)

generic_guardrail_api with mode: "pre_call"

PostgreSQL backend with store_audit_logs: true and store_model_in_db: true

No external logging provider (Langfuse, etc.)

Expected behavior: Blocked requests appear in the Guardrails Monitor, the same way the built-in LiteLLM Content Filter logs them natively without any external provider.

Actual behavior: Nothing is logged. The monitor stays empty for generic_guardrail_api blocks.

Is this a known limitation for external guardrails, or is there a config I'm missing? Related to #23910, not sure if that PR covers this case.

Thanks

Motivation, pitch

I'm working on Ai gateway for a small company, I went here just to report the issue and saw the application.

What part of LiteLLM is this about?

Proxy

LiteLLM is hiring a founding backend engineer, are you interested in joining us and shipping to all our users?

Yes

Twitter / LinkedIn details

www.linkedin.com/in/sharif-derhem

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING