mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix failure_callback
This commit is contained in:
parent
782d129789
commit
07cb7fa628
1 changed files with 5 additions and 0 deletions
|
|
@ -510,6 +510,11 @@ def function_setup( # noqa: PLR0915
|
|||
if inspect.iscoroutinefunction(callback):
|
||||
litellm._async_failure_callback.append(callback)
|
||||
removed_async_items.append(index)
|
||||
elif (
|
||||
callback in litellm._known_custom_logger_compatible_callbacks
|
||||
and isinstance(callback, str)
|
||||
):
|
||||
_add_custom_logger_callback_to_specific_event(callback, "failure")
|
||||
|
||||
# Pop the async items from failure_callback in reverse order to avoid index issues
|
||||
for index in reversed(removed_async_items):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue