mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
chore(guardrails): sync lazy OpenAPI snapshot and dashboard types for usage units
Regenerates the guardrails and policy_engine fragments of the lazy OpenAPI snapshot for the usage-unit fields, regenerates schema.d.ts from it, and exports DailyGuardrailUsageUnitsRepository next to its sibling repositories
This commit is contained in:
parent
b7593a99c7
commit
5437139b94
3 changed files with 171 additions and 15 deletions
|
|
@ -11349,6 +11349,40 @@
|
|||
"title": "UpdateGuardrailRequest",
|
||||
"type": "object"
|
||||
},
|
||||
"UsageChartPoint": {
|
||||
"properties": {
|
||||
"blocked": {
|
||||
"title": "Blocked",
|
||||
"type": "integer"
|
||||
},
|
||||
"date": {
|
||||
"title": "Date",
|
||||
"type": "string"
|
||||
},
|
||||
"passed": {
|
||||
"title": "Passed",
|
||||
"type": "integer"
|
||||
},
|
||||
"score": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Score"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"date",
|
||||
"passed",
|
||||
"blocked"
|
||||
],
|
||||
"title": "UsageChartPoint",
|
||||
"type": "object"
|
||||
},
|
||||
"UsageDetailResponse": {
|
||||
"properties": {
|
||||
"avgLatency": {
|
||||
|
|
@ -11410,8 +11444,7 @@
|
|||
},
|
||||
"time_series": {
|
||||
"items": {
|
||||
"additionalProperties": true,
|
||||
"type": "object"
|
||||
"$ref": "#/components/schemas/UsageChartPoint"
|
||||
},
|
||||
"title": "Time Series",
|
||||
"type": "array"
|
||||
|
|
@ -11423,6 +11456,40 @@
|
|||
"type": {
|
||||
"title": "Type",
|
||||
"type": "string"
|
||||
},
|
||||
"usage_units": {
|
||||
"additionalProperties": {
|
||||
"type": "integer"
|
||||
},
|
||||
"title": "Usage Units",
|
||||
"type": "object"
|
||||
},
|
||||
"usage_units_by_key": {
|
||||
"additionalProperties": {
|
||||
"additionalProperties": {
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"title": "Usage Units By Key",
|
||||
"type": "object"
|
||||
},
|
||||
"usage_units_by_team": {
|
||||
"additionalProperties": {
|
||||
"additionalProperties": {
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"title": "Usage Units By Team",
|
||||
"type": "object"
|
||||
},
|
||||
"usage_units_daily": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/UsageUnitsDailyPoint"
|
||||
},
|
||||
"title": "Usage Units Daily",
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
|
@ -11437,7 +11504,11 @@
|
|||
"status",
|
||||
"trend",
|
||||
"description",
|
||||
"time_series"
|
||||
"time_series",
|
||||
"usage_units",
|
||||
"usage_units_daily",
|
||||
"usage_units_by_team",
|
||||
"usage_units_by_key"
|
||||
],
|
||||
"title": "UsageDetailResponse",
|
||||
"type": "object"
|
||||
|
|
@ -11572,8 +11643,7 @@
|
|||
"properties": {
|
||||
"chart": {
|
||||
"items": {
|
||||
"additionalProperties": true,
|
||||
"type": "object"
|
||||
"$ref": "#/components/schemas/UsageChartPoint"
|
||||
},
|
||||
"title": "Chart",
|
||||
"type": "array"
|
||||
|
|
@ -11596,6 +11666,13 @@
|
|||
"totalRequests": {
|
||||
"title": "Totalrequests",
|
||||
"type": "integer"
|
||||
},
|
||||
"totalUsageUnits": {
|
||||
"additionalProperties": {
|
||||
"type": "integer"
|
||||
},
|
||||
"title": "Totalusageunits",
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
|
@ -11603,7 +11680,8 @@
|
|||
"chart",
|
||||
"totalRequests",
|
||||
"totalBlocked",
|
||||
"passRate"
|
||||
"passRate",
|
||||
"totalUsageUnits"
|
||||
],
|
||||
"title": "UsageOverviewResponse",
|
||||
"type": "object"
|
||||
|
|
@ -11663,6 +11741,13 @@
|
|||
"type": {
|
||||
"title": "Type",
|
||||
"type": "string"
|
||||
},
|
||||
"usageUnits": {
|
||||
"additionalProperties": {
|
||||
"type": "integer"
|
||||
},
|
||||
"title": "Usageunits",
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
|
@ -11675,11 +11760,33 @@
|
|||
"avgScore",
|
||||
"avgLatency",
|
||||
"status",
|
||||
"trend"
|
||||
"trend",
|
||||
"usageUnits"
|
||||
],
|
||||
"title": "UsageOverviewRow",
|
||||
"type": "object"
|
||||
},
|
||||
"UsageUnitsDailyPoint": {
|
||||
"properties": {
|
||||
"date": {
|
||||
"title": "Date",
|
||||
"type": "string"
|
||||
},
|
||||
"units": {
|
||||
"additionalProperties": {
|
||||
"type": "integer"
|
||||
},
|
||||
"title": "Units",
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"date",
|
||||
"units"
|
||||
],
|
||||
"title": "UsageUnitsDailyPoint",
|
||||
"type": "object"
|
||||
},
|
||||
"ValidationError": {
|
||||
"properties": {
|
||||
"loc": {
|
||||
|
|
@ -21477,6 +21584,13 @@
|
|||
"totalRequests": {
|
||||
"title": "Totalrequests",
|
||||
"type": "integer"
|
||||
},
|
||||
"totalUsageUnits": {
|
||||
"additionalProperties": {
|
||||
"type": "integer"
|
||||
},
|
||||
"title": "Totalusageunits",
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
|
@ -21484,7 +21598,8 @@
|
|||
"chart",
|
||||
"totalRequests",
|
||||
"totalBlocked",
|
||||
"passRate"
|
||||
"passRate",
|
||||
"totalUsageUnits"
|
||||
],
|
||||
"title": "UsageOverviewResponse",
|
||||
"type": "object"
|
||||
|
|
@ -21544,6 +21659,13 @@
|
|||
"type": {
|
||||
"title": "Type",
|
||||
"type": "string"
|
||||
},
|
||||
"usageUnits": {
|
||||
"additionalProperties": {
|
||||
"type": "integer"
|
||||
},
|
||||
"title": "Usageunits",
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
|
@ -21556,7 +21678,8 @@
|
|||
"avgScore",
|
||||
"avgLatency",
|
||||
"status",
|
||||
"trend"
|
||||
"trend",
|
||||
"usageUnits"
|
||||
],
|
||||
"title": "UsageOverviewRow",
|
||||
"type": "object"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ from litellm.repositories.table_repositories import (
|
|||
ClaudeCodePluginRepository,
|
||||
ConfigOverridesRepository,
|
||||
DailyGuardrailMetricsRepository,
|
||||
DailyGuardrailUsageUnitsRepository,
|
||||
DailyPolicyMetricsRepository,
|
||||
DailyTagSpendRepository,
|
||||
DailyToolSpendRepository,
|
||||
|
|
@ -101,6 +102,7 @@ __all__ = [
|
|||
"ConfigRepository",
|
||||
"CredentialsRepository",
|
||||
"DailyGuardrailMetricsRepository",
|
||||
"DailyGuardrailUsageUnitsRepository",
|
||||
"DailyPolicyMetricsRepository",
|
||||
"DailyTagSpendRepository",
|
||||
"DailyToolSpendRepository",
|
||||
|
|
|
|||
43
ui/litellm-dashboard/src/lib/http/schema.d.ts
generated
vendored
43
ui/litellm-dashboard/src/lib/http/schema.d.ts
generated
vendored
|
|
@ -35089,13 +35089,29 @@ export interface components {
|
|||
/** Status */
|
||||
status: string;
|
||||
/** Time Series */
|
||||
time_series: {
|
||||
[key: string]: unknown;
|
||||
}[];
|
||||
time_series: components["schemas"]["UsageChartPoint"][];
|
||||
/** Trend */
|
||||
trend: string;
|
||||
/** Type */
|
||||
type: string;
|
||||
/** Usage Units */
|
||||
usage_units: {
|
||||
[key: string]: number;
|
||||
};
|
||||
/** Usage Units By Key */
|
||||
usage_units_by_key: {
|
||||
[key: string]: {
|
||||
[key: string]: number;
|
||||
};
|
||||
};
|
||||
/** Usage Units By Team */
|
||||
usage_units_by_team: {
|
||||
[key: string]: {
|
||||
[key: string]: number;
|
||||
};
|
||||
};
|
||||
/** Usage Units Daily */
|
||||
usage_units_daily: components["schemas"]["UsageUnitsDailyPoint"][];
|
||||
};
|
||||
/** UsageLogEntry */
|
||||
UsageLogEntry: {
|
||||
|
|
@ -35132,9 +35148,7 @@ export interface components {
|
|||
/** UsageOverviewResponse */
|
||||
UsageOverviewResponse: {
|
||||
/** Chart */
|
||||
chart: {
|
||||
[key: string]: unknown;
|
||||
}[];
|
||||
chart: components["schemas"]["UsageChartPoint"][];
|
||||
/** Passrate */
|
||||
passRate: number;
|
||||
/** Rows */
|
||||
|
|
@ -35143,6 +35157,10 @@ export interface components {
|
|||
totalBlocked: number;
|
||||
/** Totalrequests */
|
||||
totalRequests: number;
|
||||
/** Totalusageunits */
|
||||
totalUsageUnits: {
|
||||
[key: string]: number;
|
||||
};
|
||||
};
|
||||
/** UsageOverviewRow */
|
||||
UsageOverviewRow: {
|
||||
|
|
@ -35166,6 +35184,19 @@ export interface components {
|
|||
trend: string;
|
||||
/** Type */
|
||||
type: string;
|
||||
/** Usageunits */
|
||||
usageUnits: {
|
||||
[key: string]: number;
|
||||
};
|
||||
};
|
||||
/** UsageUnitsDailyPoint */
|
||||
UsageUnitsDailyPoint: {
|
||||
/** Date */
|
||||
date: string;
|
||||
/** Units */
|
||||
units: {
|
||||
[key: string]: number;
|
||||
};
|
||||
};
|
||||
/**
|
||||
* UserAPIKeyAuth
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue