## Is your feature request related to a problem? Please describe.
When users create vertical Agent intelligent agents through the Agent creation workflow, the system needs to generate an Agent avatar/icon image. Currently, the image generation process may depend on a single image generation model or an external generation capability.
This creates several potential issues:
- If the primary image generation model is unavailable, unstable, or fails to generate an image, Agent creation may be blocked or provide a poor user experience.
- Different vertical Agents may require different visual styles, but the current generation strategy may lack fallback capability.
- Generated Agent icons may introduce safety risks if the image generation model does not have sufficient content filtering or safety guarantees.
- A failure in image generation should not affect the core Agent creation workflow.
Therefore, a more reliable and secure image generation fallback mechanism is needed.
---
## Describe the solution you'd like
Add a fallback mechanism for Agent icon/image generation when creating vertical Agent intelligent agents.
The expected solution:
1. Use the primary image generation model for generating Agent icons by default.
2. If the primary model fails due to:
- service unavailable
- timeout
- generation failure
- safety filtering failure
- invalid output format
automatically switch to an alternative image generation model as a fallback.
3. The fallback image generation model should:
- provide stable image generation capability
- support Agent icon/avatar generation scenarios
- include safety filtering mechanisms
- avoid generating unsafe, inappropriate, or policy-violating images
4. The image generation workflow should:
- not block Agent creation when image generation fails
- record generation model, fallback reason, and generation status for observability
- support future extension to multiple image generation providers/models
Example flow:
---
## Describe alternatives you've considered
1. Use only one image generation model
Pros:
- Simple implementation
- Lower maintenance cost
Cons:
- No availability guarantee
- Higher risk of generation failure affecting Agent creation
- Limited safety and quality fallback capability
---
2. Use manually uploaded Agent icons
Pros:
- Full control over generated images
Cons:
- Poor user experience
- Requires additional user operation
- Cannot automatically generate personalized Agent visuals
---
3. Use predefined icon templates only
Pros:
- Safe and stable
- Easy to maintain
Cons:
- Limited personalization
- Cannot satisfy diverse vertical Agent scenarios
---
## Additional context
This feature is mainly used in the vertical Agent creation workflow.
The Agent icon is a user-facing visual asset and should prioritize:
- availability
- safety
- consistency
- generation quality
The fallback mechanism should be designed as a general image generation capability so that additional image models can be integrated in the future.
Related considerations:
- Need unified image generation API abstraction.
- Need model priority and fallback configuration.
- Need safety validation before returning generated images.
- Need monitoring metrics for generation success rate and fallback frequency.
Create Vertical Agent
|
v
Generate Agent Icon
|
v
Primary Image Model
|
+----+----+
| Success |
v |
Return Icon |
|
v
Fallback Image Model
|
v
Safety Check
|
v
Return Safe Icon