Skip to content

Conversation

LucasSugi
Copy link
Contributor

Title

fix: Add a function responsible to call precall

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

I basically add the ProxyBaseLLMRequestProcessing class inside the get_file function. I'm using this logic because it's the same logic used in the get_file_content and list_files function. Inside the ProxyBaseLLMRequestProcessing it's a call for the function pre_call_hook, who is responsible to call the custom callbacks.

The add_litellm_data_to_request it's removed because this function it's already called inside the ProxyBaseLLMRequestProcessing.common_processing_pre_call_logic.

Tests
I basically add a "print" function inside our async_pre_call_hook custom callback. You can see in the image below this print it's not called, so some metadata is not injected into the object.
Screenshot 2025-10-17 at 02 03 40

Here is after the fix, you can check the print is called now.
Screenshot 2025-10-17 at 02 01 27

Note: We don't have an unit test specific for this function. I used the only one that indirectly call this functions
image

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.

@krrishdholakia krrishdholakia merged commit ae86862 into BerriAI:main Oct 19, 2025
4 of 6 checks passed
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.

2 participants