The reference describes a guardrail policy's services
CI / test (push) Successful in 11m42s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-25 16:50:58 +01:00
1 parent 783dc9e9f6
commit 9e7de57816
3 files changed
+82

No files matched your search

+11
View File
@@ -485,6 +485,17 @@ var Reference = []Block{
{Key: "federation", Type: "Federation", Doc: "Federation is how this cluster takes part in federation with other\nllmgw clusters. The peers themselves are added at runtime, with\n`llmgw ctl federation add`, and kept in the store.", Nested: "config.Federation"},
{Key: "endpoints", Type: "[]Endpoint", Doc: "Endpoints is the phase-1 static replica list. It is only consulted when\nno model declares a profile, which is what makes a router-only smoke test\nagainst sim-engines possible without a control plane.", Nested: ""},
}},
{Package: "guard", Name: "Service", Title: "Service", Doc: "", Fields: []Field{
{Key: "name", Type: "string", Doc: "Name says which service decided, in the verdict's rule.", Nested: ""},
{Key: "url", Type: "string", Doc: "URL is POSTed the body.", Nested: ""},
{Key: "header_files", Type: "map[string]string", Doc: "HeaderFiles are headers whose values are read from files each time,\nso a rotated key needs no restart: {Authorization: /etc/…/lakera}.", Nested: ""},
{Key: "body", Type: "string", Doc: "Body is the request, a template given .Text; {{json .Text}} writes it\nas a JSON string. Empty is {\"input\": <text>}.", Nested: ""},
{Key: "blocked", Type: "string", Doc: "Blocked is where in the answer the service says the text is unsafe:\na dotted path, numbers for list items (results.0.flagged). True, a\nnumber above zero, a non-empty list or string other than \"false\" is\nunsafe.", Nested: ""},
{Key: "reason", Type: "string", Doc: "Reason is where it says why, for the verdict; optional.", Nested: ""},
{Key: "on", Type: "string", Doc: "On: input, output or both. Empty is input.", Nested: ""},
{Key: "action", Type: "string", Doc: "Action on unsafe: block or flag. Empty is block.", Nested: ""},
{Key: "timeout", Type: "time.Duration", Doc: "Timeout bounds one call. Empty is 3s; past it the policy's fail says.", Nested: ""},
}},
{Package: "config", Name: "ServingSettings", Title: "ServingSettings", Doc: "", Fields: []Field{
{Key: "stopped", Type: "bool", Doc: "Stopped takes every model down and answers every request for one with\n503 (system_stopped), leaving the control planes, agents and mirror\nrunning and every model's definition as it is: llmgw stop sets it,\nllmgw start clears it, and the models come back as their catalog\nentries ask. In force on every control plane within seconds.", Nested: ""},
}},
+1
View File
@@ -31,6 +31,7 @@ var Sources = []string{
"internal/router/admission/controller.go",
"internal/accounting/cost.go",
"internal/guard/policy.go",
"internal/guard/service.go",
"internal/guard/judge.go",
"internal/config/oidc.go",
"internal/config/ldap.go",