diff --git a/backend/internal/http/handler/user_generation.go b/backend/internal/http/handler/user_generation.go index 5be054d..8bf12ec 100644 --- a/backend/internal/http/handler/user_generation.go +++ b/backend/internal/http/handler/user_generation.go @@ -458,7 +458,7 @@ func (h *UserGenerationHandler) catalogEntries(c *gin.Context) ([]gin.H, error) "type": "video", "ratios": []string{"2:3", "3:2", "1:1", "9:16", "16:9"}, "resolutions": []string{"720p"}, - "durations": []string{"6s", "10s", "15s"}, + "durations": []string{"6s", "10s"}, "max_reference_images": 6, "reference_mode": "asset", "description": "Grok Imagine video (文/图生视频)", diff --git a/backend/internal/provider/grok/video.go b/backend/internal/provider/grok/video.go index 2dcbb0f..6fbc4ae 100644 --- a/backend/internal/provider/grok/video.go +++ b/backend/internal/provider/grok/video.go @@ -140,7 +140,14 @@ func (c *Client) GenerateVideo(ctx context.Context, token, prompt, aspectRatio, if artifact != "" { break } - // No artifact: grok closed the stream early. Retry. + // A fatal stream error means grok definitively rejected this generation + // (content moderation, an unsupported parameter, etc.). Retrying — on this + // or any other account — fails identically and only burns the pool, so fail + // fast with a non-temporary error the pool won't fail over on. + if strings.Contains(body, "STREAM_ERROR_SEVERITY_FATAL") { + return nil, nil, fmt.Errorf("grok: video generation rejected by upstream (fatal stream error): %s", clip([]byte(body), 200)) + } + // No artifact and no fatal error: grok closed the stream early. Retry. lastErr = nil } if artifact == "" {