Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Oct 24, 2025

Important

Enhances Roo provider pricing and usage handling by using parseApiPrice and introducing RooUsage for detailed usage data.

  • Pricing Handling:
    • Replaces parseFloat with parseApiPrice for pricing fields in getRooModels() in fetchers/roo.ts.
  • Usage Data:
    • Introduces RooUsage interface in roo.ts to extend OpenAI.CompletionUsage with cache_creation_input_tokens and cost.
    • Updates createMessage() in RooHandler to yield cacheWriteTokens, cacheReadTokens, and totalCost using RooUsage.
  • Misc:
    • Adds RooUsage handling in RooHandler for more detailed usage reporting.

This description was created by Ellipsis for 459c5e4. You can customize this summary. It will automatically update as commits are pushed.

@mrubens mrubens requested review from cte and jr as code owners October 24, 2025 13:42
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Oct 24, 2025
@roomote
Copy link
Contributor

roomote bot commented Oct 24, 2025

Issues Found

  • Line 138: Using || undefined for cache_creation_input_tokens converts 0 to undefined, losing valid data. Should use ?? undefined to preserve 0 values.
  • Line 139: Using || undefined for cached_tokens converts 0 to undefined, losing valid data. Should use ?? undefined to preserve 0 values.

Follow Along on Roo Code Cloud

@dosubot dosubot bot added the bug Something isn't working label Oct 24, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 24, 2025
@mrubens mrubens merged commit 1a9e7ca into main Oct 24, 2025
9 checks passed
@mrubens mrubens deleted the handle_roo_provider_pricing branch October 24, 2025 14:07
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Oct 24, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants