@cakecrusher/plugin-litellm
v0.1.4
Published
Integrates LiteLLM's key management system into Backstage, enabling teams to generate, track, and manage API keys for LLM services with budget controls and usage monitoring in a centralized interface.
Readme
LiteLLM Plugin for Backstage
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.
https://youtu.be/V9RXk5SJcCo
Features
- Generate LiteLLM API keys with custom names
- Support for budget/profile selection for generated keys
- Configurable budget requirement setting
- Instant code samples for different programming languages
- Copy-to-clipboard functionality for keys and code samples
Installation
From your Backstage root directory:
yarn add --cwd packages/app @cakecrusher/plugin-litellmConfiguration
Add the following to your app-config.yaml:
app:
litellm:
apiKey: 'your-organization-api-key' # Your LiteLLM admin/organization API key
baseUrl: 'https://your-litellm-instance.com' # URL to your LiteLLM instance
budgetRequired: false # Set to true if budget selection should be mandatoryAdding to your Backstage application
Add the plugin to your app
Add the LiteLLM page to your Backstage application by modifying your packages/app/src/App.tsx file:
import { LitellmPage } from '@cakecrusher/plugin-litellm';
// Inside your App component's route definitions:
<Route path="/litellm" element={<LitellmPage />} />Add a navigation item (optional)
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" />Usage
Once installed and configured, users can:
- Navigate to the LiteLLM page
- Enter a name for their API key
- Select a budget/profile (if applicable)
- Generate a key
- Copy the generated key
- Use provided code samples to integrate with their applications
License
Apache-2.0
