Adds _resolve_date() helper that converts natural language shortcuts
into YYYY-MM-DD before calling the LiteLLM API.
Supported shortcuts:
- today, yesterday, tomorrow
- N days ago (e.g. "two days ago")
- monday-sunday (most recent occurrence)
- last monday-last sunday
- this week, last week
- this month, last month
Falls back to passthrough for already-formatted YYYY-MM-DD strings.
Updated README with new parameter documentation.
Previously filtered only exact $0.00, which left models with tiny
fractional spend (e.g. $0.0001) visible. Now hides anything below
$0.001 threshold — statistically insignificant noise.
- Changed comparison from == 0 to < 0.001
- Updated docstring and summary text
- Updated README parameter description
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
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.
Entry 3 had metadata.status='failure' and no exception, but DID have
error_information.error_message='No api key passed in.' Now we surface
that actual error message instead of the generic 'status: failure'.
Priority: exception > error_message > generic status.
Entry 3 in our logs had metadata.status='failure' but no exception string,
so it was incorrectly shown as ✅ OK. Now checks both exception AND
metadata.status == 'failure'. Also updates failed count in summary.
New function litellm_history(limit=20, show_cost=True) hits /spend/logs,
sorts by startTime descending, and shows the most recent N requests with:
- Model name (stripped of provider prefix)
- Call type (chat/embed/image)
- Status (✅/❌ based on exception)
- Duration
- Token counts (prompt→completion, compact format)
- Cache hit percentage (💾 indicator)
- Per-request cost (optional)
Limit capped at 50. Bumps version to 1.1.0.
- Strip common provider prefixes (gemini/, openai/, anthropic/, mistral/, cohere/)
- Truncate names > 24 chars with ellipsis (…) instead of hardcoded abbreviations
- Works generically for any LiteLLM model, not just our Gemini config