mirror of
https://github.com/calesthio/OpenMontage.git
synced 2026-08-05 15:20:40 +08:00
execute() sends sampleCount=number_of_images and estimate_cost() bills 0.04 * n, but result handling decoded only predictions[0] and wrote it to a single output_path. Images 2..n were dropped: never decoded, never written, absent from artifacts. The user paid for n and received one. The result also misreported the drop rather than failing loudly -- images_generated returned len(predictions) (what the API sent) while artifacts held a single path, so an agent picking between variants read a count that did not match the artifact list. Add _output_paths() and loop over every prediction, mirroring the pattern already used by openai_image and grok_image: suffix multi-image paths _1/_2/... so none overwrite each other, keep the exact requested path when n=1, return all paths in artifacts, and report images_generated as the count actually written. Closes #388