patch on LiteLLM_AuditLogs

This commit is contained in:
Ishaan Jaff 2025-02-18 21:13:14 -08:00
parent b88762b63c
commit 889feb2ea8

View file

@ -1625,7 +1625,7 @@ class LiteLLM_ErrorLogs(LiteLLMPydanticObjectBase):
class LiteLLM_AuditLogs(LiteLLMPydanticObjectBase): class LiteLLM_AuditLogs(LiteLLMPydanticObjectBase):
id: str id: str
updated_at: datetime updated_at: datetime
changed_by: str changed_by: Optional[Any] = None
changed_by_api_key: Optional[str] = None changed_by_api_key: Optional[str] = None
action: Literal["created", "updated", "deleted", "blocked"] action: Literal["created", "updated", "deleted", "blocked"]
table_name: Literal[ table_name: Literal[
@ -1638,6 +1638,13 @@ class LiteLLM_AuditLogs(LiteLLMPydanticObjectBase):
before_value: Optional[Json] = None before_value: Optional[Json] = None
updated_values: Optional[Json] = None updated_values: Optional[Json] = None
@model_validator(mode="before")
@classmethod
def cast_changed_by_to_str(cls, values):
if values.get("changed_by") is not None:
values["changed_by"] = str(values["changed_by"])
return values
class LiteLLM_SpendLogs_ResponseObject(LiteLLMPydanticObjectBase): class LiteLLM_SpendLogs_ResponseObject(LiteLLMPydanticObjectBase):
response: Optional[List[Union[LiteLLM_SpendLogs, Any]]] = None response: Optional[List[Union[LiteLLM_SpendLogs, Any]]] = None