Skip to content

docs(guardrails): add the Decision Model guardrail page - #2264

Merged
yucheng-berri merged 1 commit into
mainfrom
litellm_decision_model_guardrail_docs
Oct 11, 2026
Merged

yucheng-berri merged 1 commit into
mainfrom
litellm_decision_model_guardrail_docs

Conversation

@yucheng-berri

@yucheng-berri yucheng-berri commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a Decision Model guardrail page for BerriAI/litellm#45663, which merged to main and was backported to rc/1.106.0 in BerriAI/litellm#45888. The page covers the config.yaml setup with a blocked and a passing request, the Admin UI flow (the evaluation-mode model picker, question cards, the Test section and the Guardrail Garden cards), how messages, tool calls and long inputs are screened, the fail_closed default and its 502, streaming post_call sampling and streaming_end_of_stream_only, cost and latency, the guardrail_information record, and a config reference. It also documents current gaps: guardrail decisions calls write no spend rows, chunks streamed before a flagged scan reach the client, a team-only decision model fails every call, and the edit page cannot change questions.

The decisions page gets a section linking to the guardrail, and the TypeSafe compaction page now says that guardrail never blocks and points to this one. The two screenshots come from the live audit of #45663 on its final UI.

Part of LIT-9443

🤖 Generated with Claude Code


Devin Review

Documents the decision_model guardrail from BerriAI/litellm#45663: config,
Admin UI create flow and Test section, failure semantics, streaming,
cost, logging and the config reference. Links it from the decisions and
TypeSafe compaction pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 11, 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 Oct 11, 2026 12:09am UTC

Request Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

| Property | Details |
|-------|-------|
| Description | Ask a decision model such as TypeSafe Jev yes/no questions you write about every request or response, and block or log when a question's probability reaches its threshold. |
| Provider | LiteLLM native. Any model that serves [`/v1/decisions`](../../decisions.md) can be the decision model: TypeSafe Jev, Perplexity, OpenAI, Microsoft Foundry, Databricks and the other providers listed there. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 vLLM guardrail screening fails on predicates

Selecting a vLLM model for decision_model fails screening because the guardrail sends predicates. vLLM accepts only choice questions, so guarded calls fail rather than receive a verdict.

Learn more

The decision model guardrail sends yes/no predicate questions for every check. The supported-provider note states that vLLM answers only choice questions. Listing all /v1/decisions models as guardrail-compatible therefore includes a model whose supported question type cannot serve any guardrail check.

Example: An operator selects hosted_vllm/Qwen/Qwen3-0.6B as the guardrail decision model and adds a block check. The first guarded request sends a predicate to vLLM and receives an error instead of a probability.

Recommended fix: Restrict the guardrail-compatible model list to providers that support predicate questions, and explicitly exclude vLLM here and in the Admin UI guidance unless the guardrail implements a supported choice-question translation.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@yucheng-berri
yucheng-berri merged commit 222b30b into main Oct 11, 2026
7 checks passed
@yucheng-berri
yucheng-berri deleted the litellm_decision_model_guardrail_docs branch October 11, 2026 00:19

This branch was previously deployed

1 inactive deployment
Preview — 42aa7000 Deployed Oct 11, 2026 by vercel[bot]
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