Skip to content

Conversation

samurai00
Copy link
Contributor

@samurai00 samurai00 commented Aug 15, 2025

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

  • add Imagen 4 GA models
    • imagen-4.0-generate-001
    • imagen-4.0-ultra-generate-001
    • imagen-4.0-fast-generate-001 (new)

📝 补充信息 | Additional Information

Summary by Sourcery

Add and configure Imagen 4 GA image models while deprecating preview versions

New Features:

  • Introduce Imagen 4 GA standard, ultra, and fast text-to-image models with IDs, pricing, and release dates

Enhancements:

  • Mark previous Imagen 4 preview endpoints as disabled

Copy link

vercel bot commented Aug 15, 2025

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

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 15, 2025
Copy link
Contributor

sourcery-ai bot commented Aug 15, 2025

Reviewer's Guide

This PR adds three GA-ready Imagen 4 image models (base, Ultra, Fast) with complete metadata and pricing, and disables the legacy preview variants.

Class diagram for updated AIImageModelCard structure

classDiagram
    class AIImageModelCard {
        +string id
        +string displayName
        +string description
        +string organization
        +boolean enabled
        +ModelParamsSchema parameters
        +Pricing pricing
        +string releasedAt
        +string type
    }
    class Pricing {
        +string name
        +float rate
        +string strategy
        +string unit
    }
    class ModelParamsSchema {
        ... // unchanged
    }
    AIImageModelCard --> ModelParamsSchema : parameters
    AIImageModelCard --> Pricing : pricing

    %% New GA models
    AIImageModelCard : imagen-4.0-generate-001
    AIImageModelCard : imagen-4.0-ultra-generate-001
    AIImageModelCard : imagen-4.0-fast-generate-001
    %% Disabled preview models
    AIImageModelCard : imagen-4.0-generate-preview-06-06 (disabled)
    AIImageModelCard : imagen-4.0-ultra-generate-preview-06-06 (disabled)
Loading

File-Level Changes

Change Details Files
Introduce GA-ready Imagen 4 image models
  • Add base model 'imagen-4.0-generate-001' with displayName, id, organization, parameters, pricing, releasedAt, and type
  • Add Ultra model 'imagen-4.0-ultra-generate-001' with displayName, id, organization, parameters, pricing, releasedAt, and type
  • Add Fast model 'imagen-4.0-fast-generate-001' with displayName, id, organization, parameters, pricing, releasedAt, and type
src/config/aiModels/google.ts
Disable previous preview-model variants
  • Set enabled=false on 'imagen-4.0-generate-preview-06-06'
  • Set enabled=false on 'imagen-4.0-ultra-generate-preview-06-06'
src/config/aiModels/google.ts

Possibly linked issues

  • #12345: PR adds Imagen 4 GA models like imagen-4.0-generate-001, directly supporting the issue's request for Imagen models.

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

@lobehubbot
Copy link
Member

👍 @samurai00

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 Aug 15, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 117b17f 🚫 Skipped No files need to be tested {"src/config/aiModels/google.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

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 there - I've reviewed your changes - here's some feedback:

  • Consider abstracting the repeated Imagen 4 model blocks into a factory or shared base config to reduce boilerplate and the chance of inconsistencies.
  • Verify the displayName formatting across GA and preview variants (e.g. "Imagen 4 Ultra" vs "Imagen4 Ultra") to ensure naming consistency.
  • You may want to reorder the array so enabled GA models are grouped before the disabled preview entries for improved readability.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider abstracting the repeated Imagen 4 model blocks into a factory or shared base config to reduce boilerplate and the chance of inconsistencies.
- Verify the displayName formatting across GA and preview variants (e.g. "Imagen 4 Ultra" vs "Imagen4 Ultra") to ensure naming consistency.
- You may want to reorder the array so enabled GA models are grouped before the disabled preview entries for improved readability.

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 Aug 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.26%. Comparing base (a1c66c8) to head (e6772b2).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #8799       +/-   ##
===========================================
+ Coverage   85.58%   96.26%   +10.68%     
===========================================
  Files         935       17      -918     
  Lines       72792     2917    -69875     
  Branches     6577      515     -6062     
===========================================
- Hits        62296     2808    -59488     
+ Misses      10496      109    -10387     
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.

Copy link

vercel bot commented Aug 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
lobe-chat-preview Ready Ready Preview Comment Aug 16, 2025 4:20am

@arvinxx arvinxx merged commit 2e9ad20 into lobehub:main Aug 16, 2025
17 of 20 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @samurai00 ❤️

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 Aug 16, 2025
### [Version&nbsp;1.112.1](v1.112.0...v1.112.1)
<sup>Released on **2025-08-16**</sup>

#### 💄 Styles

- **misc**: Add Imagen 4 GA models, style improve auth sign in box loading.

<br/>

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

#### Styles

* **misc**: Add Imagen 4 GA models, closes [#8799](#8799) ([2e9ad20](2e9ad20))
* **misc**: Style improve auth sign in box loading, closes [#8805](#8805) ([62f5a1b](62f5a1b))

</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.112.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 Aug 18, 2025
## [Version&nbsp;1.113.0](v1.112.0...v1.113.0)
<sup>Released on **2025-08-18**</sup>

#### ♻ Code Refactoring

- **misc**: Refactor const folder to a new package, refactor prompts folder to the `@lobechat/prompts` pacakge, 重构ArgsInput组件.

#### ✨ Features

- **provider**: Add BFL provider support for image generation.

#### 🐛 Bug Fixes

- **db**: Desktop local db can't vectorization.
- **misc**: Improve mcp tracing with user config.

#### 💄 Styles

- **misc**: Add Imagen 4 GA models, style improve auth sign in box loading.

<br/>

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

#### Code refactoring

* **misc**: Refactor const folder to a new package, closes [lobehub#8756](https://github.com/jaworldwideorg/OneJA-Bot/issues/8756) ([30a4734](30a4734))
* **misc**: Refactor prompts folder to the `@lobechat/prompts` pacakge, closes [lobehub#8810](https://github.com/jaworldwideorg/OneJA-Bot/issues/8810) ([d82e7bb](d82e7bb))
* **misc**: 重构 ArgsInput 组件, closes [lobehub#8765](https://github.com/jaworldwideorg/OneJA-Bot/issues/8765) ([0905559](0905559))

#### What's improved

* **provider**: Add BFL provider support for image generation, closes [lobehub#8806](https://github.com/jaworldwideorg/OneJA-Bot/issues/8806) ([519e03e](519e03e))

#### What's fixed

* **db**: Desktop local db can't vectorization, closes [lobehub#8830](https://github.com/jaworldwideorg/OneJA-Bot/issues/8830) ([a00fd9d](a00fd9d))
* **misc**: Improve mcp tracing with user config, closes [lobehub#8827](https://github.com/jaworldwideorg/OneJA-Bot/issues/8827) ([5cab2ee](5cab2ee))

#### Styles

* **misc**: Add Imagen 4 GA models, closes [lobehub#8799](https://github.com/jaworldwideorg/OneJA-Bot/issues/8799) ([2e9ad20](2e9ad20))
* **misc**: Style improve auth sign in box loading, closes [lobehub#8805](https://github.com/jaworldwideorg/OneJA-Bot/issues/8805) ([62f5a1b](62f5a1b))

</details>

<div align="right">

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

</div>
@samurai00 samurai00 deleted the imagen-4-ga branch August 19, 2025 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants