Skip to content

[BUG] Improper Price for models with price differences based on input token count #8982

@nickcatal

Description

@nickcatal

Problem (one or two sentences)

The cost wrong for both Gemini and Sonnet 4/4.5 above 200k for every provider. And I believe Qwen 3 Max.

There is no calculator in the Roo codebase to reflect that an input token count over 200k is higher on Gemini and Claude than a prompt with an input token count under. Nor is there code in the Vertex AI provider to reflect regional differences on Sonnet 4.5 (once Sonnet 4/4.5 > 200k is supported)

The prices for Sonnet and Gemini baked into the code on Anthropic/Gemini/OpenRouter/Vertex/Bedrock/etc all assume that 200k-1m is the 0-200k price.

Context (who is affected and when)

All users of models with different prices when the input is above 200k tokens.

Reproduction steps

  1. Use Gemini or Sonnet 4.5 on a provider that supports > 200k tokens, then compare your cost to the cost in Roo

Expected result

The correct price for these > 200k prices

Actual result

The same price as if the input is < 200k

Variations tried (optional)

No response

App Version

Latest

API Provider (optional)

None

Model Used (optional)

Claude 4/4.5, Gemini, (maybe) Qwen 3 Max

Roo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Issue [In Progress]

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions