mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
fix: remove start_time from self.data to avoid snapshot test pollution
start_time was not needed for overhead computation on non-chat routes because llm_api_duration_ms is also not available. Use end_time for both start and end; the guard prevents affecting chat completions. Fixes #30566
This commit is contained in:
parent
54e95af071
commit
742e0feb12
1 changed files with 1 additions and 3 deletions
|
|
@ -1366,8 +1366,6 @@ class ProxyBaseLLMRequestProcessing:
|
|||
llm_router=llm_router,
|
||||
)
|
||||
|
||||
self.data["start_time"] = datetime.now()
|
||||
|
||||
# Defer async logging when post-call guardrails are configured so the
|
||||
# StandardLoggingPayload is built after guardrails write to metadata.
|
||||
# Cache the result to avoid scanning litellm.callbacks twice.
|
||||
|
|
@ -1442,7 +1440,7 @@ class ProxyBaseLLMRequestProcessing:
|
|||
logging_obj=self.data.get("litellm_logging_obj"),
|
||||
model=self.data.get("model"),
|
||||
kwargs=self.data,
|
||||
start_time=self.data.get("start_time", end_time),
|
||||
start_time=end_time,
|
||||
end_time=end_time,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue