mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
fix: revert timezone-aware datetime, restore test file
datetime.now(tz=timezone.utc) is aware but logging_obj.start_time is naive, causing "can't subtract offset-naive and offset-aware datetimes" TypeError. Revert to naive datetime.now(). Also restore test file lost in previous API push.
This commit is contained in:
parent
e40bda538f
commit
92bbd51250
1 changed files with 2 additions and 2 deletions
|
|
@ -4,7 +4,7 @@ import logging
|
|||
import math
|
||||
import time
|
||||
import traceback
|
||||
from datetime import datetime, timezone
|
||||
from datetime import datetime
|
||||
from typing import (
|
||||
TYPE_CHECKING,
|
||||
Any,
|
||||
|
|
@ -1430,7 +1430,7 @@ class ProxyBaseLLMRequestProcessing:
|
|||
# GH#30566: overhead for non-chat-completions routes
|
||||
_hidden_params = getattr(response, "_hidden_params", {}) or {}
|
||||
if not _hidden_params.get("litellm_overhead_time_ms"):
|
||||
end_time = datetime.now(tz=timezone.utc)
|
||||
end_time = datetime.now()
|
||||
_logging_obj = self.data.get("litellm_logging_obj")
|
||||
if _logging_obj is not None:
|
||||
from litellm.litellm_core_utils.llm_response_utils.response_metadata import (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue