Analyze LLM API usage patterns and suggest optimizations to reduce costs by 50%+.
Run the analysis script against a usage log JSON file:
python3 scripts/analyze.py --input usage_logs/
Usage logs are JSON arrays of objects with:
timestamp (ISO 8601)model (e.g. "gpt-4o", "claude-sonnet-4-20250514")input_tokens (int)output_tokens (int)task_type (optional: "general", "coding", "classification", "extraction", "summary", "creative", "analysis")session_id (optional)cached (optional bool)All pricing is per 1M tokens (input/output). Rates are in the PRICING dict in scripts/analyze.py.
Downgrade suggestions map premium → mid → budget for simple tasks.
共 1 个版本