@acarmisc/backstage-plugin-litellm

中文文档
0.48.0发布于 2026/11/06Apache-2.0TypeScriptESM + CJS构建来源已验证近 30 天下载 4264

Frontend for the Backstage LiteLLM Governance Plugin — lets developers manage their LiteLLM virtual keys and follow their AI usage and budgets from Backstage.

原始使用文档
文档目录5 节
  1. Installation
  2. The /litellm page
  3. Homepage components
  4. Other exports
  5. License

@acarmisc/backstage-plugin-litellm

Frontend for the Backstage LiteLLM Governance Plugin — lets developers manage their LiteLLM virtual keys and follow their AI usage and budgets from Backstage.

Built for the New Frontend System (@backstage/frontend-plugin-api). It needs the backend, @acarmisc/backstage-plugin-litellm-backend, which talks to LiteLLM and enforces every rule.

Full documentation — adoption guide, configuration, permissions, security model and architecture — starts at the project README.

Installation

yarn --cwd packages/app add @acarmisc/backstage-plugin-litellm

If your app discovers features from its dependencies (app.packages: all), the plugin is picked up automatically. Otherwise register it:

// packages/app/src/App.tsx
import { createApp } from '@backstage/frontend-defaults';
import litellmPlugin from '@acarmisc/backstage-plugin-litellm';

const app = createApp({
  features: [litellmPlugin],
});

This adds the /litellm page and the liteLlmApiRef API used by every component below.

The /litellm page

Tabs: Overview (usage KPIs and charts), Keys (your virtual keys: edit, block / unblock, reset spend, delete), Teams (team usage, and team management for admins), Models (the proxy's model catalogue) and Audit Log (members of litellm.audit.group only). ?tab=<name> opens a tab and ?generate=1 opens the Generate New Key dialog.

The /litellm page

Homepage components

ComponentWhat it shows
LiteLLMHomeWidgetSpend and tokens for Today / 7d / 30d with a daily sparkline
LiteLLMBudgetWidgetThe budget hierarchy (key → personal → team → global) with a meter per limit
LiteLLMBudgetGaugesA condensed budget card: one ring per level and a month-to-date chart
GenerateKeyButtonThe shared "Generate New Key" button (onClick, or to="/litellm?generate=1")
import {
  LiteLLMHomeWidget,
  LiteLLMBudgetGauges,
} from '@acarmisc/backstage-plugin-litellm';

<LiteLLMHomeWidget defaultPeriod="7d" />
<LiteLLMBudgetGauges />

Props for each component are documented in docs/frontend.md.

LiteLLMBudgetGauges

To try it without a backend, run npm start in this package: it serves the plugin with mock data at http://localhost:3000/litellm (see CONTRIBUTING.md).

Other exports

  • litellmPlugin (also the default export)
  • LiteLLMPage, and the building blocks it uses: DashboardHeader, KeysTable, UsageStats, TeamUsage, KeyFormDialog, ManageTeamDialog. Prefer LiteLLMPage; composing the pieces yourself means wiring their data and callbacks the way the page does.
  • LiteLlmApi, liteLlmApiRef, the shared API types, and the litellmTeam*Permission definitions.

License

Apache-2.0

版本与发布记录

@acarmisc/backstage-plugin-litellm 共发布 77 个版本,首次发布于 2026/05/12;过去 12 个月发布了 77 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.48.0latest2026/11/062 天前
0.47.02026/11/025 天前
0.46.02026/10/309 天前
0.45.02026/10/309 天前
0.44.02026/10/2513 天前
0.43.02026/10/1920 天前

关于 @acarmisc/backstage-plugin-litellm 的常见问题

@acarmisc/backstage-plugin-litellm 是什么?

Frontend for the Backstage LiteLLM Governance Plugin — lets developers manage their LiteLLM virtual keys and follow their AI usage and budgets from Backstage.

如何安装 @acarmisc/backstage-plugin-litellm?

在项目目录运行 npm install @acarmisc/backstage-plugin-litellm,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.0.0)、react-dom(^18.0.0)、@types/react(^18.0.0)、react-router-dom(^6.20.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@acarmisc/backstage-plugin-litellm 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@acarmisc/backstage-plugin-litellm 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@acarmisc/backstage-plugin-litellm 可以商用吗?

@acarmisc/backstage-plugin-litellm 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@acarmisc/backstage-plugin-litellm 的下载量有多少?

根据 npm 官方下载统计,@acarmisc/backstage-plugin-litellm 在 2026/10/05 – 2026/11/03 这 30 天内被下载 4,264 次,日均约 142 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@acarmisc/backstage-plugin-litellm 还在维护吗?

最新版本 0.48.0 发布于 2026/11/06(2 天前);至今共发布 77 个版本,其中过去 12 个月发布了 77 个;首次发布于 2026/05/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。