Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis is a documentation-only PR that adds a new page for the Aegis open-source guardrail library and a corresponding sidebar entry. The previous version of this PR was revised to address a prior review comment about Key observations:
Confidence Score: 5/5Safe to merge — documentation only, no code changes, and the prior critical issue has been resolved All remaining findings are P2 style suggestions (missing explanatory caveats). The previous P0/P1 concern about a non-functional docs/my-website/docs/proxy/guardrails/aegis.md — proxy instrumentation and global-activation caveats could be clearer
|
| Filename | Overview |
|---|---|
| docs/my-website/docs/proxy/guardrails/aegis.md | Adds Aegis guardrail documentation using auto-instrumentation (monkey-patching) rather than LiteLLM's native guardrail registry — fundamentally different from every other provider in this section; missing caveats about global vs. per-request activation and proxy startup hook mechanism |
| docs/my-website/sidebars.js | Adds proxy/guardrails/aegis entry at the top of the third-party guardrail list; no issues |
Sequence Diagram
sequenceDiagram
participant U as User Code / Proxy
participant A as Aegis (monkey-patch)
participant L as litellm.completion (original)
participant LLM as LLM Provider
Note over U,A: Startup — aegis.auto_instrument() called
A->>L: wraps litellm.completion & acompletion
U->>A: litellm.completion(model, messages)
A->>A: run guardrails (injection, PII, policy)
alt Blocked
A-->>U: raise AegisGuardrailError
else Allowed
A->>L: forward call (original completion)
L->>LLM: API request
LLM-->>L: response
L-->>A: response
A->>A: post-call audit logging
A-->>U: response
end
Reviews (3): Last reviewed commit: "docs: fix non-functional start_proxy.py ..." | Re-trigger Greptile
| guardrails: | ||
| - guardrail_name: "aegis-guard" | ||
| litellm_params: | ||
| guardrail: aegis | ||
| mode: "pre_call" | ||
| - guardrail_name: "aegis-monitor" | ||
| litellm_params: | ||
| guardrail: aegis | ||
| mode: "pre_call" | ||
| on_flagged: "monitor" # Log violations but don't block |
There was a problem hiding this comment.
No backend implementation for
guardrail: aegis
The documentation instructs users to configure guardrail: aegis, but this value is not registered anywhere in the LiteLLM codebase. Using this configuration will immediately raise a runtime ValueError rather than working as documented.
The lookup chain in litellm/proxy/guardrails/guardrail_registry.py is:
- Check
guardrail_initializer_registry(built fromSupportedGuardrailIntegrationsenum + auto-discoveredguardrail_hooks/*/) - Check if
guardrail_typecontains"."(custom module path) - Otherwise →
raise ValueError(f"Unsupported guardrail: {guardrail_type}")
"aegis" is absent from both SupportedGuardrailIntegrations (litellm/types/guardrails.py) and the litellm/proxy/guardrails/guardrail_hooks/ directory. Every user who follows this guide will receive:
ValueError: Unsupported guardrail: aegis
The integration code (a guardrail_hooks/aegis/ module registered under SupportedGuardrailIntegrations.AEGIS) must be merged into LiteLLM before this documentation can be published. If the intent is to use the custom guardrail path (guardrail: aegis_module.AegisGuardrail), the documentation should instead reflect that pattern.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cd0d7b0 to
4296e7c
Compare
Remove the start_proxy.py code block that was a no-op (called auto_instrument() then exited without starting the proxy) and promote the environment variable approach as the sole proxy usage pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
(
docs/my-website/docs/proxy/guardrails/aegis.md)sidebars.jsWhat is Aegis?
Aegis is an open-source governance runtime for AI agents
that provides:
PyPI: https://pypi.org/project/agent-aegis/