Skip to content

fix: make stats pricing model match case-insensitive#266

Open
hinzga wants to merge 1 commit into
CortexLM:mainfrom
hinzga:fix-stats-model-pricing-case
Open

fix: make stats pricing model match case-insensitive#266
hinzga wants to merge 1 commit into
CortexLM:mainfrom
hinzga:fix-stats-model-pricing-case

Conversation

@hinzga
Copy link
Copy Markdown

@hinzga hinzga commented May 12, 2026

Summary

  • make built-in stats pricing match against the lowercased model id, matching custom-pricing behavior
  • add a regression test confirming GPT-4O and gpt-4o resolve to the same estimated cost

Fixes the upstream behavior described in PlatformNetwork/bounty-challenge#51637.

Testing

  • cargo fmt --check --package cortex-cli
  • cargo check -p cortex-cli passes; repository emits two existing warnings outside this change
  • cargo test -p cortex-cli stats_cmd::tests::test_calculate_cost_is_case_insensitive_for_builtin_pricing is blocked before running this test by an unrelated existing compile error in src/cortex-cli/src/agent_cmd/tests.rs importing private read_file_with_encoding via agent_cmd::loader instead of directly from utils::file

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant