docs(guardrails): add Alice WonderFence integration page#176
Open
lior-k wants to merge 1 commit into
Open
Conversation
Adds the Alice WonderFence guardrail integration page (moved from the litellm repo where it shouldn't live per CLAUDE.md). Reflects the current admin-pinned credential precedence model: virtual key and team metadata always win over request metadata, and per-request overrides require an explicit opt-in flag. Companion to litellm PR #26901. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
lior-k
added a commit
to lior-k/litellm
that referenced
this pull request
May 20, 2026
…rn, drop in-repo doc Addresses two PR BerriAI#26901 blockers: 1. **Size-gate CI**: `alice_wonderfence.py` (+627 LOC) and the monolithic test file (+1011 LOC) tripped the 500-added-LOC threshold. Both are split along separation-of-concerns boundaries — no behavioral changes, only relocation and import rewiring. Largest resulting file is 496 LOC. Production split: - exceptions.py — WonderFenceMissingSecrets, WonderFenceBlockedError - client_cache.py — SDK lazy import + LRU client cache helper - credentials.py — api_key/app_id resolution + request-scoped stash bridge - processing.py — analysis context build, text extract, action dispatch - alice_wonderfence.py — WonderFenceGuardrail class (orchestrator) Test split (under tests/.../alice_wonderfence/): - conftest.py — shared SDK-stub + guardrail-factory fixtures - test_credentials.py — resolver precedence + override-flag tests - test_client_cache.py — LRU cache + initialization + missing-SDK tests - test_apply_guardrail.py — BLOCK/MASK/DETECT/NO_ACTION + fail modes - test_post_call_bridge.py — logging_obj stash + sibling fallback 2. **Maintainer request**: drop docs/my-website/docs/proxy/guardrails/ alice_wonderfence.md from this repo per CLAUDE.md (docs live in BerriAI/litellm-docs). The page has been ported to litellm-docs in BerriAI/litellm-docs#176. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Alice WonderFence guardrail integration page under
docs/proxy/guardrails/alice_wonderfence.mdand registers it insidebars.js.This is the companion docs PR for upstream litellm PR BerriAI/litellm#26901. The page was originally added in the litellm repo; on maintainer request it has been moved here (per the litellm CLAUDE.md note that docs live in this repo).
Page content matches the current implementation in litellm
main:api_key; no default forapp_id).allow_request_metadata_overrideflag (defaultsfalseso caller-controlled fields can't bypass admin-pinned credentials).NO_ACTION,DETECT,MASK,BLOCK.ERRORlog + omits the guardrail fromx-litellm-applied-guardrailsso consumers can detect scanning didn't run.Test plan
npm install && npm run buildsucceeds locally#multi-tenant-setup-per-app-credentials--policies) resolve🤖 Generated with Claude Code