@acarmisc/backstage-plugin-litellm-backend 0.25.0 → 0.26.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/index.cjs.js CHANGED
@@ -11290,6 +11290,16 @@ function registerObjectPermissionsRoutes(router, ctx) {
11290
11290
  sendTeamError,
11291
11291
  authorizeTeamSubresource
11292
11292
  } = ctx;
11293
+ router.get("/object-names", createRequireUser(ctx), async (_req, res) => {
11294
+ const [vectorStores, mcpServers] = await Promise.all([
11295
+ client.listVectorStores().catch(() => []),
11296
+ client.listMcpServers().catch(() => [])
11297
+ ]);
11298
+ res.json({
11299
+ vector_stores: vectorStores.map(({ id, name }) => ({ id, name })),
11300
+ mcp_servers: mcpServers.map(({ id, name }) => ({ id, name }))
11301
+ });
11302
+ });
11293
11303
  router.get("/vector-stores", async (req, res) => {
11294
11304
  if (!requireObjectPerms(res)) return;
11295
11305
  if (!teamAdminCfg.group) {
@@ -13543,7 +13553,13 @@ function registerBridgeRoutes(router, ctx, bridgeOpts) {
13543
13553
  return;
13544
13554
  }
13545
13555
  const names = teamMcpServers(await client.getTeamInfo(teamId));
13546
- res.json(names.map((server_name) => ({ server_name })));
13556
+ const catalogue = await client.listMcpServers().catch(() => []);
13557
+ res.json(
13558
+ names.map((server_name) => ({
13559
+ server_name,
13560
+ name: catalogue.find((s) => s.id === server_name || s.name === server_name)?.name ?? server_name
13561
+ }))
13562
+ );
13547
13563
  } catch (error) {
13548
13564
  handleBridgeError(error, res);
13549
13565
  }