Skip to content

🐛 fix: fix anthropic max tokens #6859

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

Merged
merged 3 commits into from
Mar 10, 2025
Merged

🐛 fix: fix anthropic max tokens #6859

merged 3 commits into from
Mar 10, 2025

Conversation

arvinxx
Copy link
Contributor

@arvinxx arvinxx commented Mar 10, 2025

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

  • 修正 Claude + Thinking 模式下的maxToken不对的问题
  • 修正 i18n

📝 补充信息 | Additional Information

Copy link

vercel bot commented Mar 10, 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 10, 2025 3:36am
lobe-chat-desktop ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 10, 2025 3:36am
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 10, 2025 3:36am

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 10, 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 10, 2025
Copy link
Contributor

gru-agent bot commented Mar 10, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 278c8ed 🚫 Skipped No files need to be tested {"src/libs/agent-runtime/anthropic/index.test.ts":"target file(src/libs/agent-runtime/anthropic/index.test.ts) not in work scope \n include: src/utils,src/server,src/database,src/services,src/store,packages//src/ \n exclude: node_modules,/*.test.ts,/.test.tsx,**/.spec.ts,/*.spec.tsx,/.d.ts,**/.test.js,/*.spec.js,src/database/server","src/libs/agent-runtime/anthropic/index.ts":"target file(src/libs/agent-runtime/anthropic/index.ts) not in work scope \n include: src/utils,src/server,src/database,src/services,src/store,packages//src/** \n exclude: node_modules,/*.test.ts,/.test.tsx,**/.spec.ts,/*.spec.tsx,/.d.ts,**/.test.js,**/*.spec.js,src/database/server"}

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.36%. Comparing base (dfee9b2) to head (76ebd1a).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6859      +/-   ##
==========================================
+ Coverage   91.34%   91.36%   +0.02%     
==========================================
  Files         729      729              
  Lines       68673    68676       +3     
  Branches     4640     3345    -1295     
==========================================
+ Hits        62728    62746      +18     
+ Misses       5945     5930      -15     
Flag Coverage Δ
app 91.36% <100.00%> (+0.02%) ⬆️
server 97.57% <ø> (ø)

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.

@arvinxx arvinxx merged commit 35fbc6c into main Mar 10, 2025
15 of 18 checks passed
@arvinxx arvinxx deleted the fix/ahthropic branch March 10, 2025 03:21
@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 10, 2025
### [Version&nbsp;1.70.1](v1.70.0...v1.70.1)
<sup>Released on **2025-03-10**</sup>

#### 🐛 Bug Fixes

- **misc**: Fix anthropic max tokens.

<br/>

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

#### What's fixed

* **misc**: Fix anthropic max tokens, closes [#6859](#6859) ([35fbc6c](35fbc6c))

</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.70.1 🎉

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 11, 2025
## [Version&nbsp;1.111.0](v1.110.1...v1.111.0)
<sup>Released on **2025-03-11**</sup>

#### ✨ Features

- **misc**: Support no-fc models like deepseek r1 with online search.

#### 🐛 Bug Fixes

- **misc**: Fix anthropic max tokens, update cvpr cvf url rules.

<br/>

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

#### What's improved

* **misc**: Support no-fc models like deepseek r1 with online search, closes [lobehub#6842](https://github.com/bentwnghk/lobe-chat/issues/6842) ([f284c25](f284c25))

#### What's fixed

* **misc**: Fix anthropic max tokens, closes [lobehub#6859](https://github.com/bentwnghk/lobe-chat/issues/6859) ([35fbc6c](35fbc6c))
* **misc**: Update cvpr cvf url rules, closes [lobehub#6860](https://github.com/bentwnghk/lobe-chat/issues/6860) ([c299067](c299067))

</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 13, 2025
## [Version&nbsp;1.18.0](v1.17.1...v1.18.0)
<sup>Released on **2025-03-13**</sup>

#### ✨ Features

- **misc**: Support no-fc models like deepseek r1 with online search.

#### 🐛 Bug Fixes

- **misc**: Fix anthropic max tokens, fix context cache control and model builtin search switch, fix crawl result for short content, fix theme flicking, Link jump in mobile terminal data statistics, refactor the theme implement, the agent setting `-edit_agent` not work, update cvpr cvf url rules.

#### 💄 Styles

- **chat**: Auto send message from URL.
- **spelling**: Correct "broswer" to "browser" across codebase.
- **misc**: Support openrouter claude 3.7 sonnet reasoning, Support OpenRouter custom BaseURL.

<br/>

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

#### What's improved

* **misc**: Support no-fc models like deepseek r1 with online search, closes [lobehub#6842](https://github.com/jaworldwideorg/OneJA-Bot/issues/6842) ([f284c25](f284c25))

#### What's fixed

* **misc**: Fix anthropic max tokens, closes [lobehub#6859](https://github.com/jaworldwideorg/OneJA-Bot/issues/6859) ([35fbc6c](35fbc6c))
* **misc**: Fix context cache control and model builtin search switch, closes [lobehub#6831](https://github.com/jaworldwideorg/OneJA-Bot/issues/6831) ([5c6b8ea](5c6b8ea))
* **misc**: Fix crawl result for short content, closes [lobehub#6903](https://github.com/jaworldwideorg/OneJA-Bot/issues/6903) [lobehub#6904](https://github.com/jaworldwideorg/OneJA-Bot/issues/6904) ([d8fda65](d8fda65))
* **misc**: Fix theme flicking, closes [lobehub#6926](https://github.com/jaworldwideorg/OneJA-Bot/issues/6926) ([103c3e3](103c3e3))
* **misc**: Link jump in mobile terminal data statistics, closes [lobehub#6893](https://github.com/jaworldwideorg/OneJA-Bot/issues/6893) ([505d24d](505d24d))
* **misc**: Refactor the theme implement, closes [lobehub#6844](https://github.com/jaworldwideorg/OneJA-Bot/issues/6844) ([e5c2161](e5c2161))
* **misc**: The agent setting `-edit_agent` not work, closes [lobehub#4609](https://github.com/jaworldwideorg/OneJA-Bot/issues/4609) ([7af0ec6](7af0ec6))
* **misc**: Update cvpr cvf url rules, closes [lobehub#6860](https://github.com/jaworldwideorg/OneJA-Bot/issues/6860) ([c299067](c299067))

#### Styles

* **chat**: Auto send message from URL, closes [lobehub#6497](https://github.com/jaworldwideorg/OneJA-Bot/issues/6497) ([30b2639](30b2639))
* **spelling**: Correct "broswer" to "browser" across codebase, closes [lobehub#6876](https://github.com/jaworldwideorg/OneJA-Bot/issues/6876) ([8d677a2](8d677a2))
* **misc**: Support openrouter claude 3.7 sonnet reasoning, closes [lobehub#6806](https://github.com/jaworldwideorg/OneJA-Bot/issues/6806) ([f1ffc2c](f1ffc2c))
* **misc**: Support OpenRouter custom BaseURL ([a8089ed](a8089ed))

</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