You are currently at the root of the repository, this is the backstage app showing the plugin in action.
See plugin code in the plugins/litellm
directory
This plugin integrates LiteLLM key management functionality into your Backstage instance, allowing users to generate and manage API keys for LiteLLM services directly from the Backstage UI.
- LiteLLM instance
- Backstage instance with microsoft auth provider configured.
- Generate LiteLLM API keys with custom names
- Team and budget verification
- Instant code samples for different programming languages
- Automatic user creation in LiteLLM (using
Azure Active Directory
email format as theuser_id
)
From your Backstage root directory:
yarn add --cwd packages/app @litellm/plugin-litellm
Add the following to your app-config.yaml
:
app:
litellm:
baseUrl: 'https://your-litellm-instance.com' # URL to your LiteLLM instance
adminKey: 'your-organization-api-key' # Your LiteLLM admin/organization API key
teamId: 'your-team-id' # Your LiteLLM team ID
budgetId: 'your-budget-id' # Your LiteLLM budget ID
maxBudgetPerUser: 5 # Maximum budget per user
Add the LiteLLM page to your Backstage application by modifying your packages/app/src/App.tsx
file:
import { LitellmPage } from '@litellm/plugin-litellm';
// Inside your App component's route definitions:
<Route path="/litellm" element={<LitellmPage />} />
Modify your packages/app/src/components/Root/Root.tsx
to add a navigation item:
import SmartToyIcon from '@material-ui/icons/Train';
// Inside your sidebar items:
<SidebarItem icon={SmartToyIcon} to="litellm" text="LiteLLM Keys" />
Once installed and configured, users can:
- Navigate to the LiteLLM page
- Enter a name for their API key
- Generate a key
- Use provided code samples to integrate with their applications
Apache-2.0