Model Pricing Tiers for Accurate Cost Tracking
Langfuse now supports pricing tiers for models with context-dependent pricing, enabling accurate cost calculation for models like Claude Sonnet 4.5, Gemini 2.5 Pro, Gemini 3 Pro Preview that charge different rates based on input token count.
Some model providers charge different rates depending on the number of input tokens used. For example, Anthropic’s Claude Sonnet 4.5 with 1M context window, Google’s Gemini 2.5 Pro and Gemini 3 Pro Preview all apply higher pricing when more than 200K input tokens are used.
Langfuse now supports pricing tiers for models, enabling accurate cost calculation for these context-dependent pricing structures.
How it works
Pricing tiers allow multiple price points for a single model, each with conditions that determine when that tier applies. Tiers are evaluated in priority order, and the first matching tier is used for cost calculation.
For example, Claude Sonnet 4.5 has two tiers:
- Standard (default): Applied when input tokens ≤ 200K
- Large Context: Applied when input tokens > 200K (2x input price, 1.5x output price)
Pre-configured models
The following models now have pricing tiers pre-configured in Langfuse and now support accurate cost tracking with zero changes necessary:
| Model | Tiers | Threshold |
|---|---|---|
claude-sonnet-4-5-20250929 | Standard / Large Context | > 200K input tokens |
gemini-2.5-pro | Standard / Large Context | > 200K input tokens |
gemini-3-pro-preview | Standard / Large Context | > 200K input tokens |
Custom pricing tiers
You can also define pricing tiers for your own custom models via the Langfuse UI or API. This is useful for:
- Self-hosted models with tiered pricing
- Fine-tuned models with custom pricing structures
- Other providers with context-dependent pricing
Each tier includes:
- Name: A descriptive name (e.g., “Standard”, “Large Context”)
- Priority: Evaluation order (0 is reserved for the default pricing tier)
- Conditions: Rules that determine when the tier applies (e.g., input tokens > 200K)
- Prices: Cost per usage type for this tier
Learn more