Skip to content

Conversation

LucasSugi
Copy link
Contributor

Title

fix: Add pre and post call for list batches

Relevant issues

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

🐛 Bug Fix

Changes

The list_batches (get /batches) wasn't calling the async_pre_call_hook and async_post_call_success_hook. This was causing some problems for clients that have these two functions implemented. To solve this we basically add the functions

  • common_processing_pre_call_logic
  • post_call_success_hook
    Both are following the logic of list_files (get /files) endpoint.

Please, ignore the others erros but note that we don't have a display message for

  • "######### async_post_call_success_hook #########"
    or
  • "######### async_pre_call_hook #########"
Screenshot 2025-10-17 at 16 20 27

In the print bellow both functions are called
Screenshot 2025-10-17 at 16 29 17

Tests
Screenshot 2025-10-17 at 16 42 25
Screenshot 2025-10-17 at 16 43 33

Copy link

vercel bot commented Oct 17, 2025

@LucasSugi is attempting to deploy a commit to the CLERKIEAI Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant