Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model Costs and Cached Tokens #4835

Open
Leon0402 opened this issue Dec 27, 2024 · 1 comment
Open

Model Costs and Cached Tokens #4835

Leon0402 opened this issue Dec 27, 2024 · 1 comment
Milestone

Comments

@Leon0402
Copy link

What feature would you like to be added?

Previously there where fields client.total_usage_summary and planner.client.actual_usage_summary with the amount of tokens and the costs. There is a class

@dataclass
class RequestUsage:
    prompt_tokens: int
    completion_tokens: int

but I think apart from the logic being flawed (see #4769, #4719) it also lacks important fields. Most notably the costs and the cached tokens.

I think this should also be mentioned in the Migration Guide.

Why is this needed?

Has been there previously in v2 and seems very useful to have in v4 as well.

@ekzhu ekzhu changed the title LLM Costs in v4 Model Costs and Cached Tokens Dec 27, 2024
@ekzhu ekzhu added this to the 0.4.1 milestone Dec 27, 2024
@ekzhu
Copy link
Collaborator

ekzhu commented Dec 27, 2024

Thanks @Leon0402 for the issue. yes, it is important. We are planning to address this after the 0.4.0. For now, let's targeting 0.4.1 for this one.

#4769 and #4719 must be resolved before tackling this one.

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

No branches or pull requests

2 participants