mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
backend - add audit logs for adding models
This commit is contained in:
parent
1b4a0a9488
commit
ef7f3bc4fe
3 changed files with 22 additions and 10 deletions
|
@ -21,6 +21,7 @@ Features:
|
||||||
- ✅ Don't log/store specific requests to Langfuse, Sentry, etc. (eg confidential LLM requests)
|
- ✅ Don't log/store specific requests to Langfuse, Sentry, etc. (eg confidential LLM requests)
|
||||||
- ✅ Tracking Spend for Custom Tags
|
- ✅ Tracking Spend for Custom Tags
|
||||||
- ✅ Custom Branding + Routes on Swagger Docs
|
- ✅ Custom Branding + Routes on Swagger Docs
|
||||||
|
- ✅ Audit Logs for `Created At, Created By` when Models Added
|
||||||
|
|
||||||
|
|
||||||
## Content Moderation
|
## Content Moderation
|
||||||
|
|
|
@ -2790,10 +2790,12 @@ class ProxyConfig:
|
||||||
model.model_info["id"] = _id
|
model.model_info["id"] = _id
|
||||||
model.model_info["db_model"] = True
|
model.model_info["db_model"] = True
|
||||||
|
|
||||||
model.model_info["created_at"] = getattr(model, "created_at", None)
|
if premium_user is True:
|
||||||
model.model_info["updated_at"] = getattr(model, "updated_at", None)
|
# seeing "created_at", "updated_at", "created_by", "updated_by" is a LiteLLM Enterprise Feature
|
||||||
model.model_info["created_by"] = getattr(model, "created_by", None)
|
model.model_info["created_at"] = getattr(model, "created_at", None)
|
||||||
model.model_info["updated_by"] = getattr(model, "updated_by", 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 model.model_info is not None and isinstance(model.model_info, dict):
|
||||||
if "id" not in model.model_info:
|
if "id" not in model.model_info:
|
||||||
|
|
|
@ -1133,8 +1133,11 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({
|
||||||
fontSize: "11px"
|
fontSize: "11px"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
✨ Created At
|
{
|
||||||
</TableHeaderCell>
|
premiumUser ? "Created At" : <a href="https://forms.gle/W3U4PZpJGFHWtHyA9" target="_blank" style={{color: "#72bcd4" }}> ✨ Created At</a>
|
||||||
|
}
|
||||||
|
|
||||||
|
</TableHeaderCell>
|
||||||
<TableHeaderCell
|
<TableHeaderCell
|
||||||
style={{
|
style={{
|
||||||
maxWidth: "100px",
|
maxWidth: "100px",
|
||||||
|
@ -1143,7 +1146,9 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({
|
||||||
fontSize: "11px"
|
fontSize: "11px"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
✨ Created By
|
{
|
||||||
|
premiumUser ? "Created By" : <a href="https://forms.gle/W3U4PZpJGFHWtHyA9" target="_blank" style={{color: "#72bcd4" }}> ✨ Created By</a>
|
||||||
|
}
|
||||||
</TableHeaderCell>
|
</TableHeaderCell>
|
||||||
<TableHeaderCell
|
<TableHeaderCell
|
||||||
style={{
|
style={{
|
||||||
|
@ -1171,7 +1176,7 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({
|
||||||
selectedModelGroup === ""
|
selectedModelGroup === ""
|
||||||
)
|
)
|
||||||
.map((model: any, index: number) => (
|
.map((model: any, index: number) => (
|
||||||
<TableRow key={index}>
|
<TableRow key={index} style={{ maxHeight: "1px", minHeight: "1px" }}>
|
||||||
<TableCell
|
<TableCell
|
||||||
style={{
|
style={{
|
||||||
maxWidth: "100px",
|
maxWidth: "100px",
|
||||||
|
@ -1246,13 +1251,17 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<p style={{ fontSize: "10px" }}>
|
<p style={{ fontSize: "10px" }}>
|
||||||
{formatCreatedAt(model.model_info.created_at) || "-"}
|
{
|
||||||
|
premiumUser ? formatCreatedAt(model.model_info.created_at) || "-" : "-"
|
||||||
|
}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<p style={{ fontSize: "10px" }}>
|
<p style={{ fontSize: "10px" }}>
|
||||||
{model.model_info.created_by || "-"}
|
{
|
||||||
|
premiumUser ? model.model_info.created_by || "-" : "-"
|
||||||
|
}
|
||||||
</p>
|
</p>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell
|
<TableCell
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue