{"record":{"id":"3d2e177498cc6da8","repo":"invoke-ai/InvokeAI","slug":"seedream-returned-no-images-provider-reported-m","errorCode":null,"errorMessage":"Seedream returned no images. Provider reported: {message or item_errors}","messagePattern":"Seedream returned no images\\. Provider reported: (.+?)","errorType":"exception","errorClass":"ExternalProviderRequestError","httpStatus":null,"severity":"error","filePath":"invokeai/app/services/external_generation/providers/seedream.py","lineNumber":143,"sourceCode":"            # Items may be error objects for failed images in batch — collect rather than discard\n            # so partial-failure causes (e.g., content filter) are visible to the caller.\n            if \"error\" in item:\n                error_payload = item[\"error\"]\n                item_errors.append(\n                    error_payload if isinstance(error_payload, dict) else {\"message\": str(error_payload)}\n                )\n                continue\n            encoded = item.get(\"b64_json\")\n            if not encoded:\n                continue\n            image = decode_image_base64(encoded)\n            generated_images.append(ExternalGeneratedImage(image=image, seed=request.seed))\n\n        if not generated_images:\n            if item_errors:\n                first = item_errors[0]\n                message = first.get(\"message\") if isinstance(first, dict) else None\n                raise ExternalProviderRequestError(\n                    f\"Seedream returned no images. Provider reported: {message or item_errors}\"\n                )\n            raise ExternalProviderRequestError(\"Seedream response contained no images\")\n\n        provider_metadata: dict[str, object] = {\"model\": model_id}\n        if item_errors:\n            provider_metadata[\"partial_failures\"] = item_errors\n            self._logger.warning(\n                \"Seedream returned %d image(s) with %d partial failure(s): %s\",\n                len(generated_images),\n                len(item_errors),\n                item_errors,\n            )\n\n        return ExternalGenerationResult(\n            images=generated_images,\n            seed_used=request.seed,\n            provider_metadata=provider_metadata,","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/services/external_generation/providers/seedream.py#L125-L161","documentation":"Raised when a Seedream generation request completed but produced zero images, and at least one per-item error object was collected from the response \"data\" array. The message surfaces the first item's \"message\" (e.g. a content-filter rejection) so the caller can see why generation failed.","triggerScenarios":"Calling generate() where every entry in the response \"data\" list is an error object (or otherwise not convertible to an image), so generated_images stays empty while item_errors is non-empty.","commonSituations":"Prompts rejected by the provider's content filter; all images in a batch failing safety checks; account quota/region restrictions causing per-request rejections; invalid generation parameters the provider rejects per item.","solutions":["Read the provider-reported message in the error text (usually a content-policy or parameter reason) and adjust the prompt/parameters accordingly","If it is a content-filter rejection, rephrase the prompt to remove flagged content","Verify generation parameters (size, seed, model) are valid for the configured model","Retry after checking account quota/billing status if the message indicates a limit or restriction"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Pre-flight prompt screening (client-side keyword/policy lint) before calling generate()\nif flagged(prompt):\n    raise ValueError(\"Prompt likely violates provider content policy\")","typeGuard":null,"tryCatchPattern":"try:\n    result = provider.generate(request)\nexcept ExternalProviderRequestError as e:\n    if \"content\" in str(e).lower():\n        notify_user(\"Prompt rejected by provider policy; rephrase and retry\")\n    else:\n        raise","preventionTips":["Screen prompts against known content-policy categories before submission","Surface the provider-reported message to end users instead of a generic failure","Validate model/size/seed parameters against the model's documented constraints"],"tags":["external-provider","content-filter","image-generation","empty-result"],"backgroundTag":"provider-content-filter-rejection","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}