docs: update README and ARCHITECTURE for show_failed parameter
- README: add show_failed to litellm_history params - ARCHITECTURE: update params line and add Filtering section explaining show_failed=False behavior and header indicator
This commit is contained in:
1 parent
8a8be608a0
commit
51da313e3f
2 files changed
+4
-1
No files matched your search
+3
-1
@@ -161,7 +161,7 @@ By Date:
|
|||||||
|
|
||||||
**LiteLLM Endpoint:** `GET {litellm_url}/spend/logs`
|
**LiteLLM Endpoint:** `GET {litellm_url}/spend/logs`
|
||||||
**Auth:** `Authorization: Bearer {litellm_master_key}`
|
**Auth:** `Authorization: Bearer {litellm_master_key}`
|
||||||
**Params:** `limit` (int, 1-50, default 20), `show_cost` (bool, default true)
|
**Params:** `limit` (int, 1-50, default 20), `show_cost` (bool, default true), `show_failed` (bool, default true)
|
||||||
|
|
||||||
### Response Processing
|
### Response Processing
|
||||||
|
|
||||||
@@ -169,6 +169,8 @@ The `/spend/logs` endpoint returns **all** historical request logs (no server-si
|
|||||||
|
|
||||||
**Performance note:** For large deployments (thousands of logs), this endpoint can be slow. The tool caps `limit` at 50 and uses a 30s timeout.
|
**Performance note:** For large deployments (thousands of logs), this endpoint can be slow. The tool caps `limit` at 50 and uses a 30s timeout.
|
||||||
|
|
||||||
|
**Filtering:** When `show_failed=False`, requests with `metadata.exception` or `metadata.status="failure"` are filtered out before applying the `limit`. This hides auth probe noise, routing failures, and other non-essential errors. The header shows "(failed requests hidden)" when active.
|
||||||
|
|
||||||
### Per-Request Fields
|
### Per-Request Fields
|
||||||
|
|
||||||
| Field | Description |
|
| Field | Description |
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Get recent LiteLLM request history. Returns the most recent N requests with mode
|
|||||||
**Parameters:**
|
**Parameters:**
|
||||||
- `limit` (int, 1-50, default 20): Number of recent requests to show
|
- `limit` (int, 1-50, default 20): Number of recent requests to show
|
||||||
- `show_cost` (bool, default true): Include per-request cost
|
- `show_cost` (bool, default true): Include per-request cost
|
||||||
|
- `show_failed` (bool, default true): Include failed requests. Set false to hide auth failures, routing errors, and probe noise.
|
||||||
|
|
||||||
**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.
|
**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.
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user