Skip to content

Feat/add delete callback #11654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 20, 2025

Conversation

jtong99
Copy link
Contributor

@jtong99 jtong99 commented Jun 12, 2025

Title

Implement delete Active Logging Callbacks feature

Relevant issues

Fixes #9348

Pre-Submission checklist

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

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • 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
Screenshot 2025-06-12 at 14 19 24

Type

🆕 New Feature

Changes

In proxy_server.py:

  • Created delete_callback endpoint at /config/callback/delete
  • Implemented callback deletion functionality that removes callbacks from both database and active configuration

In networking.tsx:

  • Created deleteCallback function to make API calls to the delete endpoint

In settings.tsx:

  • Added UI components for callback management and deletion
  • Implemented handleDeleteCallback function to trigger deletion workflow
  • Added confirmDeleteCallback function for confirmation dialog

Copy link

vercel bot commented Jun 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2025 4:30am

@krrishdholakia
Copy link
Contributor

Hi @jtong99 thank you for the PR - can you please fix the linting errors and move your test to be a mock test inside test_litellm/ - this will ensure it runs within the github action ^

@jtong99
Copy link
Contributor Author

jtong99 commented Jun 12, 2025

Hi @jtong99 thank you for the PR - can you please fix the linting errors and move your test to be a mock test inside test_litellm/ - this will ensure it runs within the github action ^

Hi @krrishdholakia , I fixed the linting errors and moved the test case. Please help me check the PR and tell me if anything need change. Thanks.

@jtong99
Copy link
Contributor Author

jtong99 commented Jun 18, 2025

Hi @krrishdholakia , I found that when user add a callback, the UI did not automatically close the popup and refetch the data.

I would like to contribute to enhance the UX, should I add it under this PR?

@vuanhtu52
Copy link
Contributor

Hi @jtong99 , can you also update the document related to your fix? Since there is very little maintenance work for the document it might be a good idea to update it so users can follow the guide properly.

@vuanhtu52
Copy link
Contributor

Hi @krrishdholakia , when you have some time may you take a look at this PR? I think @jtong99 has made all the updates you requested. Thank you very much!

@krrishdholakia krrishdholakia merged commit c36d0f6 into BerriAI:main Jun 20, 2025
6 checks passed
@krrishdholakia
Copy link
Contributor

Thanks for the bump @vuanhtu52

thanks for the work on this @jtong99

@krrishdholakia
Copy link
Contributor

the UI did not automatically close the popup and refetch the data.

this would be helpful! if you can file a separate PR for this, that'd be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Logging and Alert UI : No Delete option
3 participants