-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
bugSomething isn't workingSomething isn't workingstaleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closedIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed
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_tokensonly 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_USDshould show the actual cost, not 0.0prompt_tokensshould 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 workingstaleIssue has not had recent activity or appears to be solved. Stale issues will be automatically closedIssue has not had recent activity or appears to be solved. Stale issues will be automatically closed