Parameters
See plugin common configurations for configuration options available to all plugins.
match_all_roles
If true, validate messages from all roles. If false, validate the message from
userrole only.match_all_conversation_history
If true, concatenate and check all messages in the conversation history. If false, only check the content of the last message.
This option does not apply to Responses API requests because
instructionsandinputare parallel fields rather than conversation history.allow_patterns
An array of RegEx patterns that messages should match. When configured, messages must match at least one pattern to be considered valid.
deny_patterns
An array of RegEx patterns that messages should not match. If messages match any of the patterns, the request should be rejected.
If both
allow_patternsanddeny_patternsare configured, the plugin first ensures that at least oneallow_patternsis matched.fail_mode
vaild vaule:
skip,warn, orerrorBehavior when the plugin receives a request it cannot inspect, such as non-AI traffic on a Consumer binding. With
skip, the request passes unchecked. Withwarn, it passes unchecked and a warning is logged. Witherror, the plugin rejects it with HTTP 400. None of these outcomes means prompt validation succeeded.Introduced in API7 Enterprise 3.9.14 and APISIX 3.18.0.
max_req_body_size
vaild vaule:
greater than or equal to 1
Maximum request body size in bytes buffered into memory. Larger request bodies are rejected with HTTP 400 before prompt validation. Introduced in API7 Enterprise 3.9.17 and 3.10.4, and APISIX 3.18.0.