Skip to content

Conversation

@Woody-Hu
Copy link
Contributor

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 requested a review from yongtenglei October 14, 2025 01:33
@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 added ci Continue Integration and removed ci Continue Integration labels Oct 15, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Oct 21, 2025
@Woody-Hu
Copy link
Contributor Author

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.

thanks already done

@yongtenglei yongtenglei self-requested a review October 21, 2025 00:51
@KevinHuSh KevinHuSh merged commit b30f0be into infiniflow:main Oct 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration ☯️ refactor Pull request that refactor/refine code size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants