mirror of
https://github.com/calesthio/OpenMontage.git
synced 2026-08-05 23:24:27 +08:00
Address PR #240 review feedback from @calesthio: 1. dashscope_image: save EVERY returned image URL, not just the first. The tool advertised multiple_outputs and accepted n>1 but only read content[0], silently dropping paid outputs. Now collects all image URLs across choices/content and downloads each to a distinct indexed path (foo.png -> foo_1.png, foo_2.png, ...). images_generated now reflects the actual count downloaded. Per Qwen Cloud docs, a multi-output task is SUCCEEDED if at least one image is generated; choices with finish_reason != "stop" are skipped to avoid downloading partial/failed results. 2. Complete idempotency_key_fields so different requests no longer collide and reuse stale artifacts: - image: + negative_prompt, seed, prompt_extend, watermark - tts: + instructions - asr: + enable_words, language_hints Adds 19 regression tests (114 total, all pass, no API keys needed): - TestDashscopeImageMultiOutput: URL extraction across choices / within one choice / failed-choice skipping, path resolution for single/multi/no-extension, end-to-end multi-image download with a mocked 3-URL DashScope response verifying all 3 files land on disk, single-image legacy path behavior - TestDashscopeIdempotencyKeys: field presence + key-differs-on-value for every newly added field across all three tools