@acarmisc/backstage-plugin-litellm 0.15.5 → 0.17.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 +825 -252
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +794 -221
- 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 +49 -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,15 +17,32 @@ 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;
|
|
23
28
|
max_budget?: number;
|
|
29
|
+
budget_duration?: string;
|
|
24
30
|
spend: number;
|
|
25
31
|
members_with_roles?: TeamMember[];
|
|
26
32
|
models?: string[];
|
|
27
33
|
tpm_limit?: number;
|
|
28
34
|
rpm_limit?: number;
|
|
35
|
+
metadata?: Record<string, unknown>;
|
|
36
|
+
object_permission?: TeamObjectPermission;
|
|
37
|
+
}
|
|
38
|
+
export interface VectorStoreInfo {
|
|
39
|
+
id: string;
|
|
40
|
+
name?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface McpServerInfo {
|
|
43
|
+
id: string;
|
|
44
|
+
name?: string;
|
|
45
|
+
url?: string;
|
|
29
46
|
}
|
|
30
47
|
export interface VirtualKey {
|
|
31
48
|
key: string;
|
|
@@ -144,6 +161,17 @@ export interface LiteLlmConfig {
|
|
|
144
161
|
/** When true (default), a team must be selected before a key can be generated. */
|
|
145
162
|
teamRequired: boolean;
|
|
146
163
|
};
|
|
164
|
+
/** Team-management surface controls, set via litellm.teamAdmin in app-config.yaml. */
|
|
165
|
+
teamManagement?: {
|
|
166
|
+
/** True only when the permission framework is enabled AND an admin group is configured. */
|
|
167
|
+
enabled: boolean;
|
|
168
|
+
/** USD ceiling an admin may set as a team budget (defaults to 1000). */
|
|
169
|
+
maxBudgetCeiling: number;
|
|
170
|
+
/** Whether an admin may create a team with no budget cap. */
|
|
171
|
+
allowUnlimitedBudget: boolean;
|
|
172
|
+
/** Whether knowledge-base / MCP management routes are enabled (opt-in). */
|
|
173
|
+
objectPermissionsEnabled?: boolean;
|
|
174
|
+
};
|
|
147
175
|
}
|
|
148
176
|
export interface DateRange {
|
|
149
177
|
start: Date;
|
|
@@ -176,3 +204,24 @@ export interface AuditLogsParams {
|
|
|
176
204
|
table_name?: string;
|
|
177
205
|
changed_by?: string;
|
|
178
206
|
}
|
|
207
|
+
export interface CreateTeamRequest {
|
|
208
|
+
team_alias: string;
|
|
209
|
+
models: string[];
|
|
210
|
+
max_budget?: number | null;
|
|
211
|
+
budget_duration?: string;
|
|
212
|
+
tpm_limit?: number;
|
|
213
|
+
rpm_limit?: number;
|
|
214
|
+
}
|
|
215
|
+
export interface UpdateTeamRequest {
|
|
216
|
+
team_alias?: string;
|
|
217
|
+
models?: string[];
|
|
218
|
+
max_budget?: number | null;
|
|
219
|
+
blocked?: boolean;
|
|
220
|
+
budget_duration?: string;
|
|
221
|
+
tpm_limit?: number;
|
|
222
|
+
rpm_limit?: number;
|
|
223
|
+
}
|
|
224
|
+
export interface CreateTeamResponse {
|
|
225
|
+
team_id: string;
|
|
226
|
+
team_alias?: string;
|
|
227
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acarmisc/backstage-plugin-litellm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.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",
|