-
-
Notifications
You must be signed in to change notification settings - Fork 13.5k
๐ style: add more OpenAI SDK Text2Image providers #8573
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
Conversation
@hezhijie0327 is attempting to deploy a commit to the LobeHub OSS Team on Vercel. A member of the Team first needs to authorize it. |
Reviewer's GuideThis PR extends the AI model configuration by introducing AIImageModelCard support across six provider modules, defining and exporting new text-to-image models, and enhancing their parameters with size, seed, steps, and release metadata. ER diagram for AI model provider modules after image model additionerDiagram
GITEEAI_CHAT_MODELS ||--o{ GITEEAI_IMAGE_MODELS : includes
STEPFUN_CHAT_MODELS ||--o{ STEPFUN_IMAGE_MODELS : includes
WENXIN_CHAT_MODELS ||--o{ WENXIN_IMAGE_MODELS : includes
VOLCENGINE_CHAT_MODELS ||--o{ VOLCENGINE_IMAGE_MODELS : includes
SILICONCLOUD_CHAT_MODELS ||--o{ SILICONCLOUD_IMAGE_MODELS : includes
XAI_CHAT_MODELS ||--o{ XAI_IMAGE_MODELS : includes
GITEEAI_IMAGE_MODELS {
string id
string displayName
string description
object parameters
string type
string releasedAt
}
STEPFUN_IMAGE_MODELS {
string id
string displayName
string description
object parameters
string type
string releasedAt
}
WENXIN_IMAGE_MODELS {
string id
string displayName
string description
object parameters
string type
string releasedAt
}
VOLCENGINE_IMAGE_MODELS {
string id
string displayName
string description
object parameters
string type
string releasedAt
}
SILICONCLOUD_IMAGE_MODELS {
string id
string displayName
string description
object parameters
string type
string releasedAt
}
XAI_IMAGE_MODELS {
string id
string displayName
string description
object parameters
string type
string releasedAt
}
Class diagram for updated AI model configuration typesclassDiagram
class AIChatModelCard {
+string description
+string displayName
+boolean enabled
+string id
+object parameters
+string type
+string releasedAt
}
class AIImageModelCard {
+string description
+string displayName
+boolean enabled
+string id
+object parameters
+string type
+string releasedAt
}
AIChatModelCard <|-- AIImageModelCard : extends/implements (structure)
Class diagram for provider model exports after image model integrationclassDiagram
class GiteeAI {
+AIChatModelCard[] giteeaiChatModels
+AIImageModelCard[] giteeaiImageModels
+allModels: (giteeaiChatModels + giteeaiImageModels)
}
class StepFun {
+AIChatModelCard[] stepfunChatModels
+AIImageModelCard[] stepfunImageModels
+allModels: (stepfunChatModels + stepfunImageModels)
}
class Wenxin {
+AIChatModelCard[] wenxinChatModels
+AIImageModelCard[] wenxinImageModels
+allModels: (wenxinChatModels + wenxinImageModels)
}
class Volcengine {
+AIChatModelCard[] doubaoChatModels
+AIImageModelCard[] volcengineImageModels
+allModels: (doubaoChatModels + volcengineImageModels)
}
class SiliconCloud {
+AIChatModelCard[] siliconcloudChatModels
+AIImageModelCard[] siliconcloudImageModels
+allModels: (siliconcloudChatModels + siliconcloudImageModels)
}
class XAI {
+AIChatModelCard[] xaiChatModels
+AIImageModelCard[] xaiImageModels
+allModels: (xaiChatModels + xaiImageModels)
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
๐ @hezhijie0327 Thank you for raising your pull request and contributing to our Community |
Codecov Reportโ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8573 +/- ##
==========================================
+ Coverage 85.57% 85.66% +0.09%
==========================================
Files 909 909
Lines 69019 69465 +446
Branches 6395 6628 +233
==========================================
+ Hits 59060 59506 +446
Misses 9959 9959
Flags with carried forward coverage won't be shown. Click here to find out more. โ View full report in Codecov by Sentry. ๐ New features to boost your workflow:
|
TestGru AssignmentSummary
Tip You can |
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.
Hey @hezhijie0327 - I've reviewed your changes - here's some feedback:
- Thereโs a lot of boilerplate in each provider for merging chat and image model arraysโconsider extracting that merge into a shared utility or base config to reduce repetition and enforce consistency.
- Many image models define prompt, size, seed, and steps parameters inlineโextract common parameter definitions into reusable fragments or helper functions to ensure consistency across providers and simplify future updates.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Thereโs a lot of boilerplate in each provider for merging chat and image model arraysโconsider extracting that merge into a shared utility or base config to reduce repetition and enforce consistency.
- Many image models define prompt, size, seed, and steps parameters inlineโextract common parameter definitions into reusable fragments or helper functions to ensure consistency across providers and simplify future updates.
Help me be more useful! Please click ๐ or ๐ on each comment and I'll use the feedback to improve your reviews.
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.
Hey @hezhijie0327 - I've reviewed your changes - here's some feedback:
- Ensure each new image model ID is unique and matches its displayName (e.g. the HiDream-E1-Full entry currently reuses the HiDream-I1-Full ID).
- Consider extracting common parameter schemas (prompt, size, seed, steps) into a shared helper or base config to reduce duplication across providers.
- Standardize the presence of the releasedAt field for all image models or explicitly document when itโs omitted to keep metadata consistent.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Ensure each new image model ID is unique and matches its displayName (e.g. the HiDream-E1-Full entry currently reuses the HiDream-I1-Full ID).
- Consider extracting common parameter schemas (prompt, size, seed, steps) into a shared helper or base config to reduce duplication across providers.
- Standardize the presence of the releasedAt field for all image models or explicitly document when itโs omitted to keep metadata consistent.
## Individual Comments
### Comment 1
<location> `src/config/aiModels/giteeai.ts:385` </location>
<code_context>
+ {
+ description:
+ 'HiDream-E1-Full ๆฏ็ฑๆบ่ฑกๆชๆฅ๏ผHiDream.ai๏ผๆจๅบ็ไธๆฌพ ๅผๆบๅคๆจกๆๅพๅ็ผ่พๅคงๆจกๅ๏ผๅบไบๅ
่ฟ็ Diffusion Transformer ๆถๆ๏ผๅนถ็ปๅๅผบๅคง็่ฏญ่จ็่งฃ่ฝๅ๏ผๅ
ๅต LLaMA 3.1-8B-Instruct๏ผ๏ผๆฏๆ้่ฟ่ช็ถ่ฏญ่จๆไปค่ฟ่กๅพๅ็ๆใ้ฃๆ ผ่ฟ็งปใๅฑ้จ็ผ่พๅๅ
ๅฎน้็ป๏ผๅ
ทๅคๅบ่ฒ็ๅพๆ็่งฃไธๆง่ก่ฝๅใ',
+ displayName: 'HiDream-E1-Full',
+ enabled: true,
+ id: 'HiDream-I1-Full',
+ parameters: {
+ imageUrl: { default: null },
</code_context>
<issue_to_address>
The id for 'HiDream-E1-Full' is set to 'HiDream-I1-Full', which may be a copy-paste error.
Please confirm whether the id should be 'HiDream-E1-Full' to match the displayName, or if the current value is intentional.
</issue_to_address>
### Comment 2
<location> `src/config/aiModels/wenxin.ts:571` </location>
<code_context>
+ {
+ description:
+ '็พๅบฆ่ช็ ็iRAG๏ผimage based RAG๏ผ๏ผๆฃ็ดขๅขๅผบ็ๆ็ๅพๆๆฏ๏ผๅฐ็พๅบฆๆ็ดข็ไบฟ็บงๅพ็่ตๆบ่ทๅผบๅคง็ๅบ็กๆจกๅ่ฝๅ็ธ็ปๅ๏ผๅฐฑๅฏไปฅ็ๆๅ็ง่ถ
็ๅฎ็ๅพ็๏ผๆดไฝๆๆ่ฟ่ฟ่ถ
่ฟๆ็ๅพๅ็็ณป็ป๏ผๅปๆไบAIๅณๅฟ๏ผ่ไธๆๆฌๅพไฝใiRAGๅ
ทๅคๆ ๅนป่งใ่ถ
็ๅฎใ็ซ็ญๅฏๅ็ญ็น็นใ',
+ displayName: 'ERINE iRAG',
+ enabled: true,
+ id: 'irag-1.0',
+ parameters: {
+ prompt: {
</code_context>
<issue_to_address>
Potential typo in displayName: 'ERINE iRAG' vs. 'ERNIE iRAG'.
Please verify if 'ERINE iRAG' should be 'ERNIE iRAG' to match the description and Baidu's branding.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
displayName: 'ERINE iRAG',
=======
displayName: 'ERNIE iRAG',
>>>>>>> REPLACE
</suggested_fix>
### Comment 3
<location> `src/config/aiModels/siliconcloud.ts:839` </location>
<code_context>
+ 'Kolors ๆฏ็ฑๅฟซๆ Kolors ๅข้ๅผๅ็ๅบไบๆฝๅจๆฉๆฃ็ๅคง่งๆจกๆๆฌๅฐๅพๅ็ๆๆจกๅใ่ฏฅๆจกๅ้่ฟๆฐๅไบฟๆๆฌ-ๅพๅๅฏน็่ฎญ็ป๏ผๅจ่ง่ง่ดจ้ใๅคๆ่ฏญไนๅ็กฎๆงไปฅๅไธญ่ฑๆๅญ็ฌฆๆธฒๆๆน้ขๅฑ็ฐๅบๆพ่ไผๅฟใๅฎไธไป
ๆฏๆไธญ่ฑๆ่พๅ
ฅ๏ผๅจ็่งฃๅ็ๆไธญๆ็นๅฎๅ
ๅฎนๆน้ขไน่กจ็ฐๅบ่ฒ',
+ displayName: 'Kolors',
+ enabled: true,
+ id: 'Kwai-Kolors/Kolors',
+ parameters: {
+ prompt: {
</code_context>
<issue_to_address>
The id 'Kwai-Kolors/Kolors' contains a slash, which may cause issues in downstream systems.
Consider replacing the slash with a hyphen or another separator to avoid potential issues in URLs, file paths, or object keys.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
id: 'Kwai-Kolors/Kolors',
=======
id: 'Kwai-Kolors-Kolors',
>>>>>>> REPLACE
</suggested_fix>
Help me be more useful! Please click ๐ or ๐ on each comment and I'll use the feedback to improve your reviews.
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
|
โค๏ธ Great PR @hezhijie0327 โค๏ธ 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. |
@hezhijie0327 icon ๅ ไบ๏ผไธ่ฟไฝ ่ฆๅ pr ไธๆญฃๅๅน้ |
@hezhijie0327 icon added, but you need to add regular matches to pr |
### [Version 1.105.2](v1.105.1...v1.105.2) <sup>Released on **2025-07-29**</sup> #### โป Code Refactoring - **misc**: Clean mcp sitemap, refactor jose-JWT to xor obfuscation. #### ๐ Styles - **misc**: Add more OpenAI SDK Text2Image providers, update i18n. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring * **misc**: Clean mcp sitemap, closes [#8596](#8596) ([b9e3e66](b9e3e66)) * **misc**: Refactor jose-JWT to xor obfuscation, closes [#8595](#8595) ([be98d56](be98d56)) #### Styles * **misc**: Add more OpenAI SDK Text2Image providers, closes [#8573](#8573) ([403aebd](403aebd)) * **misc**: Update i18n, closes [#8593](#8593) ([356cf0c](356cf0c)) </details> <div align="right"> [](#readme-top) </div>
๐ This PR is included in version 1.105.2 ๐ The release is available on: Your semantic-release bot ๐ฆ๐ |
### [Version 1.104.1](v1.104.0...v1.104.1) <sup>Released on **2025-07-29**</sup> #### โป Code Refactoring - **misc**: Clean mcp sitemap, refactor jose-JWT to xor obfuscation. #### ๐ Styles - **misc**: Add more OpenAI SDK Text2Image providers, support more Text2Image from Qwen, update i18n. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring * **misc**: Clean mcp sitemap, closes [lobehub#8596](https://github.com/jaworldwideorg/OneJA-Bot/issues/8596) ([b9e3e66](b9e3e66)) * **misc**: Refactor jose-JWT to xor obfuscation, closes [lobehub#8595](https://github.com/jaworldwideorg/OneJA-Bot/issues/8595) ([be98d56](be98d56)) #### Styles * **misc**: Add more OpenAI SDK Text2Image providers, closes [lobehub#8573](https://github.com/jaworldwideorg/OneJA-Bot/issues/8573) ([403aebd](403aebd)) * **misc**: Support more Text2Image from Qwen, closes [lobehub#8574](https://github.com/jaworldwideorg/OneJA-Bot/issues/8574) ([b8c0e2d](b8c0e2d)) * **misc**: Update i18n, closes [lobehub#8593](https://github.com/jaworldwideorg/OneJA-Bot/issues/8593) ([356cf0c](356cf0c)) </details> <div align="right"> [](#readme-top) </div>
### [Version 1.105.2](lobehub/lobe-chat@v1.105.1...v1.105.2) <sup>Released on **2025-07-29**</sup> #### โป Code Refactoring - **misc**: Clean mcp sitemap, refactor jose-JWT to xor obfuscation. #### ๐ Styles - **misc**: Add more OpenAI SDK Text2Image providers, update i18n. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring * **misc**: Clean mcp sitemap, closes [lobehub#8596](lobehub#8596) ([9715349](lobehub@9715349)) * **misc**: Refactor jose-JWT to xor obfuscation, closes [lobehub#8595](lobehub#8595) ([06b7164](lobehub@06b7164)) #### Styles * **misc**: Add more OpenAI SDK Text2Image providers, closes [lobehub#8573](lobehub#8573) ([221488e](lobehub@221488e)) * **misc**: Update i18n, closes [lobehub#8593](lobehub#8593) ([89d4059](lobehub@89d4059)) </details> <div align="right"> [](#readme-top) </div>
### [Version 1.105.2](lobehub/lobe-chat@v1.105.1...v1.105.2) <sup>Released on **2025-07-29**</sup> #### โป Code Refactoring - **misc**: Clean mcp sitemap, refactor jose-JWT to xor obfuscation. #### ๐ Styles - **misc**: Add more OpenAI SDK Text2Image providers, update i18n. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring * **misc**: Clean mcp sitemap, closes [lobehub#8596](lobehub#8596) ([b9e3e66](lobehub@b9e3e66)) * **misc**: Refactor jose-JWT to xor obfuscation, closes [lobehub#8595](lobehub#8595) ([be98d56](lobehub@be98d56)) #### Styles * **misc**: Add more OpenAI SDK Text2Image providers, closes [lobehub#8573](lobehub#8573) ([403aebd](lobehub@403aebd)) * **misc**: Update i18n, closes [lobehub#8593](lobehub#8593) ([356cf0c](lobehub@356cf0c)) </details> <div align="right"> [](#readme-top) </div>
๐ป ๅๆด็ฑปๅ | Change Type
๐ ๅๆด่ฏดๆ | Description of Change
xai
siliconcloud
stepfun
wenxin
gitee
volcengine
ๆ็ๅพๆจกๅseed
ๅstep
ๅๆฐ[TODO]Note:
grok-2-image-1212
irag-1.0
flux.1-schnell
step-2x-large
step-1x-medium
Doubao-Seedream-3.0-t2i
Kwai-Kolors/Kolors
FLUX.1-dev
๐ ่กฅๅ ไฟกๆฏ | Additional Information
Summary by Sourcery
Add support for new image generation models across multiple AI providers by extending the configuration with AIImageModelCard definitions and updating exports.
New Features:
Enhancements:
Summary by Sourcery
Add and configure new text-to-image models across multiple AI providers by extending configuration files with AIImageModelCard entries, updating parameters, and merging image and chat model exports.
New Features:
Enhancements:
Summary by Sourcery
Register multiple AIImageModelCard entries to extend text-to-image capabilities across various providers and enhance export consolidation.
New Features:
Enhancements: