Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

patch on LiteLLM_AuditLogs

Ishaan Jaff889feb2ea8f6
diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.py
index 9882799fa67..d19791a9027 100644
--- a/litellm/proxy/_types.py
+++ b/litellm/proxy/_types.py
@@ -1625,7 +1625,7 @@ class LiteLLM_ErrorLogs(LiteLLMPydanticObjectBase):
class LiteLLM_AuditLogs(LiteLLMPydanticObjectBase):
id: str
updated_at: datetime
- changed_by: str
+ changed_by: Optional[Any] = None
changed_by_api_key: Optional[str] = None
action: Literal["created", "updated", "deleted", "blocked"]
table_name: Literal[
@@ -1638,6 +1638,13 @@ class LiteLLM_AuditLogs(LiteLLMPydanticObjectBase):
before_value: 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):
response: Optional[List[Union[LiteLLM_SpendLogs, Any]]] = None