@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/config.d.ts
CHANGED
|
@@ -450,6 +450,17 @@ export interface Config {
|
|
|
450
450
|
* @default false
|
|
451
451
|
*/
|
|
452
452
|
hideTeamBudgetForManagers?: boolean;
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Key-alias prefixes that identify system / service keys (e.g.
|
|
456
|
+
* ["svc-", "system-"]). The Keys table hides keys whose alias starts
|
|
457
|
+
* with one of these prefixes behind a "Hide service keys" toggle that
|
|
458
|
+
* is on by default; users can switch it off to see every key.
|
|
459
|
+
* Matching is case-insensitive. Display-only: the keys are still
|
|
460
|
+
* returned by the API and nothing is enforced server-side.
|
|
461
|
+
* @default []
|
|
462
|
+
*/
|
|
463
|
+
serviceKeyPrefixes?: string[];
|
|
453
464
|
};
|
|
454
465
|
|
|
455
466
|
/**
|
package/dist/index.cjs.js
CHANGED
|
@@ -9786,7 +9786,8 @@ var openApiSpec = {
|
|
|
9786
9786
|
} },
|
|
9787
9787
|
display: { type: "object", properties: {
|
|
9788
9788
|
hideTeamBudgetForMembers: { type: "boolean" },
|
|
9789
|
-
hideTeamBudgetForManagers: { type: "boolean" }
|
|
9789
|
+
hideTeamBudgetForManagers: { type: "boolean" },
|
|
9790
|
+
serviceKeyPrefixes: { type: "array", items: { type: "string" } }
|
|
9790
9791
|
} }
|
|
9791
9792
|
} } } }
|
|
9792
9793
|
}
|
|
@@ -10054,7 +10055,8 @@ function registerConfigRoutes(router, ctx) {
|
|
|
10054
10055
|
},
|
|
10055
10056
|
display: {
|
|
10056
10057
|
hideTeamBudgetForMembers: ctx.teamBudgetVisibility.hideTeamBudgetForMembers,
|
|
10057
|
-
hideTeamBudgetForManagers: ctx.teamBudgetVisibility.hideTeamBudgetForManagers
|
|
10058
|
+
hideTeamBudgetForManagers: ctx.teamBudgetVisibility.hideTeamBudgetForManagers,
|
|
10059
|
+
serviceKeyPrefixes: ctx.serviceKeyPrefixes
|
|
10058
10060
|
}
|
|
10059
10061
|
});
|
|
10060
10062
|
});
|
|
@@ -13670,6 +13672,7 @@ async function createRouter(options) {
|
|
|
13670
13672
|
const userIdDomain = config.getOptionalString("litellm.userIdDomain");
|
|
13671
13673
|
const publicBaseUrl = config.getOptionalString("litellm.publicBaseUrl") ?? null;
|
|
13672
13674
|
const supportContact = config.getOptionalString("litellm.supportContact");
|
|
13675
|
+
const serviceKeyPrefixes = (config.getOptionalStringArray("litellm.display.serviceKeyPrefixes") ?? []).map((p) => p.trim()).filter((p) => p.length > 0);
|
|
13673
13676
|
const baseClient = options.client ?? new LiteLLMClient({ baseUrl, masterKey });
|
|
13674
13677
|
const userInfoCacheTtlSeconds = config.getOptionalNumber("litellm.cache.userInfoTtlSeconds") ?? 10;
|
|
13675
13678
|
const client = userInfoCacheTtlSeconds > 0 ? withUserInfoCache(baseClient, { ttlMs: userInfoCacheTtlSeconds * 1e3 }) : baseClient;
|
|
@@ -13728,6 +13731,7 @@ async function createRouter(options) {
|
|
|
13728
13731
|
baseUrl,
|
|
13729
13732
|
publicBaseUrl,
|
|
13730
13733
|
supportContact,
|
|
13734
|
+
serviceKeyPrefixes,
|
|
13731
13735
|
userIdDomain,
|
|
13732
13736
|
provisioningEnabled,
|
|
13733
13737
|
provisioningDefaults,
|