Skip to content

Conversation

hezhijie0327
Copy link
Contributor

@hezhijie0327 hezhijie0327 commented Jul 25, 2025

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

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

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

  1. ่กฅ้ฝ้˜ฟ้‡Œ็™พ็‚ผ T2I ๆจกๅž‹๏ผŒๅขžๅŠ  20250728 ๅ‘ๅธƒ็š„ Wan2.2 T2I ๆจกๅž‹
  2. ไผ˜ๅŒ– Endpoint ้€‰ๆ‹ฉ้€ป่พ‘๏ผŒๆŒ‰ๆจกๅž‹ๅŒน้…ๅŽๆ‹ผๆŽฅ text2image
  3. ๅ›พๆ ‡ๆ›ดๆ–ฐ ๐Ÿ’„ style: support some T2I model iconsย lobe-icons#147

Note:

  1. StableDiffusion ้œ€่ฆๆไบค็”ณ่ฏท๏ผŒๆš‚ๆ— ๆณ•ๆต‹่ฏ•๏ผŒ็†่ฎบๅฏ่กŒ

Model Screenshot
wan2.2-t2i-flash image
wan2.2-t2i-plus image
wanx2.1-t2i-plus image
wanx2.1-t2i-turbo image
wanx2.0-t2i-turbo image
wanx-v1 image
flux-schnell imageimage
flux-dev image
flux-merged image

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

Summary by Sourcery

Add a comprehensive set of new Qwen text-to-image model configurations and improve the image task creation logic by dynamically determining the endpoint path based on model type

New Features:

  • Add support for additional Qwen text-to-image models including Wanxiang2.1, Wanxiang2.0, Wanxiang v1, FLUX variants, and StableDiffusion 3.5, xl, and v1.5

Enhancements:

  • Refactor createImageTask to dynamically construct the API endpoint based on model type using a getModelType helper instead of a static map

Copy link

vercel bot commented Jul 25, 2025

@hezhijie0327 is attempting to deploy a commit to the LobeHub Community Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

sourcery-ai bot commented Jul 25, 2025

Reviewer's Guide

This PR enriches the Qwen image model registry by adding missing Text2Image variants for Ali Bailing and several open-source models, refines display names and descriptions, and refactors the API endpoint resolution for image generation to a dynamic approach based on model prefixes.

Class diagram for dynamic Qwen image endpoint resolution

classDiagram
    class QwenText2ImageModels {
        +string[] (model prefixes)
    }
    class createImageTask {
        +async createImageTask(payload, apiKey): Promise<string>
    }
    class getModelType {
        +getModelType(model: string): string
    }
    QwenText2ImageModels <.. getModelType : uses
    getModelType <.. createImageTask : calls
Loading

File-Level Changes

Change Details Files
Enrich Qwen image model configurations
  • Expanded model list with new Wanxiang2.1 Plus, Wanxiang2.0 Turbo, and Wanxiang v1 entries
  • Added FLUX.1 variants: Schnell, Dev, and Merged
  • Added StableDiffusion variants: 3.5 Large, 3.5 Large Turbo, XL, and v1.5
  • Updated displayName and description for existing Wanxiang2.1 T2I Turbo
src/config/aiModels/qwen.ts
Refactor Qwen endpoint selection logic
  • Replaced hardcoded modelEndpointMap with dynamic endpoint construction
  • Introduced QwenText2ImageModels list and getModelType function for prefix-based routing
  • Built endpoint URL using model type and standardized path
  • Added error handling for unsupported model types
src/libs/model-runtime/qwen/createImage.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

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

๐Ÿ‘ @hezhijie0327

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.
้žๅธธๆ„Ÿ่ฐขๆ‚จๆๅ‡บๆ‹‰ๅ–่ฏทๆฑ‚ๅนถไธบๆˆ‘ไปฌ็š„็คพๅŒบๅšๅ‡บ่ดก็Œฎ๏ผŒ่ฏท็กฎไฟๆ‚จๅทฒ็ป้ตๅพชไบ†ๆˆ‘ไปฌ็š„่ดก็ŒฎๆŒ‡ๅ—๏ผŒๆˆ‘ไปฌไผšๅฐฝๅฟซๅฎกๆŸฅๅฎƒใ€‚
ๅฆ‚ๆžœๆ‚จ้‡ๅˆฐไปปไฝ•้—ฎ้ข˜๏ผŒ่ฏท้šๆ—ถไธŽๆˆ‘ไปฌ่”็ณปใ€‚

Copy link
Contributor

gru-agent bot commented Jul 25, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail e93b83e ๐Ÿšซ Skipped No files need to be tested {"src/config/aiModels/qwen.ts":"File path does not match include patterns.","src/libs/model-runtime/qwen/createImage.ts":"File path does not match include patterns."}

History Assignment

Tip

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

@dosubot dosubot bot added the ๐Ÿ’„ Design Design an style | ๆ ทๅผ้—ฎ้ข˜ label Jul 25, 2025
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a 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 and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them โœจ
Help me be more useful! Please click ๐Ÿ‘ or ๐Ÿ‘Ž on each comment and I'll use the feedback to improve your reviews.

Copy link

codecov bot commented Jul 25, 2025

Codecov Report

โœ… All modified and coverable lines are covered by tests.
โœ… Project coverage is 96.26%. Comparing base (fdaa725) to head (370067f).
โš ๏ธ Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #8574       +/-   ##
===========================================
+ Coverage   85.58%   96.26%   +10.67%     
===========================================
  Files         910       17      -893     
  Lines       69093     2917    -66176     
  Branches     4530      283     -4247     
===========================================
- Hits        59134     2808    -56326     
+ Misses       9959      109     -9850     
Flag Coverage ฮ”
app ?
server 96.26% <รธ> (รธ)

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.

@tjx666
Copy link
Collaborator

tjx666 commented Jul 28, 2025

@hezhijie0327 ๆจกๅž‹็š„้กบๅบไธŠ๏ผŒๅŒ็ณปๅˆ—๏ผŒๅฏ่ƒฝๆŠŠไพฟๅฎœ็š„ๆ”พๅ‰้ขๅฅฝไธ€ไบ›๏ผŒๆ‰€ไปฅ wanxiang turbo ๆ”พ plus ๅ‰้ขๅฅฝ็‚น

@lobehubbot
Copy link
Member

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


@hezhijie0327 In the order of the model, in the same series, it may be better to put the cheaper ones in front, so wanxiang turbo put the plus ones in front

@hezhijie0327
Copy link
Contributor Author

ๅฅฝไบ† ๅ…ถไป–็š„ๅฎ˜็ฝ‘ๆš‚ๆ—ถ้ƒฝๆ˜ฏๅ…่ดน็š„ ๅฐฑๆŒ‰็…งๆจกๅž‹็‰ˆๆœฌๅŠๆ–‡ๆกฃ้กบๅบๆŽ’ๅบไบ†

@lobehubbot
Copy link
Member

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


OK, other official websites are free for the time being, so they are sorted in the order of model version and document

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 28, 2025
Copy link

vercel bot commented Jul 28, 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 ๐Ÿ’ฌ Add feedback Jul 29, 2025 3:33am

@dosubot dosubot bot removed the lgtm This PR has been approved by a maintainer label Jul 28, 2025
@tjx666 tjx666 merged commit b8c0e2d into lobehub:main Jul 29, 2025
17 of 18 checks passed
@lobehubbot
Copy link
Member

โค๏ธ 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.
้กน็›ฎ็š„ๆˆ้•ฟ็ฆปไธๅผ€็”จๆˆทๅ้ฆˆๅ’Œ่ดก็Œฎ๏ผŒๆ„Ÿ่ฐขๆ‚จ็š„่ดก็Œฎ! ๅฆ‚ๆžœๆ‚จๅฏน LobeHub ๅผ€ๅ‘่€…็คพๅŒบๆ„Ÿๅ…ด่ถฃ๏ผŒ่ฏทๅŠ ๅ…ฅๆˆ‘ไปฌ็š„ discord๏ผŒ็„ถๅŽ็งไฟก @arvinxx ๆˆ– @canisminor1990ใ€‚ไป–ไปฌไผš้‚€่ฏทๆ‚จๅŠ ๅ…ฅๆˆ‘ไปฌ็š„็งๅฏ†ๅผ€ๅ‘่€…้ข‘้“ใ€‚ๆˆ‘ไปฌๅฐ†ไผš่ฎจ่ฎบๅ…ณไบŽ Lobe Chat ็š„ๅผ€ๅ‘๏ผŒๅˆ†ไบซๅ’Œ่ฎจ่ฎบๅ…จ็ƒ่Œƒๅ›ดๅ†…็š„ AI ๆถˆๆฏใ€‚

github-actions bot pushed a commit that referenced this pull request Jul 29, 2025
### [Version&nbsp;1.105.1](v1.105.0...v1.105.1)
<sup>Released on **2025-07-29**</sup>

#### ๐Ÿ’„ Styles

- **misc**: Support more Text2Image from Qwen.

<br/>

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

#### Styles

* **misc**: Support more Text2Image from Qwen, closes [#8574](#8574) ([b8c0e2d](b8c0e2d))

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

The release is available on:

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

github-actions bot pushed a commit to jaworldwideorg/OneJA-Bot that referenced this pull request Jul 29, 2025
### [Version&nbsp;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">

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

</div>
@hezhijie0327 hezhijie0327 deleted the qwen_t2i branch July 29, 2025 09:20
bbbugg pushed a commit to bbbugg/lobe-chat that referenced this pull request Aug 14, 2025
bbbugg pushed a commit to bbbugg/lobe-chat that referenced this pull request Aug 14, 2025
### [Version&nbsp;1.105.1](lobehub/lobe-chat@v1.105.0...v1.105.1)
<sup>Released on **2025-07-29**</sup>

#### ๐Ÿ’„ Styles

- **misc**: Support more Text2Image from Qwen.

<br/>

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

#### Styles

* **misc**: Support more Text2Image from Qwen, closes [lobehub#8574](lobehub#8574) ([5b0fbc9](lobehub@5b0fbc9))

</details>

<div align="right">

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

</div>
cy948 pushed a commit to cy948/lobe-chat that referenced this pull request Aug 23, 2025
cy948 pushed a commit to cy948/lobe-chat that referenced this pull request Aug 23, 2025
### [Version&nbsp;1.105.1](lobehub/lobe-chat@v1.105.0...v1.105.1)
<sup>Released on **2025-07-29**</sup>

#### ๐Ÿ’„ Styles

- **misc**: Support more Text2Image from Qwen.

<br/>

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

#### Styles

* **misc**: Support more Text2Image from Qwen, closes [lobehub#8574](lobehub#8574) ([b8c0e2d](lobehub@b8c0e2d))

</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
๐Ÿ’„ Design Design an style | ๆ ทๅผ้—ฎ้ข˜ 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.

3 participants