feat: add hide_zero_spend parameter to litellm_cost()
Adds optional hide_zero_spend parameter (default False) to filter out models with bash.00 spend from the per-model breakdown. Useful when free-tier or subscription models (e.g. Ollama Cloud) dominate the breakdown with high token counts but zero cost. - Updated litellm_cost() signature with hide_zero_spend parameter - Added filtering logic in model line builder - Added hidden model count summary line - Updated README with parameter documentation - Bumped version to 1.2.0
This commit is contained in:
1 parent
51da313e3f
commit
6adcd79c1a
2 files changed
+15
-2
No files matched your search
@@ -10,6 +10,11 @@ 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.
|
||||
|
||||
**Parameters:**
|
||||
- `start_date` (str, required): Start date in YYYY-MM-DD format
|
||||
- `end_date` (str, required): End date in YYYY-MM-DD format
|
||||
- `hide_zero_spend` (bool, default false): Hide models with $0.00 spend. Useful when free-tier or subscription models (e.g. Ollama Cloud) dominate the breakdown with high token counts but zero cost.
|
||||
|
||||
### `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.
|
||||
|
||||
|
||||
Reference in new issue
Block a user