Commit Graph

3 Commits

Author SHA1 Message Date
Jim Liu 宝玉 ed401cc7a5 Integrate latest baoyu-imagine updates without regressing Replicate runs
Merged origin/main into the PR branch to pick up the Z.AI provider work and
resolved the shared baoyu-imagine docs/code touches. While reconciling the
branch, fixed the outstanding review findings by preserving explicit
--imageSize validation for Replicate while ignoring inherited config defaults,
and by classifying Replicate multi-output extraction failures as
non-retryable so paid requests are not repeated.

Constraint: Merge had to preserve incoming Z.AI provider support from origin/main
Constraint: Replicate should still reject explicit --imageSize usage while tolerating inherited default_image_size config
Rejected: Silently ignore every Replicate imageSize value | would hide explicit CLI/task misuse
Rejected: Leave multi-output extraction under generic retry logic | repeats deterministic paid failures
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep imageSize source tracking aligned with CLI/config/batch task paths before tightening provider validation
Tested: node --import tsx --test skills/baoyu-imagine/scripts/main.test.ts skills/baoyu-imagine/scripts/providers/replicate.test.ts skills/baoyu-imagine/scripts/providers/zai.test.ts
Tested: npm test
Not-tested: Live GitHub thread resolution/reply actions
2026-04-12 00:39:03 -05:00
Jim Liu 宝玉 ae6fe688a3 Align Replicate image behavior with the models we actually support
Replicate image generation in baoyu-imagine no longer assumes that every model
accepts the nano-banana request schema. The Replicate provider now defaults to
google/nano-banana-2, routes supported model families through family-specific
builders and validators, blocks misleading multi-output requests before they
reach the API, and updates user-facing docs/config guidance to match the actual
contract.

Constraint: Replicate model families expose different input schemas
Constraint: Current Replicate path only saves one output image per request
Constraint: Must not change non-Replicate providers
Rejected: Keep one nano-banana-style payload for all Replicate models | triggers remote schema errors on Seedream and Wan
Rejected: Continue accepting multi-image Replicate requests and save only the first result | silently drops outputs
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Add a family-specific validator and input builder before exposing more Replicate model IDs or multi-output flags
Tested: npm test
Tested: node --test skills/baoyu-imagine/scripts/providers/replicate.test.ts skills/baoyu-imagine/scripts/main.test.ts
Not-tested: Live Replicate API calls against production models
Co-authored-by: justnode <justnode@users.noreply.github.com>
2026-04-11 21:42:34 -05:00
Jim Liu 宝玉 69355b4ee1 feat(baoyu-imagine): rename baoyu-image-gen to baoyu-imagine 2026-03-25 16:28:06 -05:00