Skip to content

docs(guardrails): document the flag() verdict for custom code guardrails - #1190

Merged
yassin-berriai merged 1 commit into
mainfrom
litellm_custom_code_flag_verdict_docs
Sep 5, 2026
Merged

docs(guardrails): document the flag() verdict for custom code guardrails#1190
yassin-berriai merged 1 commit into
mainfrom
litellm_custom_code_flag_verdict_docs

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Companion to BerriAI/litellm#39728 (Resolves LIT-6894). Adds flag(reason, metadata={}) to the custom code guardrail return-value table and a "Flagging without blocking" section: the request or response continues unchanged, a guardrail_flagged entry is recorded with the guardrail name, configured mode, input_type, reason and metadata, the Monitor counts it as flagged rather than passed or blocked, Request Logs shows flagged (most severe phase wins when a guardrail runs on both pre_call and post_call), and the request-level guardrail_status becomes guardrail_flagged unless another guardrail blocked or failed. Includes an audit-only config example and the resulting logging entry.

npm run build passes locally.

Link to Devin session: https://app.devin.ai/sessions/1b006929b7a3436797ef22a7ce2e3ef4
Open in Devin Desktop: https://app.devin.ai/desktop/session/1b006929b7a3436797ef22a7ce2e3ef4?variant=devin
Requested by: @yassin-berriai

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
litellm Ready Ready Preview Sep 4, 2026 9:55am UTC

Request Review

@yassin-berriai
yassin-berriai merged commit 58ac466 into main Sep 5, 2026
3 checks passed
@yassin-berriai
yassin-berriai deleted the litellm_custom_code_flag_verdict_docs branch September 5, 2026 18:38
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