Skip to content

docs(guardrails): add Alice WonderFence integration page#176

Open
lior-k wants to merge 1 commit into
BerriAI:mainfrom
lior-k:docs/alice_wonderfence
Open

docs(guardrails): add Alice WonderFence integration page#176
lior-k wants to merge 1 commit into
BerriAI:mainfrom
lior-k:docs/alice_wonderfence

Conversation

@lior-k
Copy link
Copy Markdown

@lior-k lior-k commented May 20, 2026

Summary

Adds the Alice WonderFence guardrail integration page under docs/proxy/guardrails/alice_wonderfence.md and registers it in sidebars.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:

  • Admin-pinned credential precedence (virtual key → team → request when opt-in → default for api_key; no default for app_id).
  • allow_request_metadata_override flag (defaults false so caller-controlled fields can't bypass admin-pinned credentials).
  • Action set: NO_ACTION, DETECT, MASK, BLOCK.
  • Fail-open behavior: emits ERROR log + omits the guardrail from x-litellm-applied-guardrails so consumers can detect scanning didn't run.

Test plan

  • npm install && npm run build succeeds locally
  • Sidebar lists the new page under Guardrails
  • Internal anchors (#multi-tenant-setup-per-app-credentials--policies) resolve

🤖 Generated with Claude Code

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

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

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment May 20, 2026 10:29am

Request Review

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>
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