Skip to content

[BUG] Cost miscalculation #8650

@parthasarathyy-m

Description

@parthasarathyy-m

Problem (one or two sentences)

I've been using roo code with Claude 4.5 Sonnet for the past few days. A wierd thing i have noticed is that in the session header in roo code the input tokens are shown as 527k and output is 7.7k, My observation is that for claude 4.5 sonnet the token cost for 1m input tokens is $3 so it should have been atleast $1.5 in the cost right? but in roo code it is shown as $0.46. But it looks like roocode uses the cost returned from the open router API. is there any miscalculations happening or Am i missing something here?

Image

Context (who is affected and when)

It happens when using claude sonnet 4.5.

Reproduction steps

1 . Windows , Claude 4.5 sonent, openrouter.

Expected result

Cost should be accurate

Actual result

looks like cost is wrong

Variations tried (optional)

No response

App Version

3.28.16

API Provider (optional)

OpenRouter

Model Used (optional)

Claude 4.5 sonnet

Roo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions