@acarmisc/backstage-plugin-litellm-backend 0.17.3 → 0.17.4
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/index.cjs.js +7 -5
- package/dist/index.cjs.js.map +2 -2
- package/dist/plugin.d.ts +6 -0
- package/dist/plugin.js +13 -6
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -13238,6 +13238,12 @@ async function createRouter(options) {
|
|
|
13238
13238
|
|
|
13239
13239
|
// src/plugin.ts
|
|
13240
13240
|
var import_backstage_plugin_litellm_common10 = require("@acarmisc/backstage-plugin-litellm-common");
|
|
13241
|
+
var BRIDGE_UNAUTHENTICATED_PATHS = [
|
|
13242
|
+
"/bridge/health",
|
|
13243
|
+
"/bridge/keys",
|
|
13244
|
+
"/bridge/models",
|
|
13245
|
+
"/bridge/user/info"
|
|
13246
|
+
];
|
|
13241
13247
|
var litellmPlugin = (0, import_backend_plugin_api.createBackendPlugin)({
|
|
13242
13248
|
pluginId: "litellm",
|
|
13243
13249
|
register(reg) {
|
|
@@ -13270,11 +13276,7 @@ var litellmPlugin = (0, import_backend_plugin_api.createBackendPlugin)({
|
|
|
13270
13276
|
});
|
|
13271
13277
|
httpRouter.use(router);
|
|
13272
13278
|
if (readBridgeConfig(config).enabled) {
|
|
13273
|
-
for (const path of
|
|
13274
|
-
"/bridge/health",
|
|
13275
|
-
"/bridge/keys",
|
|
13276
|
-
"/bridge/models"
|
|
13277
|
-
]) {
|
|
13279
|
+
for (const path of BRIDGE_UNAUTHENTICATED_PATHS) {
|
|
13278
13280
|
httpRouter.addAuthPolicy({ path, allow: "unauthenticated" });
|
|
13279
13281
|
}
|
|
13280
13282
|
}
|