@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/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,
@@ -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
  });
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acarmisc/backstage-plugin-litellm-backend",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "description": "The Backstage backend plugin for LiteLLM governance",
5
5
  "backstage": {
6
6
  "role": "backend-plugin",