diff --git a/docs/my-website/docs/proxy/enterprise.md b/docs/my-website/docs/proxy/enterprise.md index c47589e8a..a8c84bf4f 100644 --- a/docs/my-website/docs/proxy/enterprise.md +++ b/docs/my-website/docs/proxy/enterprise.md @@ -21,6 +21,7 @@ Features: - ✅ Don't log/store specific requests to Langfuse, Sentry, etc. (eg confidential LLM requests) - ✅ Tracking Spend for Custom Tags - ✅ Custom Branding + Routes on Swagger Docs +- ✅ Audit Logs for `Created At, Created By` when Models Added ## Content Moderation diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 19e68965f..9eb0d2a15 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -2790,10 +2790,12 @@ class ProxyConfig: model.model_info["id"] = _id model.model_info["db_model"] = True - model.model_info["created_at"] = getattr(model, "created_at", None) - model.model_info["updated_at"] = getattr(model, "updated_at", None) - model.model_info["created_by"] = getattr(model, "created_by", None) - model.model_info["updated_by"] = getattr(model, "updated_by", None) + if premium_user is True: + # seeing "created_at", "updated_at", "created_by", "updated_by" is a LiteLLM Enterprise Feature + model.model_info["created_at"] = getattr(model, "created_at", None) + model.model_info["updated_at"] = getattr(model, "updated_at", None) + model.model_info["created_by"] = getattr(model, "created_by", None) + model.model_info["updated_by"] = getattr(model, "updated_by", None) if model.model_info is not None and isinstance(model.model_info, dict): if "id" not in model.model_info: diff --git a/ui/litellm-dashboard/src/components/model_dashboard.tsx b/ui/litellm-dashboard/src/components/model_dashboard.tsx index a8a663733..2cb1c2cf0 100644 --- a/ui/litellm-dashboard/src/components/model_dashboard.tsx +++ b/ui/litellm-dashboard/src/components/model_dashboard.tsx @@ -1133,8 +1133,11 @@ const ModelDashboard: React.FC = ({ fontSize: "11px" }} > - ✨ Created At - + { + premiumUser ? "Created At" : ✨ Created At + } + + = ({ fontSize: "11px" }} > - ✨ Created By + { + premiumUser ? "Created By" : ✨ Created By + } = ({ selectedModelGroup === "" ) .map((model: any, index: number) => ( - + = ({

- {formatCreatedAt(model.model_info.created_at) || "-"} + { + premiumUser ? formatCreatedAt(model.model_info.created_at) || "-" : "-" + }

- {model.model_info.created_by || "-"} + { + premiumUser ? model.model_info.created_by || "-" : "-" + }