mirror of
https://github.com/calesthio/OpenMontage.git
synced 2026-08-05 15:20:40 +08:00
The tool advertised `multiple_outputs: True`, accepted `n` (1-4) in its schema, requested `n` images from the API, and scaled `estimate_cost` by `n` — but the result handling was hardcoded to `response.data[0]`. Images 1..n-1 were decoded never, written never, and absent from `artifacts`, so a caller who set `n=4` paid for four images and received one. Iterate over `response.data`, writing each image to a distinct path (suffixed `_1`, `_2`, … when several are requested, mirroring `grok_image` / `dashscope_image`), and return `outputs` / `images_generated` alongside the full `artifacts` list. A single image keeps its exact requested path.