@acarmisc/backstage-plugin-litellm-backend 0.17.4 → 0.17.6
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 +16 -1
- package/dist/index.cjs.js.map +2 -2
- package/dist/routes/bridge.js +18 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -12982,7 +12982,22 @@ function registerBridgeRoutes(router, ctx, bridgeOpts) {
|
|
|
12982
12982
|
logger,
|
|
12983
12983
|
bridgeIdentity
|
|
12984
12984
|
);
|
|
12985
|
-
|
|
12985
|
+
const teamIds = user.teams ?? [];
|
|
12986
|
+
const teamMetadata = [];
|
|
12987
|
+
for (const teamId of teamIds) {
|
|
12988
|
+
try {
|
|
12989
|
+
const teamInfo = await client.getTeamInfo(teamId);
|
|
12990
|
+
teamMetadata.push({
|
|
12991
|
+
id: teamId,
|
|
12992
|
+
name: teamInfo.team_alias || teamId
|
|
12993
|
+
// Use alias as display name, fallback to ID
|
|
12994
|
+
});
|
|
12995
|
+
} catch (e) {
|
|
12996
|
+
logger.debug(`Could not fetch team info for ${teamId}: ${e.message}`);
|
|
12997
|
+
teamMetadata.push({ id: teamId });
|
|
12998
|
+
}
|
|
12999
|
+
}
|
|
13000
|
+
res.json({ user_id: user.user_id, teams: teamIds, team_metadata: teamMetadata });
|
|
12986
13001
|
} catch (error) {
|
|
12987
13002
|
handleBridgeError(error, res);
|
|
12988
13003
|
}
|