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

๐Ÿ› fix: fix litellm streaming usage issue #6734

Merged
merged 15 commits into from
Mar 6, 2025

Conversation

arvinxx
Copy link
Contributor

@arvinxx arvinxx commented Mar 5, 2025

๐Ÿ’ป ๅ˜ๆ›ด็ฑปๅž‹ | Change Type

  • โœจ feat
  • ๐Ÿ› fix
  • โ™ป๏ธ refactor
  • ๐Ÿ’„ style
  • ๐Ÿ‘ท build
  • โšก๏ธ perf
  • ๐Ÿ“ docs
  • ๐Ÿ”จ chore

๐Ÿ”€ ๅ˜ๆ›ด่ฏดๆ˜Ž | Description of Change

  • ไฟฎๆญฃไธŽ litellm ้›†ๆˆ็š„ๅ…ผๅฎนๆ€ง
  • ๅผ€ๅฏ stream ๆ—ถ้ป˜่ฎค include usage
  • ้‡ๆž„ Token Usage ็š„ๆ•ฐๆฎๆต

๐Ÿ“ ่กฅๅ……ไฟกๆฏ | Additional Information

Copy link

vercel bot commented Mar 5, 2025

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Comments Updated (UTC)
lobe-chat-database โœ… Ready (Inspect) Visit Preview Mar 6, 2025 6:53pm
lobe-chat-desktop โœ… Ready (Inspect) Visit Preview ๐Ÿ’ฌ Add feedback Mar 6, 2025 6:53pm
lobe-chat-preview โœ… Ready (Inspect) Visit Preview ๐Ÿ’ฌ Add feedback Mar 6, 2025 6:53pm

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 5, 2025
@lobehubbot
Copy link
Member

๐Ÿ‘ @arvinxx

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
้žๅธธๆ„Ÿ่ฐขๆ‚จๆๅ‡บๆ‹‰ๅ–่ฏทๆฑ‚ๅนถไธบๆˆ‘ไปฌ็š„็คพๅŒบๅšๅ‡บ่ดก็Œฎ๏ผŒ่ฏท็กฎไฟๆ‚จๅทฒ็ป้ตๅพชไบ†ๆˆ‘ไปฌ็š„่ดก็ŒฎๆŒ‡ๅ—๏ผŒๆˆ‘ไปฌไผšๅฐฝๅฟซๅฎกๆŸฅๅฎƒใ€‚
ๅฆ‚ๆžœๆ‚จ้‡ๅˆฐไปปไฝ•้—ฎ้ข˜๏ผŒ่ฏท้šๆ—ถไธŽๆˆ‘ไปฌ่”็ณปใ€‚

@dosubot dosubot bot added the ๐Ÿ› Bug Something isn't working | ็ผบ้™ท label Mar 5, 2025
Copy link

codecov bot commented Mar 5, 2025

Codecov Report

Attention: Patch coverage is 70.68493% with 107 lines in your changes missing coverage. Please review.

Project coverage is 91.30%. Comparing base (15d96d5) to head (ce66b6d).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...es/Conversation/Extras/Usage/UsageDetail/index.tsx 0.00% 77 Missing โš ๏ธ
...onversation/Extras/Usage/UsageDetail/ModelCard.tsx 3.70% 26 Missing โš ๏ธ
...es/Conversation/Extras/Usage/UsageDetail/tokens.ts 93.84% 4 Missing โš ๏ธ
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6734      +/-   ##
==========================================
+ Coverage   91.23%   91.30%   +0.06%     
==========================================
  Files         721      724       +3     
  Lines       67635    67967     +332     
  Branches     4488     3100    -1388     
==========================================
+ Hits        61708    62056     +348     
+ Misses       5927     5911      -16     
Flag Coverage ฮ”
app 91.30% <70.68%> (+0.06%) โฌ†๏ธ
server 97.60% <รธ> (+0.02%) โฌ†๏ธ

Flags with carried forward coverage won't be shown. Click here to find out more.

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

๐Ÿš€ New features to boost your workflow:
  • โ„ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • ๐Ÿ“ฆ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Mar 6, 2025
@arvinxx arvinxx merged commit 9f09952 into main Mar 6, 2025
29 of 30 checks passed
@arvinxx arvinxx deleted the refactor/force-include-usage branch March 6, 2025 18:46
@lobehubbot
Copy link
Member

โค๏ธ Great PR @arvinxx โค๏ธ

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
้กน็›ฎ็š„ๆˆ้•ฟ็ฆปไธๅผ€็”จๆˆทๅ้ฆˆๅ’Œ่ดก็Œฎ๏ผŒๆ„Ÿ่ฐขๆ‚จ็š„่ดก็Œฎ! ๅฆ‚ๆžœๆ‚จๅฏน LobeHub ๅผ€ๅ‘่€…็คพๅŒบๆ„Ÿๅ…ด่ถฃ๏ผŒ่ฏทๅŠ ๅ…ฅๆˆ‘ไปฌ็š„ discord๏ผŒ็„ถๅŽ็งไฟก @arvinxx ๆˆ– @canisminor1990ใ€‚ไป–ไปฌไผš้‚€่ฏทๆ‚จๅŠ ๅ…ฅๆˆ‘ไปฌ็š„็งๅฏ†ๅผ€ๅ‘่€…้ข‘้“ใ€‚ๆˆ‘ไปฌๅฐ†ไผš่ฎจ่ฎบๅ…ณไบŽ Lobe Chat ็š„ๅผ€ๅ‘๏ผŒๅˆ†ไบซๅ’Œ่ฎจ่ฎบๅ…จ็ƒ่Œƒๅ›ดๅ†…็š„ AI ๆถˆๆฏใ€‚

github-actions bot pushed a commit that referenced this pull request Mar 6, 2025
### [Version&nbsp;1.68.10](v1.68.9...v1.68.10)
<sup>Released on **2025-03-06**</sup>

#### ๐Ÿ› Bug Fixes

- **misc**: Fix litellm streaming usage and refactor the usage chunk.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Fix litellm streaming usage and refactor the usage chunk, closes [#6734](#6734) ([9f09952](9f09952))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

๐ŸŽ‰ This PR is included in version 1.68.10 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Mar 6, 2025
### [Version&nbsp;1.109.4](v1.109.3...v1.109.4)
<sup>Released on **2025-03-06**</sup>

#### ๐Ÿ› Bug Fixes

- **misc**: Fix litellm streaming usage and refactor the usage chunk.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Fix litellm streaming usage and refactor the usage chunk, closes [lobehub#6734](https://github.com/bentwnghk/lobe-chat/issues/6734) ([9f09952](9f09952))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
github-actions bot pushed a commit to jaworldwideorg/OneJA-Bot that referenced this pull request Mar 7, 2025
### [Version&nbsp;1.16.8](https://github.com/jaworldwideorg/OneJA-Bot//compare/v1.16.7...v1.16.8)
<sup>Released on **2025-03-07**</sup>

#### ๐Ÿ› Bug Fixes

- **misc**: Fix litellm streaming usage and refactor the usage chunk.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Fix litellm streaming usage and refactor the usage chunk, closes [lobehub#6734](https://github.com/jaworldwideorg/OneJA-Bot//issues/6734) ([9f09952](https://github.com/jaworldwideorg/OneJA-Bot//commit/9f09952))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
๐Ÿ› Bug Something isn't working | ็ผบ้™ท released size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants