-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
execution_info
shows total_cost_USD: 0.0
for OpenRouter calls that cost small amounts. Two issues:
- Rounding problem: Small costs <$0.0 get rounded down to 0.0 instead of showing the actual amount
- Missing tokens:
prompt_tokens
only counts the user prompt, completely ignores the webpage content that gets fed to the LLM
To Reproduce
Using OpenRouter with gpt-4.1 model, for a decent size webpage scraping call, the exec info shows:
[
{
"node_name": "GenerateAnswer",
"total_tokens": 213,
"prompt_tokens": 193,
"completion_tokens": 20,
"successful_requests": 1,
"total_cost_USD": 0.0,
"exec_time": 1.89
},
{
"node_name": "TOTAL RESULT",
"total_tokens": 213,
"prompt_tokens": 193,
"completion_tokens": 20,
"successful_requests": 1,
"total_cost_USD": 0.0,
"exec_time": 8.98
}
]
But checking OpenRouter shows I actually got charged (even if small amounts like $0.007-0.01 per call).
Expected behavior
total_cost_USD
should show the actual cost, not 0.0prompt_tokens
should include webpage content tokens, not just the user prompt (193 tokens seems way too low for a full webpage + prompt)
Additional context
Input token usage issue is actaully for manual cost tracking as a fallback which is now impossible.
dosubot
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working