Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor: How LiteLLMBase Calculate total count #10532

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

Open
Woody-Hu wants to merge 1 commit into infiniflow:main
base: main
Choose a base branch
Loading
from Woody-Hu:refactor_how_LiteLLMBase_cal_total_token_count

Conversation

Copy link
Contributor

@Woody-Hu Woody-Hu commented Oct 13, 2025

What problem does this PR solve?

How LiteLLMBase Calculate total count

Type of change

  • Refactoring

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. ☯️ refactor Pull request that refactor/refine code labels Oct 13, 2025
@KevinHuSh KevinHuSh added the ci Continue Integration label Oct 14, 2025
Copy link
Member

@yongtenglei yongtenglei left a comment

Choose a reason for hiding this comment

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

Hi, @Woody-Hu,

This is a good idea to uniformly use total_token_count_from_response and remove total_token_count from LiteLLMBase, which should have been deprecated in the last refactoring.

Also, could you help me replace other use of total_token_count with total_token_count_from_response? For example, in Base, total_token_count is simply an alias for total_token_count_from_response. By this way, we can completely clean up the total_token_count.

Cheers.

@KevinHuSh KevinHuSh removed the ci Continue Integration label Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@yongtenglei yongtenglei yongtenglei requested changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

☯️ refactor Pull request that refactor/refine code size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /