Repository navigation
feat(ui): add Delete to the guardrail detail page and share one delete flow with the table row - #45893
Merged
Conversation
…rdrails Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…ine-object lint budget Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
@litereview code-review |
✅ code-review5/5 · Ready for human reviewScope: full · Full PR review. No correctness findings. Checks and execution details
View review · Reviewed |
…the detail page The table-row delete now has the same dangling-reference warning and typed-name confirmation as the detail page. Tests now assert the success and error toasts Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…p blocks requests with a 400 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
@litereview code-review |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Author
|
@litereview code-review |
jesus-berri
enabled auto-merge (squash)
October 21, 2026 02:14
tin-berri
approved these changes
Oct 21, 2026
Contributor
|
Main CircleCI job e2e_ui_testing fails three guardrail delete specs since this merged, because Delete now waits for the typed name. Pipeline 91453 https://app.circleci.com/pipelines/github/BerriAI/litellm/91453 |
4 of 6 tasks
3 of 19 tasks
yuneng-berri
added a commit
that referenced
this pull request
Oct 28, 2026
…havior (#48665) * test(integration): update stale expectations to intended provider behavior Each expectation moved because a merged PR changed behavior on purpose. - chatgpt string input is wrapped as one user message (#41522) - Gemini 2.5 tool media sits beside function_response (#48428) - sampling knobs move to Gemini 3.5 Flash, which keeps them (#47645) - a body base_model is stripped without allow_client_pricing_override (#47639) - ai_decide answers without usage return usage null (#48261) - azure_ai forwards mapped client anthropic-beta values (#48033) - the OpenCode scripted upstream mints a fresh id per request * test(e2e-ui): type the guardrail name before deleting it GuardrailDeleteModal requires the exact name before Delete enables since #45893. All three guardrail delete flows now go through one helper. * test(observability): accept any sampled traceresponse flags and expect a 400 for a non-object body OpenTelemetry 1.45 (#48055) sets the W3C random trace id flag on new traces, so the gateway's traceresponse now ends in -03. The producer copies the server span's own trace flags, so the tests now accept any two-digit flags with the sampled bit set instead of pinning -01 #48438 made a non-object JSON body a 400 "Invalid JSON payload: expected an object" on purpose, so the [1] body case is renamed non_object_body and expects that 400 * test(observability): stop waiting on OpenTelemetry's export log line in the langtrace outage test The outage test waited for "Exception while exporting Span batch" in the proxy log, which is OpenTelemetry's wording and no longer appears with 1.45. The test keeps asserting what the gateway guarantees, callers unaffected during the outage, a live gateway, and every span after recovery delivered once with no outage span duplicated * test(guardrails): count the Responses disconnect spend rows #47611 added Since #47611 a streamed /v1/responses disconnect writes its own spend row, so the concurrent disconnect test saw 20 rows where it counted 10 by model group. It now reads each row's call type and expects ten acompletion rows with the outage verdict and ten aresponses rows with success. /v1/messages disconnects still write no row on main, so they are left out of the count rather than pinned as absent The responses-httpx case of the single disconnect test no longer needs its LIT-8603 skip and passes * test(observability): size K4's timeout from the harness boot budget K4 boots three two-worker proxies in a row. On CircleCI each boot takes 43 to 58 seconds, so a passing run took 179.97s against its fixed 180s cap and 6 of 30 runs hit pytest-timeout. The cap and the restart gate wait now come from readiness_seconds and graceful_stop_seconds, like other multi-boot tests
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.
TLDR
Problem this solves:
How it solves it:
on_error(oron_failwhenon_erroris unset) isnextorallowGuardrailDeleteModal, so both paths share one delete flowUser Flow
Before: a proxy admin looking at a DB guardrail's detail page has no way to delete it there
...menuAfter: the same admin deletes it from the detail page after typing its name
Linear ticket
Resolves LIT-6927
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Shared setup is a local proxy on :4000 with a fresh Postgres DB, a config guardrail
config-word-blockin config.yaml, and a DB guardraildb-word-blockcreated withPOST /guardrails. The dashboard dev server runs on :3000 (head) and :3001 (base), logged in as admin at http://localhost:4000/ui/loginBefore (c5ac184)
db-word-blockID, open the Settings tabAfter (c651ebc)
DB guardrail
db-word-blockID, open the Settings tab, then click Delete (second screenshot above)db-word-bloctyped. It enables only withdb-word-blockcurl localhost:4000/v2/guardrails/list -H "Authorization: Bearer $KEY"now lists onlyconfig-word-block configTable row delete
db-row-blockwithPOST /guardrails, open http://localhost:3000/guardrails/, click the row...menu, then Deletedb-row-bloctyped. It enables only withdb-row-block/v2/guardrails/listlists onlydb-word-blockandconfig-word-blockConfig guardrail
config-word-blockdetail page and the Settings tabType
🆕 New Feature
Caveats (if any)
Low
GuardrailSettingsActionsto keepguardrail_info.tsxunder the 800-line lint capLink to Devin session: https://app.devin.ai/sessions/495e8b67ead44c66a287e9368a953dd5
Open in Devin Desktop: https://app.devin.ai/desktop/session/495e8b67ead44c66a287e9368a953dd5?variant=devin
Requested by: @jesus-berri