litellm - ✅(Solved) Fix [Bug]: Impossible to delete policy attachment [1 pull requests, 1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#25274Fetched 2026-04-08 03:02:21
View on GitHub
Comments
1
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
labeled ×2commented ×1mentioned ×1renamed ×1

PR fix notes

PR #25324: fix(ui): delete policy attachments via controlled modal

Description (problem / solution / changelog)

Replace static Modal.confirm with DeleteResourceModal so attachment delete reliably triggers the API call. Add a regression test covering the confirm->delete flow.

Issue: https://github.com/BerriAI/litellm/issues/25274

https://github.com/user-attachments/assets/bca65710-d070-4604-94ff-f9d32e3b2dd4

Made-with: Cursor

Relevant issues

<!-- e.g. "Fixes #000" -->

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

<!-- Select the type of Pull Request --> <!-- Keep only the necessary ones -->

🐛 Bug Fix

✅ Test

Changes

Changed files

  • ui/litellm-dashboard/src/components/policies/index.test.tsx (added, +220/-0)
  • ui/litellm-dashboard/src/components/policies/index.tsx (modified, +44/-22)
  • ui/litellm-dashboard/src/hooks/policies/useDeletePolicyAttachment.test.tsx (added, +81/-0)
  • ui/litellm-dashboard/src/hooks/policies/useDeletePolicyAttachment.ts (added, +37/-0)

Code Example

nonr
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

this is impossible to delete a Policy attachment, but you can delete the policy and the attachment stay

Steps to Reproduce

  1. create a policy
  2. attached it
  3. try to delete the attachment

Relevant log output

nonr

What part of LiteLLM is this about?

UI Dashboard

What LiteLLM version are you on ?

V1.83.4

Twitter / LinkedIn details

No response

extent analysis

TL;DR

The issue can likely be resolved by modifying the deletion process to also remove associated attachments when a policy is deleted.

Guidance

  • Investigate the current implementation of policy deletion to understand why attachments are not being removed.
  • Modify the policy deletion endpoint to also delete associated attachments.
  • Verify that the attachment is properly removed from the database and the UI after deleting the policy.
  • Consider adding a separate endpoint for deleting attachments directly, in case users need to remove attachments without deleting the policy.

Example

No code snippet can be provided without more information about the implementation details.

Notes

The provided log output is empty, which may indicate that the issue is not related to a specific error message, but rather a functional issue with the policy and attachment deletion process.

Recommendation

Apply workaround: Modify the policy deletion process to also remove associated attachments, as this seems to be the most straightforward solution to the reported issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING