Skip to content

Guardrails: Inline validator support #1247

Closed

Description

@AkhileshNegi

Is your feature request related to a problem?
Guardrail entries in an LLM config can only reference a saved validator_config_id, preventing direct definition of validators and requiring deletion to disable, which loses setup.

Describe the solution you'd like

  • Allow guardrail entries to be a validator_config_id or an inline validator spec (type, on_fail, per-type params).
  • Restrict inline type to gender_assumption_bias, pii_remover, profanity_free, topic_relevance_llm.
  • Add an is_enabled flag (default true) to both entry types. Disabled entries remain saved but are not fetched or sent.
  • Send validators in config order to the guardrails service. Include stage on inline specs and remove is_enabled to comply with validator schemas.
Original issue

Is your feature request related to a problem?
Guardrail entries in an LLM config blob (input_guardrails / output_guardrails) can only reference a validator_config_id saved in the guardrails service. A validator cannot be defined directly in the config, and the only way to turn one off is to delete it from the config version, which loses its setup.

Describe the solution you'd like

  • Let each guardrail entry be either a validator_config_id reference or an inline validator spec (type, on_fail, per-type params).
  • Restrict inline type to gender_assumption_bias, pii_remover, profanity_free, topic_relevance_llm for now.
  • Add an is_enabled flag (default true) to both entry kinds. Disabled entries stay saved in the config version but are never fetched or sent to the guardrails service.
  • Send validators to the guardrails service in config order. Stamp stage on inline specs and strip is_enabled, since the service's validator schemas forbid extra fields.

Comments: Implemented in #1245.

Activity

  1. changed the title [-]Guardrails: Support inline validators and is_enabled[/-] [+]Guardrails: Inline validator support[/+] on Oct 13, 2026
  2. moved this from To Do to In Progress in Kaapi-devon Oct 13, 2026
  3. self-assigned this
    on Oct 14, 2026
  4. moved this from In Progress to Closed in Kaapi-devon Oct 15, 2026
  5. github-actions commented on Oct 16, 2026

    @github-actions

    🎉 This issue has been resolved in version 1.8.0-main.11 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status
    Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions