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

๐Ÿ’„ style: add Claude 3.7 Sonnet and Haiku 3.5 #6512

Merged
merged 8 commits into from
Feb 25, 2025

Conversation

liavar1
Copy link
Contributor

@liavar1 liavar1 commented Feb 25, 2025

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

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

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

Support Claude 3.7 Sonnet and Haiku 3.5 for Claude API and Bedrock

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

added descriptions

Copy link

vercel bot commented Feb 25, 2025

@liavar1 is attempting to deploy a commit to the LobeChat Desktop Team on Vercel.

A member of the Team first needs to authorize it.

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

๐Ÿ‘ @liavar1

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 ๐ŸŒ  Feature Request New feature or request | ็‰นๆ€งไธŽๅปบ่ฎฎ label Feb 25, 2025
@breakstring
Copy link

I think Claude 3.5/3.7 sonnet support reasoning, will you please also add related abilities in the config?

    abilities: {
      reasoning: true,
    },

@liavar1
Copy link
Contributor Author

liavar1 commented Feb 25, 2025

I think Claude 3.5/3.7 sonnet support reasoning, will you please also add related abilities in the config?

    abilities: {
      reasoning: true,
    },

Thanks! fixed.
Only Claude 3.7 supports reasoning

@breakstring
Copy link

Huh, that's strange. Just now, when I was using claude-3.5-sonnet-20241022 in LobeChat, there indeed appeared a THINK block. So I thought it was already supported.
image

However, I just took a look at Anthropic's documentation, and indeed, the only model listed that supports Extended Thinking is 3.7 sonnet. So, I may have a misunderstanding regarding the definition of this reasoning and its presentation in LobeChat.

@qidianlinjin1990
Copy link

3.7่ฟ˜ๆœ‰budget_tokensๅ’ŒExtended output capabilities (beta)่ฟ™ไธคไธชๅ‚ๆ•ฐ๏ผŒbudget_tokensๅฏไปฅๆŽงๅˆถๆ€่€ƒ็š„tokenๆ•ฐ๏ผŒExtended output capabilities (beta)ๅฏไปฅ่ฎฉ่พ“ๅ‡บ่พพๅˆฐ128k๏ผŒ่ฟ™ไธคไธชๅ‚ๆ•ฐlobechatไผš่ฏดๆ”ฏๆŒๅ—

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


3.7 There are also two parameters: budget_tokens and Extended output capabilities (beta). budget_tokens can control the number of tokens to be thought, and Extended output capabilities (beta) can make the output reach 128k. Will these two parameters be supported by lobechat.

Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests โœ…

Project coverage is 91.64%. Comparing base (69f8555) to head (02fd3f7).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6512      +/-   ##
==========================================
+ Coverage   91.62%   91.64%   +0.01%     
==========================================
  Files         699      699              
  Lines       65173    65302     +129     
  Branches     3163     3162       -1     
==========================================
+ Hits        59715    59844     +129     
  Misses       5458     5458              
Flag Coverage ฮ”
app 91.64% <100.00%> (+0.01%) โฌ†๏ธ
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.

@arvinxx arvinxx changed the title feat: Support Claude 3.7 Sonnet and Haiku 3.5 ๐Ÿ’„ style: add Claude 3.7 Sonnet and Haiku 3.5 Feb 25, 2025
Copy link

vercel bot commented Feb 25, 2025

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

Name Status Preview Comments Updated (UTC)
lobe-chat-preview โœ… Ready (Inspect) Visit Preview ๐Ÿ’ฌ Add feedback Feb 25, 2025 3:38pm

@liavar1
Copy link
Contributor Author

liavar1 commented Feb 25, 2025

Not sure how to add this to the code

@arvinxx
Copy link
Contributor

arvinxx commented Feb 25, 2025

@liavar1 I will make it in #6515

@arvinxx
Copy link
Contributor

arvinxx commented Feb 25, 2025

./src/config/aiModels/anthropic.ts
8:7 Error: Expected object keys to be in ascending order. 'reasoning' should be before 'vision'. sort-keys-fix/sort-keys-fix
./src/config/aiModels/bedrock.ts
29:7 Error: Expected object keys to be in ascending order. 'reasoning' should be before 'vision'. sort-keys-fix/sort-keys-fix
./src/config/modelProviders/anthropic.ts
31:18 Error: Invalid group length in numeric value. unicorn/numeric-separators-style
./src/config/modelProviders/bedrock.ts
54:18 Error: Invalid group length in numeric value. unicorn/numeric-separators-style

@liavar1 please fix the lint

@liavar1
Copy link
Contributor Author

liavar1 commented Feb 25, 2025

@arvinxx Not sure how to handle
Invalid group length in numeric value. unicorn/numeric-separators-style

@arvinxx arvinxx merged commit c8db2bb into lobehub:main Feb 25, 2025
13 of 15 checks passed
@lobehubbot
Copy link
Member

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

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 Feb 25, 2025
### [Version&nbsp;1.64.3](v1.64.2...v1.64.3)
<sup>Released on **2025-02-25**</sup>

#### ๐Ÿ’„ Styles

- **misc**: Add Claude 3.7 Sonnet and Haiku 3.5.

<br/>

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

#### Styles

* **misc**: Add Claude 3.7 Sonnet and Haiku 3.5, closes [#6512](#6512) ([c8db2bb](c8db2bb))

</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.64.3 ๐ŸŽ‰

The release is available on:

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

@liavar1 liavar1 deleted the add_claude3.7 branch February 25, 2025 16:05
likaiqiang pushed a commit to likaiqiang/lobe-chat that referenced this pull request Feb 26, 2025
* add claude3.7 and bedrock

* add descriptions

* add reasoning to claude 3.7

* add claude 3.7 to bedrock

* added abilities

* retrieve deleted claude 3.5 v1 to bedrock

* reorderd abilities and added max output

* fix lint

---------

Co-authored-by: arvinxx <[email protected]>
likaiqiang pushed a commit to likaiqiang/lobe-chat that referenced this pull request Feb 26, 2025
### [Version&nbsp;1.64.3](lobehub/lobe-chat@v1.64.2...v1.64.3)
<sup>Released on **2025-02-25**</sup>

#### ๐Ÿ’„ Styles

- **misc**: Add Claude 3.7 Sonnet and Haiku 3.5.

<br/>

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

#### Styles

* **misc**: Add Claude 3.7 Sonnet and Haiku 3.5, closes [lobehub#6512](lobehub#6512) ([c8db2bb](lobehub@c8db2bb))

</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 bentwnghk/lobe-chat that referenced this pull request Feb 26, 2025
## [Version&nbsp;1.106.0](v1.105.0...v1.106.0)
<sup>Released on **2025-02-26**</sup>

#### โœจ Features

- **misc**: Support claude sonnet 3.7  thinking.

#### ๐Ÿ’„ Styles

- **misc**: Add Claude 3.7 Sonnet and Haiku 3.5, Update Gemini 2.0 search settings.

<br/>

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

#### What's improved

* **misc**: Support claude sonnet 3.7  thinking, closes [lobehub#6515](https://github.com/bentwnghk/lobe-chat/issues/6515) ([bc9829f](bc9829f))

#### Styles

* **misc**: Add Claude 3.7 Sonnet and Haiku 3.5, closes [lobehub#6512](https://github.com/bentwnghk/lobe-chat/issues/6512) ([c8db2bb](c8db2bb))
* **misc**: Update Gemini 2.0 search settings, closes [lobehub#6516](https://github.com/bentwnghk/lobe-chat/issues/6516) ([250bbcb](250bbcb))

</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
๐ŸŒ  Feature Request New feature or request | ็‰นๆ€งไธŽๅปบ่ฎฎ 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.

5 participants