get_langfuse_model_costs
Analyze LLM costs and token usage by model from Langfuse. Understand which models drive spend and optimize model selection based on cost-per-1k-token efficiency.
Instructions
Break down LLM spend and token usage by model from Langfuse observability data.
Shows cost and token consumption for every model tracked in Langfuse, useful for understanding which models are driving spend and optimizing model selection.
Requires: LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY in environment. Optional: LANGFUSE_HOST (defaults to https://cloud.langfuse.com)
Args: days: lookback window in days (default 30, ignored if start/end provided) start_date: ISO date string YYYY-MM-DD end_date: ISO date string YYYY-MM-DD
Returns cost per model, tokens per model, and cost-per-1k-token efficiency.
Examples: - "Show me our LLM costs by model in Langfuse" - "Which model is costing us the most in Langfuse?" - "What's our cost per 1k tokens for GPT-4 vs Claude?"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| end_date | No | ||
| start_date | No |