feat: Address review comments on Guard/GuardrailProvider CRDs#80
Merged
feat: Address review comments on Guard/GuardrailProvider CRDs#80
Conversation
…ration Co-authored-by: g3force <779094+g3force@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add guardrail mechanisms for input and output validation
feat: Introduce Guard and GuardrailProvider CRDs with AiGateway integration
Mar 16, 2026
g3force
requested changes
Mar 16, 2026
…d API key and external URL fields, add e2e tests Co-authored-by: g3force <779094+g3force@users.noreply.github.com>
Copilot
AI
changed the title
feat: Introduce Guard and GuardrailProvider CRDs with AiGateway integration
feat: Address review comments on Guard/GuardrailProvider CRDs
Mar 16, 2026
g3force
approved these changes
Mar 16, 2026
Contributor
|
@copilot the e2e test fail now, fix them |
… test failures Co-authored-by: g3force <779094+g3force@users.noreply.github.com>
Contributor
Author
Fixed in commit 5d379a0. The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
runtime.agentic-layer.ai_guardrailproviders.yamlandruntime.agentic-layer.ai_guards.yamltoconfig/crd/kustomization.yamlso they are installed duringmake install(fixes e2e test failures)corev1.ObjectReferenceforAiGateway.spec.guardrailsandGuard.spec.providerRefApiKeySecretRef,ExternalUrlfields toGuardrailProvider; embedcorev1.ObjectReferenceinGuardrailBackendRefOriginal prompt
This section details on the original issue you should resolve
<issue_title>Introduce Guardrails</issue_title>
<issue_description># Guardrails Concept
What is a Guardrail?
sequenceDiagram autonumber participant A as Agent box DarkGreen Guardrails participant IV as InputGuard participant OF as OutputGuard end participant MR as AI Gateway (Model Router) A->>IV: Raw input activate IV IV->>MR: Validated and filtered input deactivate IV activate MR MR-->>OF: Raw output deactivate MR activate OF OF-->>A: Validated and filtered output deactivate OFHow is a Guardrail defined?
Solution Approaches
Proxy
graph LR Agent <--> Guardrails Guardrails <--> MR Guardrails["AI Gateway (Guardrail Proxy)"] MR["AI Gateway (Model Router)"] %% Styling style Agent fill:#fff4e1 style MR fill:#ffe1f5 style Guardrails fill:#D2FCD6Possible Implementations in Kubernetes
Gateway-Integrated
Using the AI Gateway as an example: Guardrails are configured within the AI Gateway.
graph LR Agent <--> MR MR[AI Gateway] %% Styling style Agent fill:#fff4e1 style MR fill:#ffe1f5Existing Solutions
Guardrails
Gateways with Guardrail Support
Implementation
Requirements
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.