Commit Graph

2 Commits

Author SHA1 Message Date
Jim Liu 宝玉 648f563378 Make Replicate image requests schema-aware without overpromising multi-image output
Replicate image models no longer share one assumed Nano Banana input shape.
This change routes Seedream and Wan requests through model-family-specific
input builders, switches the default Replicate model to nano-banana-2, and
adds local validation for the most common schema mismatches before the API
returns a remote error.

The implementation stays deliberately narrow. baoyu-imagine still writes one
output file per Replicate request, so this commit blocks --n on the Replicate
provider instead of exposing partial multi-image behavior that would silently
drop outputs.

Constraint: baoyu-imagine currently persists a single output path per request
Constraint: Replicate model families use different request schemas and output defaults
Rejected: Port the previous broader PR as-is | it enabled multi-image request fields without completing multi-image output handling
Rejected: Add full multi-image output support here | larger behavioral surface than needed for a safe first merge
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Do not re-enable Replicate --n until the CLI can name, download, and report multiple output files end to end
Tested: node --import tsx --test skills/baoyu-imagine/scripts/providers/replicate.test.ts
Tested: node --import tsx --test skills/baoyu-imagine/scripts/main.test.ts
Tested: npm test
Not-tested: Live Replicate API calls against Seedream and Wan credentials
Co-authored-by: justnodejs <justnodejs@gmail.com>
2026-04-11 21:16:39 -05:00
Jim Liu 宝玉 69355b4ee1 feat(baoyu-imagine): rename baoyu-image-gen to baoyu-imagine 2026-03-25 16:28:06 -05:00