Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
classifier_context | Optional[components.ArmorContext] | ➖ | The Armor context: Claude Code’s classifier_context (v1), with auto_mode.{hard_deny,soft_deny,allow} rules as strings or { id, instructions, threshold? } objects and auto_mode.environment entries as "Name: value" strings or { name, value } objects. threshold applies when Armor evaluates; when the provider evaluates natively (Anthropic dangerous-tool-use beta) rules are judged at the provider’s own boundary. | { “auto_mode”: { “allow”: [], “environment”: [ “Trusted repo: github.com/acme/app” ], “hard_deny”: [], “soft_deny”: [ { “id”: “secrets-in-vcs”, “instructions”: “Staging, committing or pushing a file that holds secrets, including indirectly through git add -A when the tree shows one.” } ] }, “v”: 1 } |
mode | Optional[components.GuardrailModerationPolicyConfigMode] | ➖ | enforce withholds blocked calls; audit evaluates and reports the same verdicts without withholding any calls, regardless of on_error. Default enforce. | |
on_error | Optional[components.GuardrailModerationPolicyConfigOnError] | ➖ | When the classifier cannot answer (timeout, upstream error, context too long) the call is reported unavailable; block rejects it and log releases it. Default block. | |
use_cc_style_default_rules | Optional[bool] | ➖ | Prepend Claude Code’s built-in auto-mode rule set (1 hard-deny, 72 soft-deny, 17 allow, 21 environment slots) ahead of every configured rule. Defaults to true on the Anthropic Messages API and false elsewhere. |