-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
[Feature] Show all callbacks on UI #16335
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
|
|
||
| # check if "langfuse" in litellm_settings | ||
| # Helper function to process callbacks and get environment variables | ||
| def process_callback(_callback: str, callback_type: str) -> dict: |
There was a problem hiding this comment.
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
litellm/proxy/proxy_server.py
Outdated
| env_vars = ["TRACELOOP_API_KEY"] | ||
| elif _callback == "custom_callback_api": | ||
| env_vars = ["GENERIC_LOGGER_ENDPOINT"] | ||
| elif _callback == "otel": |
There was a problem hiding this comment.
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
ishaan-jaff
left a comment
There was a problem hiding this 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 ?
|
agreed with @ishaan-jaff re: "generic". I believe you mean "success + failure" |
[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
typefield 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
tests/litellm/directory, Adding at least 1 test is a hard requirement - see detailsmake test-unitType
🆕 New Feature
✅ Test
Changes
Screenshot