@acarmisc/backstage-plugin-litellm-backend 0.28.0 → 0.29.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/config.d.ts +11 -0
- package/dist/index.cjs.js +6 -2
- package/dist/index.cjs.js.map +2 -2
- package/dist/openapi.js +1 -0
- package/dist/router.js +5 -0
- package/dist/routes/config.js +1 -0
- package/dist/routes/context.d.ts +2 -0
- package/package.json +1 -1
package/dist/openapi.js
CHANGED
|
@@ -69,6 +69,7 @@ exports.openApiSpec = {
|
|
|
69
69
|
display: { type: 'object', properties: {
|
|
70
70
|
hideTeamBudgetForMembers: { type: 'boolean' },
|
|
71
71
|
hideTeamBudgetForManagers: { type: 'boolean' },
|
|
72
|
+
serviceKeyPrefixes: { type: 'array', items: { type: 'string' } },
|
|
72
73
|
} },
|
|
73
74
|
} } } },
|
|
74
75
|
},
|
package/dist/router.js
CHANGED
|
@@ -71,6 +71,10 @@ async function createRouter(options) {
|
|
|
71
71
|
const publicBaseUrl = config.getOptionalString('litellm.publicBaseUrl') ?? null;
|
|
72
72
|
// Support contact for unprovisioned users (optional).
|
|
73
73
|
const supportContact = config.getOptionalString('litellm.supportContact');
|
|
74
|
+
// Alias prefixes of system/service keys the frontend hides by default.
|
|
75
|
+
const serviceKeyPrefixes = (config.getOptionalStringArray('litellm.display.serviceKeyPrefixes') ?? [])
|
|
76
|
+
.map(p => p.trim())
|
|
77
|
+
.filter(p => p.length > 0);
|
|
74
78
|
const baseClient = options.client ?? new client_1.LiteLLMClient({ baseUrl, masterKey });
|
|
75
79
|
// Wrap client with userInfoCache. TTL is configurable (default 10s, 0 disables).
|
|
76
80
|
const userInfoCacheTtlSeconds = config.getOptionalNumber('litellm.cache.userInfoTtlSeconds') ?? 10;
|
|
@@ -134,6 +138,7 @@ async function createRouter(options) {
|
|
|
134
138
|
baseUrl,
|
|
135
139
|
publicBaseUrl,
|
|
136
140
|
supportContact,
|
|
141
|
+
serviceKeyPrefixes,
|
|
137
142
|
userIdDomain,
|
|
138
143
|
provisioningEnabled,
|
|
139
144
|
provisioningDefaults,
|
package/dist/routes/config.js
CHANGED
|
@@ -35,6 +35,7 @@ function registerConfigRoutes(router, ctx) {
|
|
|
35
35
|
display: {
|
|
36
36
|
hideTeamBudgetForMembers: ctx.teamBudgetVisibility.hideTeamBudgetForMembers,
|
|
37
37
|
hideTeamBudgetForManagers: ctx.teamBudgetVisibility.hideTeamBudgetForManagers,
|
|
38
|
+
serviceKeyPrefixes: ctx.serviceKeyPrefixes,
|
|
38
39
|
},
|
|
39
40
|
});
|
|
40
41
|
});
|
package/dist/routes/context.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export interface RouterContext {
|
|
|
23
23
|
baseUrl: string;
|
|
24
24
|
publicBaseUrl: string | null;
|
|
25
25
|
supportContact: string | undefined;
|
|
26
|
+
/** Key-alias prefixes treated as service keys by the frontend (display-only). */
|
|
27
|
+
serviceKeyPrefixes: string[];
|
|
26
28
|
userIdDomain: string | undefined;
|
|
27
29
|
provisioningEnabled: boolean;
|
|
28
30
|
provisioningDefaults: ProvisioningDefaults;
|