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.
- 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
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