docs: update README and ARCHITECTURE for v1.1.0 — litellm_history function

- README: three functions, litellm_history params and cost awareness note
- ARCHITECTURE: full Function 3 section with endpoint, fields, output format,
  token display rules, error paths, and performance considerations
This commit is contained in:
rin.kagamine committed 2026-06-04 21:24:41 -04:00
1 parent fd449079be
commit 8d90c0c277
2 files changed
+74 -4

No files matched your search

+11 -2
View File
@@ -1,6 +1,6 @@
# LiteLLM Dashboard — Open WebUI Tool
A simple, two-function Open WebUI Tool for checking LiteLLM proxy health and cost breakdowns.
A simple, three-function Open WebUI Tool for checking LiteLLM proxy health, cost breakdowns, and recent request history.
## Functions
@@ -10,6 +10,15 @@ Check LiteLLM proxy health and authentication status. Returns which models are h
### `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 show
- `show_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 |
@@ -33,7 +42,7 @@ Both valves are passed at runtime — no hardcoded keys. The tool is portable to
## Design Principles
- **Two functions, that's it.** No scope creep.
- **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.