mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
[Bug] Claude Haiku 4.5 pricing unit incorrect in OpenRouter provider config #800
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alanhuang67 on GitHub (Nov 12, 2025).
Self Checks
Dify version
1.9.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Bug Description
The pricing configuration for Claude Haiku 4.5 in the OpenRouter provider has an incorrect
unitvalue, causing the displayed pricing to be 1000x higher than the actual cost.Current Configuration (Incorrect)
File:
claude-haiku-4.5.yamlThis configuration results in:
Expected Configuration (Correct)
This should result in:
Evidence
The correct
unitvalue can be verified by comparing withclaude-sonnet-4-5.yaml, which correctly usesunit: '0.000001'.Official Pricing References:
Impact
Proposed Fix
Change the
unitvalue inclaude-haiku-4.5.yamlfrom'0.001'to'0.000001'to match:Additional Context
unit: '0.000001'correctlyEnvironment
Screenshots
[Attach your two screenshots showing the incorrect configuration in claude-haiku-4.5.yaml and the correct configuration in claude-sonnet-4-5.yaml]
[Bug] Incorrect pricing unit for Claude Haiku 4.5 in OpenRouter provider (1000x inflated)
✔️ Expected Behavior
The pricing for Claude Haiku 4.5 should display as $1 per million input tokens and $5 per million output tokens, matching Anthropic's official pricing and OpenRouter's actual rates.
When users view the model pricing in Dify's UI or calculate token costs, the system should show:
For example, a conversation with:
Should cost: (10,000 × $1 / 1,000,000) + (5,000 × $5 / 1,000,000) = $0.01 + $0.025 = $0.035
❌ Actual Behavior
Actual Behavior
The pricing currently displays as $1,000 per million input tokens and $5,000 per million output tokens due to incorrect
unit: '0.001'configuration.The same conversation example above would incorrectly show as costing $35.00 instead of $0.035 - a 1000x overestimation.
@dosubot[bot] commented on GitHub (Nov 12, 2025):
Hi @alanhuang67! I'm Dosu and I’m helping the dify team.
You are correct: the current configuration for Claude Haiku 4.5 in the OpenRouter provider sets the pricing
unitto'0.001', which causes a 1000x overestimation of token costs. This is inconsistent with both Anthropic's official pricing and the configuration for other Claude 4.x models like Sonnet 4.5, which use the correctunit: '0.000001'value. Updating theunitinclaude-haiku-4.5.yamlto'0.000001'will align the cost calculations and UI display with the intended $1/M input and $5/M output pricing, matching both official and internal standards. No related pull requests or fixes are currently pending, so a direct update to the YAML config is needed to resolve this issue.See the current config here.
Reference for correct config.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@dosubot[bot] commented on GitHub (Nov 12, 2025):
You’re correct—there’s a bug in the OpenRouter provider config for Claude Haiku 4.5: the pricing unit is set to
0.001instead of the correct0.000001, which causes a 1000x overestimation of token costs in Dify’s UI and billing estimates. Other Claude models like Sonnet 4.5 and Opus 4.1 use the correct unit value, so this issue is isolated to Haiku 4.5. The intended pricing should be $1 per million input tokens and $5 per million output tokens, matching Anthropic and OpenRouter’s official rates (source, source).This misconfiguration was introduced when the model was added (source), and updating the unit to
0.000001will fix the cost display and billing calculations. No other models are affected.To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
