-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
✨ feat: support openrouter custom models env #1647
✨ feat: support openrouter custom models env #1647
Conversation
@danielglh is attempting to deploy a commit to the LobeHub Team on Vercel. A member of the Team first needs to authorize it. |
Thank you for raising your pull request and contributing to our Community |
619cd5b
to
8979665
Compare
The implement is LGTM. Could you please add a test for the modelSelectList selector to cover openrouter env logic? |
bc6d4ee
to
82188ae
Compare
@arvinxx I checked the test cases and I found that the core logic has already been covered by existing test cases. Openrouter reuses the |
@danielglh I mean if there is an |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1647 +/- ##
==========================================
- Coverage 92.57% 90.14% -2.44%
==========================================
Files 239 245 +6
Lines 13066 13878 +812
Branches 1562 1583 +21
==========================================
+ Hits 12096 12510 +414
- Misses 970 1368 +398 ☔ View full report in Codecov by Sentry. |
82188ae
to
19c2c4b
Compare
@arvinxx test case added |
19c2c4b
to
ed320c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I'll merge it. Thanks for your contribution!
❤️ Great PR @danielglh ❤️ 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. |
### [Version 0.142.2](v0.142.1...v0.142.2) <sup>Released on **2024-03-25**</sup> #### 🐛 Bug Fixes - **misc**: Support openrouter custom models env. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Support openrouter custom models env, closes [#1647](#1647) ([78baa16](78baa16)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
🎉 This PR is included in version 0.142.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
### [Version 1.22.2](v1.22.1...v1.22.2) <sup>Released on **2024-03-25**</sup> #### 🐛 Bug Fixes - **misc**: Support openrouter custom models env. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Support openrouter custom models env, closes [lobehub#1647](https://github.com/bentwnghk/lobe-chat/issues/1647) ([78baa16](78baa16)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
* ✨ feat: add openrouter custom models env * ✅ add OPENROUTER_CUSTOM_MODELS env var test case
### [Version 0.142.2](lobehub/lobe-chat@v0.142.1...v0.142.2) <sup>Released on **2024-03-25**</sup> #### 🐛 Bug Fixes - **misc**: Support openrouter custom models env. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Support openrouter custom models env, closes [lobehub#1647](lobehub#1647) ([78baa16](lobehub@78baa16)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
### [Version 0.142.2](lobehub/lobe-chat@v0.142.1...v0.142.2) <sup>Released on **2024-03-25**</sup> #### 🐛 Bug Fixes - **misc**: Support openrouter custom models env. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Support openrouter custom models env, closes [#1647](lobehub/lobe-chat#1647) ([78baa16](lobehub/lobe-chat@78baa16)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
Allow
OPENROUTER_CUSTOM_MODELS
env var to define custom models for OpenRouter provider, together with its provider setting. It works similarly to theCUSTOM_MODELS
env var for OpenAI:Fixed issue #1624.
📝 补充信息 | Additional Information
N/A