Put guard policies in the configuration reference
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
dc788e5cda
commit
0b4c4f0698
3 files changed
+236
No files matched your search
@@ -108,11 +108,26 @@ rather than repeated.
|
||||
| `path` | `string` | [OriginFile](#originfile) |
|
||||
| `sha256` | `string` | [OriginFile](#originfile) |
|
||||
| `bytes` | `int64` | [OriginFile](#originfile) |
|
||||
| `name` | `string` | [Pattern](#pattern) |
|
||||
| `regex` | `string` | [Pattern](#pattern) |
|
||||
| `action` | `string` | [Pattern](#pattern) |
|
||||
| `disabled` | `bool` | [Personal](#personal) |
|
||||
| `rpm` | `int` | [Personal](#personal) |
|
||||
| `tpm` | `int` | [Personal](#personal) |
|
||||
| `budget` | `float64` | [Personal](#personal) |
|
||||
| `period` | `string` | [Personal](#personal) |
|
||||
| `mode` | `string` | [Policy](#policy) |
|
||||
| `fail` | `string` | [Policy](#policy) |
|
||||
| `no_store` | `bool` | [Policy](#policy) |
|
||||
| `input` | `Rules` | [Policy](#policy) |
|
||||
| `output` | `Rules` | [Policy](#policy) |
|
||||
| `tools` | `Tools` | [Policy](#policy) |
|
||||
| `max_output_tokens` | `int` | [Policy](#policy) |
|
||||
| `system_prompt` | `string` | [Policy](#policy) |
|
||||
| `drop_client_system` | `bool` | [Policy](#policy) |
|
||||
| `require_capabilities` | `bool` | [Policy](#policy) |
|
||||
| `validate_structured` | `bool` | [Policy](#policy) |
|
||||
| `stream` | `string` | [Policy](#policy) |
|
||||
| `enabled` | `bool` | [Prefix](#prefix) |
|
||||
| `max_nodes` | `int` | [Prefix](#prefix) |
|
||||
| `min_match` | `int` | [Prefix](#prefix) |
|
||||
@@ -156,6 +171,10 @@ rather than repeated.
|
||||
| `timeouts` | `Timeouts` | [Router](#router) |
|
||||
| `scoring` | `Scoring` | [Router](#router) |
|
||||
| `admission` | `Admission` | [Router](#router) |
|
||||
| `pii` | `map[string]string` | [Rules](#rules) |
|
||||
| `injection` | `string` | [Rules](#rules) |
|
||||
| `deny` | `[]Pattern` | [Rules](#rules) |
|
||||
| `max_chars` | `int` | [Rules](#rules) |
|
||||
| `python` | `string` | [SGLangConfig](#sglangconfig) |
|
||||
| `ttft_p99` | `time.Duration` | [SLO](#slo) |
|
||||
| `tpot_p99` | `time.Duration` | [SLO](#slo) |
|
||||
@@ -202,6 +221,11 @@ rather than repeated.
|
||||
| `first_token` | `time.Duration` | [Timeouts](#timeouts) |
|
||||
| `idle` | `time.Duration` | [Timeouts](#timeouts) |
|
||||
| `total` | `time.Duration` | [Timeouts](#timeouts) |
|
||||
| `allow` | `[]string` | [Tools](#tools) |
|
||||
| `deny` | `[]string` | [Tools](#tools) |
|
||||
| `on_denied` | `string` | [Tools](#tools) |
|
||||
| `max_calls_per_turn` | `int` | [Tools](#tools) |
|
||||
| `validate_arguments` | `bool` | [Tools](#tools) |
|
||||
| `endpoint` | `string` | [Tracing](#tracing) |
|
||||
| `sample_ratio` | `float64` | [Tracing](#tracing) |
|
||||
| `bin` | `string` | [VLLMConfig](#vllmconfig) |
|
||||
@@ -247,6 +271,8 @@ rather than repeated.
|
||||
| `sglang` | `SGLangConfig` | [engines.Config](#enginesconfig) |
|
||||
| `llamacpp` | `LlamaCppConfig` | [engines.Config](#enginesconfig) |
|
||||
| `sim` | `SimConfig` | [engines.Config](#enginesconfig) |
|
||||
| `default` | `[]string` | [guard.Config](#guardconfig) |
|
||||
| `policies` | `map[string]Policy` | [guard.Config](#guardconfig) |
|
||||
| `work_dir` | `string` | [supervisor.Config](#supervisorconfig) |
|
||||
| `log_lines` | `int` | [supervisor.Config](#supervisorconfig) |
|
||||
| `stop_timeout` | `time.Duration` | [supervisor.Config](#supervisorconfig) |
|
||||
@@ -934,6 +960,20 @@ Takes a [PreviousOrigin](#previousorigin) block.
|
||||
|
||||
`int64`
|
||||
|
||||
## Pattern
|
||||
|
||||
### `name`
|
||||
|
||||
`string`
|
||||
|
||||
### `regex`
|
||||
|
||||
`string`
|
||||
|
||||
### `action`
|
||||
|
||||
`string`
|
||||
|
||||
## Personal
|
||||
|
||||
### `disabled`
|
||||
@@ -961,6 +1001,91 @@ Budget is in whole units per Period ("day" or "month").
|
||||
|
||||
`string`
|
||||
|
||||
## Policy
|
||||
|
||||
### `mode`
|
||||
|
||||
`string`
|
||||
|
||||
Mode: enforce acts, shadow only records what it would have done, off
|
||||
does nothing. Empty is enforce.
|
||||
|
||||
### `fail`
|
||||
|
||||
`string`
|
||||
|
||||
Fail: what happens when a policy cannot judge — a judge model down or
|
||||
over its latency budget. open serves, closed refuses. Empty is open.
|
||||
|
||||
### `no_store`
|
||||
|
||||
`bool`
|
||||
|
||||
NoStore keeps nothing of the request: no stored conversation, no
|
||||
memory notes, no prefix routing, no fallback outside the cluster.
|
||||
|
||||
### `input`
|
||||
|
||||
`Rules`
|
||||
|
||||
Takes a [Rules](#rules) block.
|
||||
|
||||
### `output`
|
||||
|
||||
`Rules`
|
||||
|
||||
Takes a [Rules](#rules) block.
|
||||
|
||||
### `tools`
|
||||
|
||||
`Tools`
|
||||
|
||||
Takes a [Tools](#tools) block.
|
||||
|
||||
### `max_output_tokens`
|
||||
|
||||
`int`
|
||||
|
||||
MaxOutputTokens is put in a request that asks for no limit; one
|
||||
asking for more is lowered to it.
|
||||
|
||||
### `system_prompt`
|
||||
|
||||
`string`
|
||||
|
||||
SystemPrompt is put before every request's messages.
|
||||
|
||||
### `drop_client_system`
|
||||
|
||||
`bool`
|
||||
|
||||
DropClientSystem removes the caller's own system and developer
|
||||
messages, so only the pinned prompt instructs the model.
|
||||
|
||||
### `require_capabilities`
|
||||
|
||||
`bool`
|
||||
|
||||
RequireCapabilities refuses a request offering tools, or sending
|
||||
images, to a model whose catalog entry does not say it takes them.
|
||||
|
||||
### `validate_structured`
|
||||
|
||||
`bool`
|
||||
|
||||
ValidateStructured checks an answer against the JSON schema the
|
||||
request asked for in response_format: one that does not fit is
|
||||
stopped — or, streamed a sentence at a time, flagged, having been
|
||||
sent already.
|
||||
|
||||
### `stream`
|
||||
|
||||
`string`
|
||||
|
||||
Stream: sentence scans a streamed answer a sentence at a time,
|
||||
releasing each once it passes; buffer_all holds the whole answer
|
||||
until it is judged. Empty is sentence.
|
||||
|
||||
## Prefix
|
||||
|
||||
### `enabled`
|
||||
@@ -1257,6 +1382,33 @@ Takes a [Scoring](#scoring) block.
|
||||
|
||||
Takes a [Admission](#admission) block.
|
||||
|
||||
## Rules
|
||||
|
||||
### `pii`
|
||||
|
||||
`map[string]string`
|
||||
|
||||
PII maps a kind (email, phone, iban, card, tckn, ip, secret) to what is
|
||||
done when it is found: flag, redact or block.
|
||||
|
||||
### `injection`
|
||||
|
||||
`string`
|
||||
|
||||
Injection is what is done on signs of prompt injection: flag or block.
|
||||
|
||||
### `deny`
|
||||
|
||||
`[]Pattern`
|
||||
|
||||
Deny are patterns, matched against the text as a model reads it.
|
||||
|
||||
### `max_chars`
|
||||
|
||||
`int`
|
||||
|
||||
MaxChars refuses text longer than this; zero is no limit.
|
||||
|
||||
## SGLangConfig
|
||||
|
||||
### `python`
|
||||
@@ -1504,6 +1656,8 @@ are checked for, and what is done. Applied to every request through
|
||||
guard.default, and to parts of the tenancy tree by attaching them
|
||||
(llmgw ctl guard attach). Empty checks nothing.
|
||||
|
||||
Takes a [guard.Config](#guardconfig) block.
|
||||
|
||||
### `firewall_networks`
|
||||
|
||||
`[]string`
|
||||
@@ -1615,6 +1769,41 @@ about a hundred tokens on a slow model.
|
||||
|
||||
`time.Duration`
|
||||
|
||||
## Tools
|
||||
|
||||
### `allow`
|
||||
|
||||
`[]string`
|
||||
|
||||
Allow, when set, are the only tool names a request may offer and a
|
||||
model may call.
|
||||
|
||||
### `deny`
|
||||
|
||||
`[]string`
|
||||
|
||||
Deny are tool names never offered or called.
|
||||
|
||||
### `on_denied`
|
||||
|
||||
`string`
|
||||
|
||||
OnDenied is strip (the tool is removed from the request) or block.
|
||||
Empty is strip.
|
||||
|
||||
### `max_calls_per_turn`
|
||||
|
||||
`int`
|
||||
|
||||
MaxCallsPerTurn stops an answer calling more tools than this.
|
||||
|
||||
### `validate_arguments`
|
||||
|
||||
`bool`
|
||||
|
||||
ValidateArguments checks a call's arguments against the parameters
|
||||
schema the request declared for the tool.
|
||||
|
||||
## Tracing
|
||||
|
||||
### `endpoint`
|
||||
@@ -1931,6 +2120,16 @@ Takes a [LlamaCppConfig](#llamacppconfig) block.
|
||||
|
||||
Takes a [SimConfig](#simconfig) block.
|
||||
|
||||
## guard.Config
|
||||
|
||||
### `default`
|
||||
|
||||
`[]string`
|
||||
|
||||
### `policies`
|
||||
|
||||
`map[string]Policy`
|
||||
|
||||
## supervisor.Config
|
||||
|
||||
### `work_dir`
|
||||
|
||||
Reference in new issue
Block a user