docs: add the Alice guardrail page - #1056
Open
seanyasno-af wants to merge 1 commit into
Open
Conversation
Documents `alice.evaluate`, added in Portkey-AI/gateway#1791. Adds `integrations/guardrails/alice.mdx`, registers it in `docs.json`, and adds a card to the partner list in `product/guardrails/list-of-guardrail-checks.mdx`. The page follows the shape of the recent provider pages (CrowdStrike AIDR, F5): credentials, adding the check, parameters, supported hooks, config and request samples. Three sections go beyond that template, because they are the parts an operator is most likely to get wrong: **Naming the application.** Alice configures policies per application and a project usually holds several, so one API key fronts all of them and the application has to be a parameter on the check rather than a credential. A guardrail naming none fails its check rather than being measured against a guess, which would otherwise be a confusing first-run failure. The section covers where the id comes from, what to do when different traffic needs different policies, and why it is deliberately not read from request metadata. **What is sent.** The plugin forwards the hook context unchanged so that what is worth evaluating stays Alice's decision, with credentials as the single exception: `headers`, `credentials`, `api_key`, `apiKey`, `authorization` and `cookie` are dropped at any nesting depth and never leave the Gateway. **When Alice cannot be reached.** Every failure, a 4xx included, is reported as a check error rather than as a pass, which makes `failOnError` the single place that decides whether unscreened traffic proceeds. Both settings are spelled out. The streaming caveat is stated honestly too: blocking works on a streamed response, masking does not. Verified with `npx mint broken-links` — the new page and the edited list report none. The card omits `img`, following the Akto card, rather than adding an asset.
seanyasno-af
force-pushed
the
feat/alice-guardrail
branch
from
September 3, 2026 08:09
2879859 to
968d09e
Compare
seanyasno-af
marked this pull request as ready for review
September 3, 2026 08:13
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.
Documents
alice.evaluate, added in Portkey-AI/gateway#1791. Companion to that PR — happy to hold this until the plugin's shape is agreed.What this adds
integrations/guardrails/alice.mdxdocs.json(Integrations → Guardrails, afterakto)product/guardrails/list-of-guardrail-checks.mdxThe page follows the shape of the recent provider pages (CrowdStrike AIDR, F5): credentials, adding the check, the parameter table, supported hooks, and the config + request samples.
Three sections go beyond that template
They are the parts an operator is most likely to get wrong, so they get their own headings rather than a table row.
Naming the application. Alice configures policies per application, and a project usually holds several — one API key fronts all of them, so the application has to be a parameter on the check rather than part of the credential. A guardrail naming none fails its check rather than being measured against a guess, which would otherwise be a confusing first-run failure. The section covers where the id comes from, what to do when different traffic needs different policies, and why it is deliberately not read from
x-portkey-metadata(the caller writes that, so it would let a caller point their own traffic at laxer policies).What is sent. The plugin forwards the hook context unchanged, so what is worth evaluating stays Alice's decision rather than something users upgrade their Gateway for. Credentials are the single exception:
headers,credentials,api_key,apiKey,authorizationandcookieare dropped at any nesting depth and never leave the Gateway.When Alice cannot be reached. Every failure — a
4xxincluded — is reported as a check error rather than as a pass, which makesfailOnErrorthe single place that decides whether unscreened traffic proceeds. Both settings are spelled out, with a note on when to pick which.The streaming caveat is stated honestly too: blocking works on a streamed response, masking does not.
Checks run
npx mint broken-links— the new page and the edited list report none. (The run does surface pre-existing broken links elsewhere, mostly undervirtual_key_old/; none are touched here.)docs.jsonparses.One choice worth flagging
The card omits
img, following the existing Akto card, rather than adding a logo asset to the repo. Glad to add one if you'd prefer the grid stay uniform — just say where the file should live.