-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Performance] optimize logging on cache hit path #14481
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.
|
@@ -2893,19 +2854,13 @@ def _get_assembled_streaming_response( | |||
ResponseCompletedEvent, | |||
Any, | |||
], | |||
start_time: datetime.datetime, |
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.
I've checked that _get_assembled_streaming_response
is not used anywhere else, and I doubt anyone would subclass and redefine it
callbacks = self.get_combined_callback_list( | ||
dynamic_success_callbacks=self.dynamic_async_success_callbacks, | ||
global_callbacks=litellm._async_success_callback, | ||
) | ||
|
||
result = redact_message_input_output_from_logging( |
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.
Done once in helper
197d870
to
84299f4
Compare
84299f4
to
8a048c9
Compare
_get_assembled_streaming_response is not used anywhere except these two places I doubt that any code that subclasses this function exists and expects full range of defined attributes, still this change may be reverted in case any concerns will be raised.
…tly once on cache hits
8a048c9
to
b781136
Compare
Title
Relevant issues
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-unit
Impact
Before
After
Type
🧹 Refactoring
⏱️ Performance
✅ Test
Changes