When show_failed=False, filters out requests with metadata.exception or metadata.status='failure' before applying the limit. Useful for hiding auth probe noise and routing failures. Header shows '(failed requests hidden)' when active.
LiteLLM Dashboard — Open WebUI Tool
A simple, three-function Open WebUI Tool for checking LiteLLM proxy health, cost breakdowns, and recent request history.
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.
litellm_history
Get recent LiteLLM request history. Returns the most recent N requests with model, call type, status, duration, token counts, cache hit %, and per-request cost. Useful for understanding which models are being called and how much individual requests cost.
Parameters:
limit(int, 1-50, default 20): Number of recent requests to showshow_cost(bool, default true): Include per-request cost
Cost awareness: This function hits /spend/logs which returns all historical logs. For large deployments, this can be a heavy query. Use reasonable limit values.
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
- Copy
litellm_dashboard.pyto your Open WebUI Workspace or import via Admin → Tools - Configure the two valves with your LiteLLM proxy URL and master key
- 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
- Three 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.
Documentation
- ARCHITECTURE.md — Full architecture and design doc: API endpoints, response processing, stripped fields, error paths, future considerations.
- This README — Quick reference: install, functions, valves, design principles.
License
MIT