@acarmisc/backstage-plugin-litellm 0.15.4 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +27 -1
- package/dist/components/ManageTeamDialog.d.ts +31 -0
- package/dist/components/TeamUsage.d.ts +2 -0
- package/dist/index.cjs.js +805 -248
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +774 -217
- package/dist/index.esm.js.map +4 -4
- package/dist/permissions.d.ts +5 -0
- package/dist/permissions.test.d.ts +1 -0
- package/dist/types.d.ts +48 -0
- package/package.json +5 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const litellmTeamCreatePermission: import("@backstage/plugin-permission-common").BasicPermission;
|
|
2
|
+
export declare const litellmTeamManagePermission: import("@backstage/plugin-permission-common").BasicPermission;
|
|
3
|
+
export declare const litellmTeamMembersManagePermission: import("@backstage/plugin-permission-common").BasicPermission;
|
|
4
|
+
export declare const litellmTeamKnowledgebaseManagePermission: import("@backstage/plugin-permission-common").BasicPermission;
|
|
5
|
+
export declare const litellmTeamMcpManagePermission: import("@backstage/plugin-permission-common").BasicPermission;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -17,6 +17,11 @@ export interface TeamMember {
|
|
|
17
17
|
user_email?: string;
|
|
18
18
|
role: 'admin' | 'user';
|
|
19
19
|
}
|
|
20
|
+
export interface TeamObjectPermission {
|
|
21
|
+
vector_stores?: string[];
|
|
22
|
+
mcp_servers?: string[];
|
|
23
|
+
mcp_access_groups?: string[];
|
|
24
|
+
}
|
|
20
25
|
export interface TeamInfo {
|
|
21
26
|
team_id: string;
|
|
22
27
|
team_alias?: string;
|
|
@@ -26,6 +31,17 @@ export interface TeamInfo {
|
|
|
26
31
|
models?: string[];
|
|
27
32
|
tpm_limit?: number;
|
|
28
33
|
rpm_limit?: number;
|
|
34
|
+
metadata?: Record<string, unknown>;
|
|
35
|
+
object_permission?: TeamObjectPermission;
|
|
36
|
+
}
|
|
37
|
+
export interface VectorStoreInfo {
|
|
38
|
+
id: string;
|
|
39
|
+
name?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface McpServerInfo {
|
|
42
|
+
id: string;
|
|
43
|
+
name?: string;
|
|
44
|
+
url?: string;
|
|
29
45
|
}
|
|
30
46
|
export interface VirtualKey {
|
|
31
47
|
key: string;
|
|
@@ -144,6 +160,17 @@ export interface LiteLlmConfig {
|
|
|
144
160
|
/** When true (default), a team must be selected before a key can be generated. */
|
|
145
161
|
teamRequired: boolean;
|
|
146
162
|
};
|
|
163
|
+
/** Team-management surface controls, set via litellm.teamAdmin in app-config.yaml. */
|
|
164
|
+
teamManagement?: {
|
|
165
|
+
/** True only when the permission framework is enabled AND an admin group is configured. */
|
|
166
|
+
enabled: boolean;
|
|
167
|
+
/** USD ceiling an admin may set as a team budget; null when unset. */
|
|
168
|
+
maxBudgetCeiling: number | null;
|
|
169
|
+
/** Whether an admin may create a team with no budget cap. */
|
|
170
|
+
allowUnlimitedBudget: boolean;
|
|
171
|
+
/** Whether knowledge-base / MCP management routes are enabled (opt-in). */
|
|
172
|
+
objectPermissionsEnabled?: boolean;
|
|
173
|
+
};
|
|
147
174
|
}
|
|
148
175
|
export interface DateRange {
|
|
149
176
|
start: Date;
|
|
@@ -176,3 +203,24 @@ export interface AuditLogsParams {
|
|
|
176
203
|
table_name?: string;
|
|
177
204
|
changed_by?: string;
|
|
178
205
|
}
|
|
206
|
+
export interface CreateTeamRequest {
|
|
207
|
+
team_alias: string;
|
|
208
|
+
models: string[];
|
|
209
|
+
max_budget?: number | null;
|
|
210
|
+
budget_duration?: string;
|
|
211
|
+
tpm_limit?: number;
|
|
212
|
+
rpm_limit?: number;
|
|
213
|
+
}
|
|
214
|
+
export interface UpdateTeamRequest {
|
|
215
|
+
team_alias?: string;
|
|
216
|
+
models?: string[];
|
|
217
|
+
max_budget?: number | null;
|
|
218
|
+
blocked?: boolean;
|
|
219
|
+
budget_duration?: string;
|
|
220
|
+
tpm_limit?: number;
|
|
221
|
+
rpm_limit?: number;
|
|
222
|
+
}
|
|
223
|
+
export interface CreateTeamResponse {
|
|
224
|
+
team_id: string;
|
|
225
|
+
team_alias?: string;
|
|
226
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acarmisc/backstage-plugin-litellm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "frontend-plugin",
|
|
6
6
|
"pluginId": "litellm",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"build": "node build.js && tsc -p tsconfig.json",
|
|
36
36
|
"lint": "eslint src dev --ext .ts,.tsx",
|
|
37
37
|
"test": "tsc -p tsconfig.test.json && node --test dist-test/**/*.test.js dist-test/*.test.js",
|
|
38
|
+
"api-report": "npm run build && api-extractor run --local --verbose",
|
|
38
39
|
"prepack": "npm run build",
|
|
39
40
|
"postpack": ""
|
|
40
41
|
},
|
|
@@ -42,6 +43,8 @@
|
|
|
42
43
|
"@backstage/core-components": "^0.18.10",
|
|
43
44
|
"@backstage/core-plugin-api": "^1.12.6",
|
|
44
45
|
"@backstage/frontend-plugin-api": "^0.17.0",
|
|
46
|
+
"@backstage/plugin-permission-common": "^0.9.9",
|
|
47
|
+
"@backstage/plugin-permission-react": "^0.5.3",
|
|
45
48
|
"@backstage/theme": "^0.6.0",
|
|
46
49
|
"@backstage/types": "^1.2.0",
|
|
47
50
|
"@emotion/react": "^11.11.0",
|
|
@@ -58,6 +61,7 @@
|
|
|
58
61
|
"@backstage/frontend-defaults": "^0.5.3",
|
|
59
62
|
"@backstage/frontend-test-utils": "^0.6.0",
|
|
60
63
|
"@backstage/test-utils": "^1.7.0",
|
|
64
|
+
"@microsoft/api-extractor": "^7.59.0",
|
|
61
65
|
"@testing-library/dom": "^10.0.0",
|
|
62
66
|
"@testing-library/jest-dom": "^6.0.0",
|
|
63
67
|
"@testing-library/react": "^16.0.0",
|