LiteLLM Dashboard Tool v1.0.0 — two-function OWI Tool
- litellm_health: proxy health + auth check (strips litellm_metadata) - litellm_cost: cost breakdown by date range (per-model, per-day, cache hit rate) - Valves: litellm_url, litellm_master_key (password field, no hardcoded keys) - Tested against mon-rin1:4000 Gemini proxy — all green - Error handling: auth failure, connection failure, timeout - Architecture doc: Memory Palace KB #596
This commit is contained in:
commit
98a1b3c546
3 files changed
+279
No files matched your search
@@ -0,0 +1,44 @@
|
||||
# LiteLLM Dashboard — Open WebUI Tool
|
||||
|
||||
A simple, two-function Open WebUI Tool for checking LiteLLM proxy health and cost breakdowns.
|
||||
|
||||
## Functions
|
||||
|
||||
### `litellm_health`
|
||||
Check LiteLLM proxy health and authentication status. Returns which models are healthy/unhealthy, their rate limits, and any auth errors.
|
||||
|
||||
### `litellm_cost`
|
||||
Get LiteLLM cost breakdown for a date range. Returns per-model and per-day spend, token counts, cache hit rate, and request stats.
|
||||
|
||||
## Valves (Configuration)
|
||||
|
||||
| Valve | Default | Purpose |
|
||||
|-------|---------|---------|
|
||||
| `litellm_url` | `http://localhost:4000` | LiteLLM proxy base URL |
|
||||
| `litellm_master_key` | (empty) | LiteLLM master API key (password field) |
|
||||
|
||||
Both valves are passed at runtime — no hardcoded keys. The tool is portable to any LiteLLM proxy instance.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Copy `litellm_dashboard.py` to your Open WebUI Workspace or import via Admin → Tools
|
||||
2. Configure the two valves with your LiteLLM proxy URL and master key
|
||||
3. Enable the tool on a per-model or per-chat basis
|
||||
|
||||
## Requirements
|
||||
|
||||
- `requests` (standard pip package)
|
||||
- Open WebUI 0.4.0+
|
||||
- A running LiteLLM proxy instance
|
||||
|
||||
## Design Principles
|
||||
|
||||
- **Two functions, that's it.** No scope creep.
|
||||
- **Portable.** No hardcoded URLs or keys.
|
||||
- **Token-efficient.** Strips `litellm_metadata` (~2KB/model) from health responses. Formats cost data as readable text, not raw JSON dumps.
|
||||
- **General-purpose.** Works with any LiteLLM proxy instance.
|
||||
- **Read-only.** GET endpoints only. No mutations, no risk.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
Reference in new issue
Block a user