Skip to content

Conversation

@punkpeye
Copy link
Contributor

@punkpeye punkpeye commented Jan 22, 2025

Added logic to poll for the cost.

The cost might not be immediately available if the request was interrupted.


Important

Adds polling in GlamaHandler to fetch cost information with retries if not immediately available.

  • Behavior:
    • Adds polling logic in GlamaHandler in glama.ts to fetch cost information if not immediately available.
    • Polls up to 10 times with a 200ms delay between attempts.
    • Yields usage data including cacheWriteTokens, cacheReadTokens, inputTokens, outputTokens, and totalCost when available.
  • Error Handling:
    • Logs error to console if fetching completion details fails.

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

@changeset-bot
Copy link

changeset-bot bot commented Jan 22, 2025

⚠️ No Changeset found

Latest commit: 576c92f

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

@punkpeye
Copy link
Contributor Author

@mrubens anything to do here on my part to get it released?

@mrubens mrubens merged commit 45aa069 into RooCodeInc:main Jan 23, 2025
6 checks passed
@mrubens
Copy link
Collaborator

mrubens commented Jan 23, 2025

@mrubens anything to do here on my part to get it released?

Nope, sorry for the delay!

@punkpeye
Copy link
Contributor Author

Thank you!

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.

2 participants