Repository navigation
feat(muse2api): send entity reference images with scene images - #77
Merged
Merged
Conversation
The provider dropped every reference image on the assumption that the gateway took none. It does: /v1/images/generations accepts `image` as a data URL or a list of them, and the browser driver attaches them to the muse.ai chat. Scenes rendered through muse2api therefore lost their characters. - Muse2APIClient.generate_image takes `images` and sends them as `image`, capped at MAX_IMAGE_REFS (4). - The provider dedupes the job's refs, keeps the first four (logging the rest) and inlines them as data URLs. - An unreadable or unreachable ref now fails the job instead of rendering the scene without its character; httpx errors on input fetch are caught like OSError/ValueError (this also covers a video's start frame). - README and /fk-provider describe the new behaviour and the billing note for gateways with wallets enabled. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The muse2api provider dropped every reference image on the assumption that the gateway took none. It does:
/v1/images/generationsacceptsimageas a data URL or a list of them, and the browser driver attaches them to the muse.ai chat. Scenes rendered through muse2api therefore lost their characters.Muse2APIClient.generate_imagetakesimagesand sends them asimage, capped atMAX_IMAGE_REFS(4).httpxerrors on input fetch are caught likeOSError/ValueError, which also covers a video's start frame./fk-providerdescribe the new behaviour, plus a billing note for gateways with wallets enabled.Test plan:
pytest -q testsgreen; new tests cover refs → data-URL list, noimagefield without refs, dedupe + cap at 4, unreadable ref fails the job, unreachable http ref fails the job🤖 Generated with Claude Code