Skip to content

Conversation

@vigneshsubbiah16
Copy link
Contributor

@vigneshsubbiah16 vigneshsubbiah16 commented Jan 29, 2025

Description

The cached token count was not accounted for price previously. Adding support to account for cached token count for pricing.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  1. In Provider Settings, choose Unbound provider
  2. Choose a model that has cached tokens like Anthropic/claude-3-5-sonnet
  3. Try a new task and that should show the cached token count and the corresponding price.

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

image

Related Issues

Reviewers


Important

Fixes cached token count handling in UnboundHandler to ensure accurate pricing for models with cached tokens.

  • Behavior:
    • Fixes cached token count handling in UnboundHandler in unbound.ts.
    • Adds cacheWriteTokens and cacheReadTokens to usage data if available.
  • Misc:
    • Updates logic in createMessage() to yield updated usage data.

This description was created by Ellipsis for 6ccb061. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2025

⚠️ No Changeset found

Latest commit: d643359

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vigneshsubbiah16 vigneshsubbiah16 marked this pull request as ready for review January 29, 2025 17:01
@mrubens mrubens merged commit 449b9ef into RooCodeInc:main Jan 29, 2025
4 checks passed
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.

3 participants