feat(image): switch image generation to Meta Muse Image - #270
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…mage Muse is a Gateway image-type model, so the tool now calls generateImage instead of generateText. Muse ignores aspectRatio, so ratios map to size hints (verified live for all five). Edit sources are passed as URL files the Gateway fetches; the ownership check and signed-URL flow are unchanged. Output is WebP, which the bucket already allows. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
d7f06e2 to
ba8c972
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d7f06e2b24
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "id": "generate_image_server_aspect_ratio_sizes", | ||
| "label": "ASPECT_RATIO_SIZES", | ||
| "file_type": "code", | ||
| "source_file": "lib/tools/generate-image/server.ts", | ||
| "source_location": "L27", |
There was a problem hiding this comment.
Refresh shifted graph source locations
The graph refresh adds the new symbols but leaves existing lib/tools/generate-image/server.ts nodes at their pre-change positions: ImageToolContext, resolveSourceImageUrl, createGenerateImageTool, and serverTool still point to L19/L36/L61/L149 even though this commit moves them to L38/L55/L80/L168. Consequently, Graphify queries return incorrect source locations for this module; regenerate or repair all affected node metadata, not only the newly introduced nodes.
AGENTS.md reference: AGENTS.md:L122-L122
Useful? React with 👍 / 👎.
Summary
Switches inline image generation from
google/gemini-2.5-flash-imageto Meta Muse Image (gateway:meta/muse-image-1.0) and reworks the tool to fit it.Stacked on #269 (both PRs edit the same README and DECISIONS lines). GitHub retargets this to
mainonce #269 merges.Source: Artificial Analysis image arenas, 2026-09-18.
What changed
image-type model, so the tool calls the AI SDK'sgenerateImageinstead ofgenerateText+result.files. AddedgetImageModeltolib/utils/registry.ts.aspectRatio(the Gateway warns "use size instead"). The tool maps each ratio to asizehint. Muse snaps output to about 2.4 MP at that ratio.generateImagehas no telemetry option, so the tool annotates the enclosing tool span (image.model,image.is_edit,image.size), the same pattern the search tool uses.NoImageGeneratedErrormaps to the existing "No image was generated" tool error.image/webp; files are 60–330 KB against a 5 MB limit.Verification
bun lint,bun typecheck,bun format,bun run test(193 files / 1650 tests), and graph freshness all pass.sizesentEdit from bytes and edit from a public URL both succeeded; a visual check showed the edit recolored the subject and kept the scene. Latency was 9–19 s per image.
Not verified locally (check on the preview)
Local Supabase was not running, so the upload and signed-URL steps ran only under unit tests:
.webp🤖 Generated with Claude Code