Skip to content

Commit 3f761e9

Browse files
simplify
1 parent a7758b5 commit 3f761e9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sentry_sdk/integrations/litellm.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,7 @@ def _success_callback(
233233
is_streaming = kwargs.get("stream")
234234
# Callback is fired multiple times when streaming a response.
235235
# Flag checked at https://github.com/BerriAI/litellm/blob/33c3f13443eaf990ac8c6e3da78bddbc2b7d0e7a/litellm/litellm_core_utils/litellm_logging.py#L1603
236-
if (
237-
is_streaming is not True
238-
or kwargs.get("complete_streaming_response") is not None
239-
):
236+
if is_streaming is not True or "complete_streaming_response" in kwargs:
240237
span.__exit__(None, None, None)
241238

242239

0 commit comments

Comments
 (0)