feat(guardrails): Add header decorator functionality - #1135
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
OpenAPI changes 🟢 16 non-breaking changesTip Safe to merge from an API-contract perspective. Full changelog ·
|
| Method | Path | Change | |
|---|---|---|---|
| 🟢 | GET |
/api/v1/guardrails |
endpoint added |
| 🟢 | GET |
/api/v1/guardrails/ban_lists |
endpoint added |
| 🟢 | POST |
/api/v1/guardrails/ban_lists |
endpoint added |
| 🟢 | DELETE |
/api/v1/guardrails/ban_lists/{ban_list_id} |
endpoint added |
| 🟢 | GET |
/api/v1/guardrails/ban_lists/{ban_list_id} |
endpoint added |
| 🟢 | PATCH |
/api/v1/guardrails/ban_lists/{ban_list_id} |
endpoint added |
| 🟢 | GET |
/api/v1/guardrails/llm_prompt_configs |
endpoint added |
| 🟢 | POST |
/api/v1/guardrails/llm_prompt_configs |
endpoint added |
| 🟢 | DELETE |
/api/v1/guardrails/llm_prompt_configs/{prompt_config_id} |
endpoint added |
| 🟢 | GET |
/api/v1/guardrails/llm_prompt_configs/{prompt_config_id} |
endpoint added |
| 🟢 | PATCH |
/api/v1/guardrails/llm_prompt_configs/{prompt_config_id} |
endpoint added |
| 🟢 | GET |
/api/v1/guardrails/validators/configs |
endpoint added |
| 🟢 | POST |
/api/v1/guardrails/validators/configs |
endpoint added |
| 🟢 | DELETE |
/api/v1/guardrails/validators/configs/{config_id} |
endpoint added |
| 🟢 | GET |
/api/v1/guardrails/validators/configs/{config_id} |
endpoint added |
| 🟢 | PATCH |
/api/v1/guardrails/validators/configs/{config_id} |
endpoint added |
main ↔ 173381b7 · generated by oasdiff
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Expose the internal kaapi-guardrails management API (validator catalogue, ban lists, LLM prompt configs, validator configs) through 16 passthrough routes behind project auth. Tenant travels only in X-ORGANIZATION-ID / X-PROJECT-ID headers set from the auth context; 401/403/422 from the service fail the job instead of bypassing, with client-visible errors sanitized to status codes only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Issue
Closes #PLEASE_TYPE_ISSUE_NUMBER
Summary
Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes
Please add here if any other information is required for the reviewer.
Original PR description
Issue
Closes #PLEASE_TYPE_ISSUE_NUMBER
Summary
Explain the motivation for making this change. What existing problem does the pull request solve?
Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes
Please add here if any other information is required for the reviewer.