Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Guardrails: Inline validator support

Fechada
#1,247 0 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@AkhileshNegi já está trabalhando nisso.

Desde 14/10/2026.

  • #1245 de @AkhileshNegi — integrado

Avaliação

Esta issue ainda não foi avaliada.

Descrição

enhancement

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.

Linguagem predominante
Python
Estrelas
18
Forks
11
Merge médio
4d 3h
PRs com merge (30d)
13

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de ProjectTech4DevAI/kaapi-backend

Todas as issues de ProjectTech4DevAI/kaapi-backend

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.