mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
Merge pull request #19486 from BerriAI/litellm_fix_serialisation_problem
Fix: [Bug]: litellm.litellm_core_utils.litellm_logging.Logging incorrectly handles ResponseAPIResponse
This commit is contained in:
commit
ba36981bed
2 changed files with 2 additions and 10 deletions
|
|
@ -1624,15 +1624,7 @@ class Logging(LiteLLMLoggingBaseClass):
|
|||
result.usage
|
||||
)
|
||||
)
|
||||
setattr(
|
||||
result,
|
||||
"usage",
|
||||
(
|
||||
transformed_usage.model_dump()
|
||||
if hasattr(transformed_usage, "model_dump")
|
||||
else dict(transformed_usage)
|
||||
),
|
||||
)
|
||||
setattr(result, "usage", transformed_usage)
|
||||
if (
|
||||
standard_logging_payload := self.model_call_details.get(
|
||||
"standard_logging_object"
|
||||
|
|
|
|||
|
|
@ -1193,7 +1193,7 @@ class ResponsesAPIResponse(BaseLiteLLMOpenAIResponseObject):
|
|||
status: Optional[str] = None
|
||||
text: Optional[Union["ResponseText", Dict[str, Any]]] = None
|
||||
truncation: Optional[Literal["auto", "disabled"]] = None
|
||||
usage: Optional[ResponseAPIUsage] = None
|
||||
usage: Optional[Any] = None
|
||||
user: Optional[str] = None
|
||||
store: Optional[bool] = None
|
||||
# Define private attributes using PrivateAttr
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue