Skip to content

Conversation

@yuneng-jiang
Copy link
Collaborator

[Feature] Show all callbacks on UI

Relevant issues

The current implementation of the UI only shows the success callbacks. It was hitting the /get/config/callbacks endpoint which was only querying for the success_callbacks. I modified the endpoint to include a type field that is either "success" , "failure", or "generic", depending on if the callback is defined in the "success_callbacks", "failure_callbacks", or "callbacks" in the config.yaml. Callbacks added in the UI are success callbacks. I scoped it down to only allow modification of success callbacks in the UI (same as previous behavior)

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

Type

🆕 New Feature
✅ Test

Changes

Screenshot

image image image image

@vercel
Copy link

vercel bot commented Nov 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
litellm Ready Ready Preview Comment Nov 7, 2025 11:04pm

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.


# check if "langfuse" in litellm_settings
# Helper function to process callbacks and get environment variables
def process_callback(_callback: str, callback_type: str) -> dict:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets not add bloat in this file

env_vars = ["TRACELOOP_API_KEY"]
elif _callback == "custom_callback_api":
env_vars = ["GENERIC_LOGGER_ENDPOINT"]
elif _callback == "otel":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of hardcoding this, add a static method to each CustomLogger and implement get_callback_env_vars()

then you just need to call the method

Copy link
Contributor

@ishaan-jaff ishaan-jaff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"generic" does not make sense here, what do you mean by that ?

@krrishdholakia
Copy link
Contributor

agreed with @ishaan-jaff re: "generic". I believe you mean "success + failure"

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.

5 participants