Issue #3580690 by ajv009: Implement processOutput() in RegexpGuardrail

RegexpGuardrail::processOutput() previously returned PassResult unconditionally without running the configured regex. This meant post-generate guardrails using regexp_guardrail never scanned AI output text.

The fix mirrors the processInput() logic: extract the response text from ChatOutput::getNormalized()->getText() and run the configured regex pattern against it. Streamed responses (StreamedChatMessageIteratorInterface) are skipped with a PassResult since their content is not yet available as a complete string.

Added unit tests covering both processInput() and processOutput() for matching text, clean text, empty pattern, streamed output, and credit card pattern detection.

Closes #3580690

Merge request reports

Loading