invoke-ai/InvokeAI · error · ExternalProviderRequestError
DashScope async response missing results: {output}
Error message
DashScope async response missing results: {output} What it means
_parse_async_response, invoked when a polled DashScope task reaches SUCCEEDED status, expects output.results to be a list of image results. If 'results' is missing or not a list, the provider raises ExternalProviderRequestError including the output payload, since a succeeded task without results cannot be processed.
Source
Thrown at invokeai/app/services/external_generation/providers/alibabacloud.py:264
raise ExternalProviderRequestError(f"DashScope response contained no images: {data}")
return ExternalGenerationResult(
images=images,
seed_used=request.seed,
provider_request_id=request_id,
provider_metadata={"model": request.model.provider_model_id},
)
def _parse_async_response(
self,
output: dict[str, object],
request: ExternalGenerationRequest,
request_id: str | None,
) -> ExternalGenerationResult:
"""Parse the async task completion response."""
results = output.get("results")
if not isinstance(results, list):
raise ExternalProviderRequestError(f"DashScope async response missing results: {output}")
images: list[ExternalGeneratedImage] = []
for result in results:
if not isinstance(result, dict):
continue
url = result.get("url")
if isinstance(url, str) and url:
pil_image = self._download_image(url)
images.append(ExternalGeneratedImage(image=pil_image, seed=request.seed))
continue
b64_image = result.get("b64_image")
if isinstance(b64_image, str) and b64_image:
pil_image = decode_image_base64(b64_image)
images.append(ExternalGeneratedImage(image=pil_image, seed=request.seed))
if not images:
raise ExternalProviderRequestError(f"DashScope async response contained no images: {output}")
View on GitHub (pinned to 0b6a024f2f)
Solutions
- Inspect the embedded output payload for the actual results field name used by your model
- Check whether the model's async API uses a different key (e.g. 'output.video_url' or per-frame fields) and update the parser or move the model to _SYNC_MODELS
- Pin/verify the DashScope API version implied by external_alibabacloud_base_url
- Update InvokeAI to pick up provider fixes for schema changes
Example fix
// before
results = output.get("results")
if not isinstance(results, list):
raise ExternalProviderRequestError(f"DashScope async response missing results: {output}")
// after
results = output.get("results") or output.get("output", {}).get("results")
if not isinstance(results, list):
raise ExternalProviderRequestError(f"DashScope async response missing results: {output}") Defensive patterns
Strategy: type-guard
Validate before calling
# Only submit async tasks for models confirmed to use the async image-generation API
assert model_id in _ASYNC_MODELS, f"{model_id} not validated for async API" Type guard
def has_results(output: dict) -> bool:
return isinstance(output.get("results"), list) Try / catch
try:
result = provider.generate(request)
except ExternalProviderRequestError as e:
if "missing results" in str(e):
log.error("Async task SUCCEEDED without results; schema mismatch: %s", e)
raise Prevention
- Test custom async models against the DashScope API directly before wiring them in
- Keep the provider parser in sync with the DashScope API version implied by your base_url
- Log the full output payload on failure
- Prefer sync models that InvokeAI actively tests
When it happens
Trigger: Task status is SUCCEEDED but output lacks 'results' — DashScope schema drift for the async image-generation endpoint, or a task completed with output fields other than results (e.g. video-style output).
Common situations: Custom external://alibabacloud/<model_id> models whose async responses use a different results field name; DashScope API version changes; intermediate SUCCEEDED states with partial payloads.
Related errors
- DashScope async response contained no images: {output}
- DashScope task {task_id} timed out after {_TASK_POLL_TIMEOUT
- DashScope task poll failed with status {response.status_code
- DashScope response missing output: {data}
- DashScope response missing choices: {data}
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/0599b6d73a1fbeb5.
Report an issue: GitHub.